summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-11-28 12:06:20 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-11-28 12:06:20 +0100
commite88d6f159625b49b5e36bbcf9d31d9bc96e23084 (patch)
tree4c8cbab61fe3fd44d17ad7271cb83ac505e2ed1a
parentdb0e599efc92d088c1192dfb1ed0500ddfda5453 (diff)
downloadpacredir-e88d6f159625b49b5e36bbcf9d31d9bc96e23084.tar.gz
pacredir-e88d6f159625b49b5e36bbcf9d31d9bc96e23084.tar.zst
use PREFIX in Makefile
-rw-r--r--Makefile19
1 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 0d6057b..d2ed599 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
# paccache - serve pacman cache and redirect via avahi service
+PREFIX := /usr
CC := gcc
MD := markdown
INSTALL := install
@@ -40,21 +41,21 @@ README.html: README.md
install: install-bin install-doc
install-bin: pacredir
- $(INSTALL) -D -m0755 pacredir $(DESTDIR)/usr/bin/pacredir
+ $(INSTALL) -D -m0755 pacredir $(DESTDIR)$(PREFIX)/bin/pacredir
$(INSTALL) -D -m0644 pacredir.conf $(DESTDIR)/etc/pacredir.conf
$(INSTALL) -D -m0644 pacman/paccache $(DESTDIR)/etc/pacman.d/paccache
$(INSTALL) -D -m0644 avahi/pacserve.service $(DESTDIR)/etc/avahi/services/pacserve.service
$(INSTALL) -D -m0644 avahi/pacdbserve.service $(DESTDIR)/etc/avahi/services/pacdbserve.service
- $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)/usr/lib/systemd/system/pacserve.service
- $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)/usr/lib/systemd/system/pacdbserve.service
- $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)/usr/lib/systemd/system/pacredir.service
- $(INSTALL) -D -m0644 initcpio/hook/paccache $(DESTDIR)/usr/lib/initcpio/hooks/paccache
- $(INSTALL) -D -m0644 initcpio/install/paccache $(DESTDIR)/usr/lib/initcpio/install/paccache
- $(INSTALL) -D -m0755 dhcpcd/80-pacredir $(DESTDIR)/usr/lib/dhcpcd/dhcpcd-hooks/80-pacredir
+ $(INSTALL) -D -m0644 systemd/pacserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacserve.service
+ $(INSTALL) -D -m0644 systemd/pacdbserve.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacdbserve.service
+ $(INSTALL) -D -m0644 systemd/pacredir.service $(DESTDIR)$(PREFIX)/lib/systemd/system/pacredir.service
+ $(INSTALL) -D -m0644 initcpio/hook/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/paccache
+ $(INSTALL) -D -m0644 initcpio/install/paccache $(DESTDIR)$(PREFIX)/lib/initcpio/install/paccache
+ $(INSTALL) -D -m0755 dhcpcd/80-pacredir $(DESTDIR)$(PREFIX)/lib/dhcpcd/dhcpcd-hooks/80-pacredir
install-doc: README.html
- $(INSTALL) -D -m0644 README.md $(DESTDIR)/usr/share/doc/paccache/README.md
- $(INSTALL) -D -m0644 README.html $(DESTDIR)/usr/share/doc/paccache/README.html
+ $(INSTALL) -D -m0644 README.md $(DESTDIR)$(PREFIX)/share/doc/paccache/README.md
+ $(INSTALL) -D -m0644 README.html $(DESTDIR)$(PREFIX)/share/doc/paccache/README.html
clean:
$(RM) -f *.o *~ arch pacredir avahi/pacdbserve.service README.html