nix-tools/Makefile

83 lines
2.2 KiB
Makefile
Raw Normal View History

2014-10-04 09:09:20 +02:00
V=20141004
2014-10-04 00:46:40 +02:00
PREFIX = /usr/local
BINPROGS = \
2014-10-04 08:27:55 +02:00
bin/checkpkg \
bin/lddd \
bin/finddeps \
bin/find-libdeps \
bin/signpkg \
bin/signpkgs \
2014-10-04 09:09:20 +02:00
bin/mkchroot \
bin/mkchrootpkg \
2014-10-04 08:27:55 +02:00
bin/build-set \
2014-10-04 09:09:20 +02:00
bin/build-set-helper \
2014-10-04 09:37:25 +02:00
bin/basestrap \
bin/manjaro-chroot \
2014-10-04 21:50:00 +02:00
bin/fstabgen \
bin/signpkg
2014-10-04 00:46:40 +02:00
SYSCONFIGFILES = \
2014-10-04 09:09:20 +02:00
conf/manjaro-tools.conf
2014-10-04 00:46:40 +02:00
SETS = \
sets/default.set \
sets/udev.set \
sets/nosystemd.set \
sets/openrc.set \
sets/openrc-nodeps.set
CONFIGFILES = \
2014-10-04 08:27:55 +02:00
conf/makepkg-i686.conf \
conf/makepkg-x86_64.conf \
conf/pacman-default.conf \
conf/pacman-mirrors.conf \
conf/pacman-multilib.conf
2014-10-04 09:09:20 +02:00
LIBS = \
lib/functions.sh
2014-10-04 00:46:40 +02:00
all: $(BINPROGS)
2014-10-04 09:09:20 +02:00
edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \
-e "s|@sysconfdir[@]|$(DESTDIR)$(SYSCONFDIR)/manjaro-tools|g" \
-e "s|@libdir[@]|$(DESTDIR)$(PREFIX)/lib/manjaro-tools|g"
%: %.in Makefile
2014-10-04 00:46:40 +02:00
@echo "GEN $@"
@$(RM) "$@"
@m4 -P $@.in | $(edit) >$@
@chmod a-w "$@"
@chmod +x "$@"
clean:
rm -f $(BINPROGS)
install:
2014-10-04 09:09:20 +02:00
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
install -m0644 ${SYSCONFIGFILES} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets
install -m0644 ${SETS} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets
2014-10-04 00:46:40 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/bin
2014-10-04 09:09:20 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
2014-10-04 00:46:40 +02:00
install -m0755 ${BINPROGS} $(DESTDIR)$(PREFIX)/bin
2014-10-04 09:09:20 +02:00
install -m0644 ${CONFIGFILES} $(DESTDIR)$(PREFIX)/share/manjaro-tools
2014-10-04 00:46:40 +02:00
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
2014-10-04 09:09:20 +02:00
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
2014-10-04 00:46:40 +02:00
uninstall:
2014-10-04 09:09:20 +02:00
for f in ${SYSCONFIGFILES}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
for f in ${SETS}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/$$f; done
2014-10-04 00:46:40 +02:00
for f in ${BINPROGS}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
2014-10-04 09:09:20 +02:00
for f in ${CONFIGFILES}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
2014-10-04 00:46:40 +02:00
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
2014-10-04 09:09:20 +02:00
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
2014-10-04 00:46:40 +02:00
dist:
2014-10-04 09:09:20 +02:00
git archive --format=tar --prefix=manjaro-tools-$(V)/ $(V) | gzip -9 > manjaro-tools-$(V).tar.gz
gpg --detach-sign --use-agent manjaro-tools-$(V).tar.gz
2014-10-04 00:46:40 +02:00
.PHONY: all clean install uninstall dist