replace rst2man with pandoc

This commit is contained in:
Blake Lee 2022-07-18 18:56:46 -04:00
parent 88506d4284
commit a312f8e0ac
No known key found for this signature in database
GPG key ID: 87157C329108F09E
3 changed files with 96 additions and 91 deletions

View file

@ -9,6 +9,9 @@ PKGS = wlroots wayland-server xcb xkbcommon libinput
CFLAGS += $(foreach p,$(PKGS),$(shell pkg-config --cflags $(p)))
LDLIBS += $(foreach p,$(PKGS),$(shell pkg-config --libs $(p)))
VERSION=0.7.1beta
DATE=$(shell date "+%d %b %Y")
xdg-shell-protocol.h:
$(WAYLAND_SCANNER) server-header \
$(WAYLAND_PROTOCOLS)/stable/xdg-shell/xdg-shell.xml $@
@ -124,8 +127,7 @@ install:
cp ./assets/wall_4K.png ${PREFIX}/share/hyprland
cp ./assets/wall_8K.png ${PREFIX}/share/hyprland
rst2man ./docs/hyprctl.1.rst | gzip -c > /usr/share/man/man1/hyprctl.1.gz
rst2man ./docs/Hyprland.1.rst | gzip -c > /usr/share/man/man1/Hyprland.1.gz
make man
uninstall:
rm -f ${PREFIX}/share/wayland-sessions/hyprland.desktop
@ -150,3 +152,22 @@ config:
cd subprojects/wlroots && ninja -C build/
cd subprojects/wlroots && ninja -C build/ install
man:
pandoc ./docs/Hyprland.1.rst \
--standalone \
--variable=header:"Hyprland User Manual" \
--variable=footer:${VERSION} \
--variable=date:"${DATE}" \
--variable=section:1 \
--from rst \
--to man | gzip -c > /usr/share/man/man1/Hyprland.1.gz
pandoc ./docs/hyprctl.1.rst \
--standalone \
--variable=header:"hyprctl User Manual" \
--variable=footer:${VERSION} \
--variable=date:"${DATE}" \
--variable=section:1 \
--from rst \
--to man | gzip -c > /usr/share/man/man1/hyprctl.1.gz