summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorEthan Sommer <e5ten.arch@gmail.com>2019-09-19 15:29:15 -0400
committerEthan Sommer <e5ten.arch@gmail.com>2019-09-19 15:29:15 -0400
commit299f8e5828bd7e86428d58c6ce5ea11cc7dff575 (patch)
treef418b67a88d658c7f41cb871e34e85d892281847 /Makefile
parentb3c9fb8f01ad389624772a4ed1ee41f71ce1969b (diff)
improved auracle info caching, improve option parsing by removing the if statement at the start of the loop, enable nounset, lots and lots of hopefully NFC
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile7
1 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 788579f..fc4eae3 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,7 @@ DATAROOTDIR = $(PREFIX)/share
DOCDIR = $(DATAROOTDIR)/doc/pacaur
MANPREFIX = $(DATAROOTDIR)/man
MSGFMT = $(shell command -v msgfmt 2>/dev/null)
+POD2MAN = $(shell command -v pod2man 2>/dev/null)
TRANSLATIONS = \
ca \
@@ -39,16 +40,20 @@ all: doc
# documentation
doc:
+ifneq ($(POD2MAN),)
@echo "Generating documentation..."
@pod2man --utf8 --section=8 --center="Pacaur Manual" --name="PACAUR" \
--release="pacaur $(VERSION)" ./README.pod ./pacaur.8
+endif
# aux
install: doc
@echo "Installing..."
@install -Dm644 ./config $(DESTDIR)$(DOCDIR)/config.example
@install -Dm755 ./pacaur -t $(DESTDIR)$(BINDIR)
- @sed -i "s%declare -r version=.*%declare -r version=\'$(VERSION)\'%" $(DESTDIR)$(BINDIR)/pacaur
+ @sed -e "s%(declare -r version=).*%\1\'$(VERSION)\'%" \
+ -e "s%/usr/share/makepkg%$(shell pkg-config --variable=libmakepkgdir libmakepkg)%" \
+ -Ei $(DESTDIR)$(BINDIR)/pacaur
@install -Dm644 ./completions/bash.completion $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/pacaur
@install -Dm644 ./completions/zsh.completion $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_pacaur
@install -Dm644 ./LICENSE -t $(DESTDIR)$(DATAROOTDIR)/licenses/pacaur