nix-tools/Makefile

99 lines
3.1 KiB
Makefile
Raw Normal View History

2014-11-12 02:19:58 +01:00
V=0.9.2
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:37:25 +02:00
bin/basestrap \
bin/manjaro-chroot \
2014-10-07 01:04:26 +02:00
bin/fstabgen \
2014-11-12 02:19:58 +01:00
bin/make-set \
bin/chroot-run
2014-10-05 00:17:23 +02:00
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 = \
2014-10-14 00:23:45 +02:00
sets/default.set
2014-10-04 00:46:40 +02:00
CONFIGFILES = \
2014-10-04 08:27:55 +02:00
conf/makepkg-i686.conf \
conf/makepkg-x86_64.conf \
conf/pacman-default.conf \
2014-11-12 04:14:36 +01:00
conf/pacman-multilib.conf \
conf/pacman-mirrors-stable.conf \
conf/pacman-mirrors-testing.conf \
conf/pacman-mirrors-unstable.conf
2014-10-04 09:09:20 +02:00
LIBS = \
2014-10-08 00:12:43 +02:00
lib/util.sh \
2014-11-13 16:00:56 +01:00
lib/util-mount.sh \
lib/util-build.sh \
lib/util-msg.sh
2014-10-04 00:46:40 +02:00
2014-11-13 17:59:10 +01:00
all: $(BINPROGS) bin/bash_completion bin/zsh_completion
2014-10-04 00:46:40 +02:00
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" \
2014-10-08 13:14:57 +02:00
-e "s|@libdir[@]|$(DESTDIR)$(PREFIX)/lib/manjaro-tools|g" \
-e "s|@version@|${V}|"
2014-10-04 09:09:20 +02:00
%: %.in Makefile
2014-10-04 00:46:40 +02:00
@echo "GEN $@"
@$(RM) "$@"
@m4 -P $@.in | $(edit) >$@
@chmod a-w "$@"
@chmod +x "$@"
clean:
2014-11-13 17:59:10 +01:00
rm -f $(BINPROGS) bin/bash_completion bin/zsh_completion
2014-10-04 00:46:40 +02:00
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-11-12 02:19:58 +01:00
# compat symlink for manjaroiso
2014-10-28 11:31:34 +01:00
ln -sf basestrap $(DESTDIR)$(PREFIX)/bin/pacstrap
2014-11-12 02:19:58 +01:00
#ln -sf fstabgen $(DESTDIR)$(PREFIX)/bin/genfstab
#ln -sf manjaro-chroot $(DESTDIR)$(PREFIX)/bin/arch-chroot
2014-11-13 17:59:10 +01:00
2014-11-14 13:12:38 +01:00
install -Dm0644 bin/bash_completion $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
2014-11-13 18:01:39 +01:00
install -Dm0644 bin/zsh_completion $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_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-11-12 02:19:58 +01:00
# compat symlink for manjaroiso
2014-10-28 11:31:34 +01:00
rm -f $(DESTDIR)$(PREFIX)/bin/pacstrap
2014-11-12 02:19:58 +01:00
#rm -f $(DESTDIR)$(PREFIX)/bin/genfstab
#rm -f $(DESTDIR)$(PREFIX)/bin/arch-chroot
2014-11-13 17:59:10 +01:00
2014-11-14 13:12:38 +01:00
rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
2014-11-13 17:59:10 +01:00
rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools
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