diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-08-12 16:44:36 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-08-13 20:31:22 +0200 |
commit | 35fc83ce7d8dc26cd424321f2e8638d05da0a6d4 (patch) | |
tree | e71344a38a700106f29dfa7f0b849d7613eb3777 /Makefile | |
parent | 51b5d69cfc8ae10a930fb90dc3856d32c75ad047 (diff) | |
download | devtools32-35fc83ce7d8dc26cd424321f2e8638d05da0a6d4.tar.xz |
Makefile: Add PREFIX support
Default to "/usr/local" which should be used if you want to build
devtools from sources and install without using a package manager.
Use `make PREFIX=/usr install` to install to "/usr" instead.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 32 |
1 files changed, 17 insertions, 15 deletions
@@ -1,5 +1,7 @@ V=0.9.23 +PREFIX = /usr/local + BINPROGS = \ checkpkg \ commitpkg \ @@ -48,25 +50,25 @@ ARCHBUILD_LINKS = \ all: install: - install -dm0755 $(DESTDIR)/usr/bin - install -dm0755 $(DESTDIR)/usr/sbin - install -dm0755 $(DESTDIR)/usr/share/devtools - install -m0755 ${BINPROGS} $(DESTDIR)/usr/bin - install -m0755 ${SBINPROGS} $(DESTDIR)/usr/sbin - install -m0644 ${CONFIGFILES} $(DESTDIR)/usr/share/devtools - for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)/usr/bin/$$l; done - for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)/usr/bin/$$l; done - ln -sf archco $(DESTDIR)/usr/bin/communityco + install -dm0755 $(DESTDIR)$(PREFIX)/bin + install -dm0755 $(DESTDIR)$(PREFIX)/sbin + install -dm0755 $(DESTDIR)$(PREFIX)/share/devtools + install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin + install -m0755 ${SBINPROGS} $(DESTDIR)$(PREFIX)/sbin + install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/devtools + for l in ${COMMITPKG_LINKS}; do ln -sf commitpkg $(DESTDIR)$(PREFIX)/bin/$$l; done + for l in ${ARCHBUILD_LINKS}; do ln -sf archbuild $(DESTDIR)$(PREFIX)/bin/$$l; done install -Dm0644 bash_completion $(DESTDIR)/etc/bash_completion.d/devtools + ln -sf archco $(DESTDIR)$(PREFIX)/bin/communityco uninstall: - for f in ${BINPROGS}; do rm -f $(DESTDIR)/usr/bin/$$f; done - for f in ${SBINPROGS}; do rm -f $(DESTDIR)/usr/sbin/$$f; done - for f in ${CONFIGFILES}; do rm -f $(DESTDIR)/usr/share/devtools/$$f; done - for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)/usr/bin/$$l; done - for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)/usr/bin/$$l; done + for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done + for f in ${SBINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/sbin/$$f; done + for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/devtools/$$f; done + for l in ${COMMITPKG_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done + for l in ${ARCHBUILD_LINKS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$l; done rm $(DESTDIR)/etc/bash_completion.d/devtools - rm -f $(DESTDIR)/usr/bin/communityco + rm -f $(DESTDIR)$(PREFIX)/bin/communityco dist: git archive --format=tar --prefix=devtools-$(V)/ $(V) | gzip -9 > devtools-$(V).tar.gz |