summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Sommer <e5ten.arch@gmail.com>2019-09-22 12:40:01 -0400
committerEthan Sommer <e5ten.arch@gmail.com>2019-09-22 12:40:01 -0400
commit33b8819942d45886986362a17618482bc333d0d2 (patch)
treed0b30546c293afccc66d1d8f1178993e6ac5632e
parentcd9c9f40aba1c6d2ced89b8aca8f0d0313512e5d (diff)
fix Makefile
-rw-r--r--Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fc4eae3..92efc45 100644
--- a/Makefile
+++ b/Makefile
@@ -13,6 +13,11 @@ MANPREFIX = $(DATAROOTDIR)/man
MSGFMT = $(shell command -v msgfmt 2>/dev/null)
POD2MAN = $(shell command -v pod2man 2>/dev/null)
+LIBRARY = $(shell pkg-config --variable=libmakepkgdir libmakepkg)
+ifeq ($(LIBRARY),)
+ LIBRARY = $(DATAROOTDIR)/makepkg
+endif
+
TRANSLATIONS = \
ca \
da \
@@ -50,14 +55,14 @@ endif
install: doc
@echo "Installing..."
@install -Dm644 ./config $(DESTDIR)$(DOCDIR)/config.example
- @install -Dm755 ./pacaur -t $(DESTDIR)$(BINDIR)
- @sed -e "s%(declare -r version=).*%\1\'$(VERSION)\'%" \
- -e "s%/usr/share/makepkg%$(shell pkg-config --variable=libmakepkgdir libmakepkg)%" \
- -Ei $(DESTDIR)$(BINDIR)/pacaur
+ @sed -E "s%(declare -r version=).*%\1\'$(VERSION)\'%;s%/usr/share/makepkg%$(LIBRARY)%" ./pacaur | \
+ install -Dm755 /dev/stdin $(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
+ifneq ($(POD2MAN),)
@install -Dm644 ./pacaur.8 -t $(DESTDIR)$(MANPREFIX)/man8
+endif
ifneq ($(MSGFMT),)
for i in $(TRANSLATIONS); do \
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/locale/$$i/LC_MESSAGES/"; \