summaryrefslogtreecommitdiff
path: root/src/devtools/Makefile
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-01-17 21:14:02 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-01-17 21:14:02 -0500
commitc79e6971d56c347cee39fe2e601226865ac2ae1e (patch)
tree4e26187f01ac14e9f23b89b9eb70dc92f35eb952 /src/devtools/Makefile
parent5c2dd97a91421e6e5f7e920579fcb88bb71e7fa7 (diff)
parent512436524cd3e70b9394d304bc9a43c6858c3695 (diff)
Merge commit '512436524cd3e70b9394d304bc9a43c6858c3695' as 'src/devtools'
Diffstat (limited to 'src/devtools/Makefile')
-rw-r--r--src/devtools/Makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/devtools/Makefile b/src/devtools/Makefile
new file mode 100644
index 0000000..8b94f80
--- /dev/null
+++ b/src/devtools/Makefile
@@ -0,0 +1,55 @@
+V=20121128.6
+
+PREFIX = /usr/local
+pkgdatadir=$(PREFIX)/share/devtools
+
+BINPROGS = \
+ checkpkg \
+ find-libdeps \
+ finddeps \
+ lddd
+
+SBINPROGS = \
+ mkarchroot
+
+all: $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion
+
+edit = sed -e "s|@pkgdatadir[@]|$(pkgdatadir)|g"
+
+%: %.in Makefile
+ @echo "GEN $@"
+ @$(RM) "$@"
+ @m4 -P $@.in | $(edit) >$@
+ @chmod a-w "$@"
+ @chmod +x "$@"
+
+clean:
+ rm -f $(BINPROGS) $(SBINPROGS) bash_completion zsh_completion
+
+install: all
+ install -dm0755 $(DESTDIR)$(PREFIX)/bin
+ install -dm0755 $(DESTDIR)$(PREFIX)/sbin
+ install -dm0755 $(DESTDIR)$(pkgdatadir)
+
+ install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
+# install -m0755 ${SBINPROGS} $(DESTDIR)$(PREFIX)/sbin
+ install -m0755 mkarchroot $(DESTDIR)$(PREFIX)/sbin/archroot
+
+ ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
+
+ install -m0644 lib/common.sh $(DESTDIR)$(pkgdatadir)/common.sh
+ install -m0644 makechrootpkg.in $(DESTDIR)$(pkgdatadir)/makechrootpkg.sh
+ install -Dm0644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
+ install -Dm0644 zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
+
+uninstall:
+ for f in ${BINPROGS} ; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
+# for f in ${SBINPROGS} ; do rm -f $(DESTDIR)$(PREFIX)/sbin/$$f; done
+ rm -f $(DESTDIR)$(PREFIX)/sbin/archroot
+
+ rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
+
+ rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/devtools
+ rm -f $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_devtools
+
+.PHONY: all clean install uninstall