Skip to content

Commit

Permalink
Update Manpage
Browse files Browse the repository at this point in the history
  • Loading branch information
hakavlad committed May 14, 2024
1 parent e1ca92f commit 64ca773
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,33 @@ MANDIR ?= $(DATADIR)/man
PANDOC := $(shell command -v pandoc 2> /dev/null)

all:
@ echo "Use: make install, make uninstall, make build-deb, make install-deb, make manpage"
@echo "Use: make install, make uninstall, make build-deb, make install-deb, make manpage"

install:
install -p -d $(DESTDIR)$(BINDIR)
install -p -m0755 $(NAME)/$(NAME).py $(DESTDIR)$(BINDIR)/$(NAME)

install -p -d $(DESTDIR)$(MANDIR)/man1
gzip -9cn docs/$(NAME).1 > $(DESTDIR)$(MANDIR)/man1/$(NAME).1.gz

uninstall:
rm -fv $(DESTDIR)$(BINDIR)/$(NAME)
rm -fv $(DESTDIR)$(MANDIR)/man1/$(NAME).1.gz

build-deb:
install -p -d deb/$(NAME)/usr/bin
install -p -m0755 $(NAME)/$(NAME).py deb/$(NAME)/usr/bin/$(NAME)

install -p -d deb/$(NAME)/usr/share/man/man1
gzip -9cn docs/$(NAME).1 > deb/$(NAME)/usr/share/man/man1/$(NAME).1.gz

install -p -d deb/$(NAME)/usr/share/doc/$(NAME)
install -p -m0644 README.md deb/$(NAME)/usr/share/doc/$(NAME)/README.md
install -p -m0644 SECURITY.md deb/$(NAME)/usr/share/doc/$(NAME)/SECURITY.md
install -p -m0644 docs/MANPAGE.md deb/$(NAME)/usr/share/doc/$(NAME)/MANPAGE.md
install -p -m0644 docs/SPECIFICATION.md deb/$(NAME)/usr/share/doc/$(NAME)/SPECIFICATION.md
install -p -m0644 images/$(NAME).ico deb/$(NAME)/usr/share/doc/$(NAME)/$(NAME).ico

cp -r deb/DEBIAN deb/$(NAME)/
fakeroot dpkg-deb --build deb/$(NAME)
## Now you can run
Expand All @@ -31,7 +44,6 @@ install-deb:
apt install -o Acquire::AllowUnsizedPackages=1 --reinstall ./deb/$(NAME).deb

manpage:

ifdef PANDOC
pandoc docs/MANPAGE.md -s -t man > docs/$(NAME).1
man ./docs/$(NAME).1
Expand Down

0 comments on commit 64ca773

Please sign in to comment.