manjaro-tools/Makefile

145 lines
4.6 KiB
Makefile
Raw Normal View History

2015-04-15 10:13:49 +02:00
V=0.9.7.3
2014-10-04 00:46:40 +02:00
2014-12-04 19:20:40 +01:00
PREFIX = $(PREFIX)/local
2014-10-04 00:46:40 +02:00
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 \
bin/buildpkg \
2014-10-04 09:37:25 +02:00
bin/basestrap \
bin/manjaro-chroot \
2014-10-07 01:04:26 +02:00
bin/fstabgen \
bin/mkset \
2014-12-04 19:20:40 +01:00
bin/chroot-run \
bin/mkiso \
bin/buildiso \
2015-01-19 04:22:02 +01:00
bin/testiso \
bin/buildtree
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
2015-01-14 22:28:56 +01:00
SETS_PKG = \
sets/pkg/default.set
2015-01-29 14:09:05 +01:00
2015-01-14 22:28:56 +01:00
SETS_ISO = \
2015-02-17 00:29:34 +01:00
sets/iso/default.set \
sets/iso/official.set \
sets/iso/community.set \
sets/iso/openrc.set
2015-01-29 14:09:05 +01:00
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 \
2015-01-29 14:09:05 +01:00
conf/pacman-mirrors-unstable.conf \
conf/pacman-gfx.conf \
2015-02-26 20:53:20 +01:00
conf/pacman-lng.conf
2015-01-29 14:09:05 +01:00
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 \
2014-12-08 23:50:56 +01:00
lib/util-msg.sh \
lib/util-pkg.sh \
lib/util-fstab.sh \
2015-01-29 14:09:05 +01:00
lib/util-iso.sh \
lib/util-iso-image.sh \
2015-01-29 14:09:05 +01:00
lib/util-iso-calamares.sh \
2015-02-16 20:32:27 +01:00
lib/util-livecd.sh \
2015-03-04 00:41:05 +01:00
lib/util-iso-boot.sh \
2015-02-16 20:32:27 +01:00
lib/util-pkgtree.sh
2014-10-04 00:46:40 +02:00
2014-12-04 19:20:40 +01:00
CPIOHOOKS = \
2014-12-17 03:44:04 +01:00
initcpio/hooks/miso \
initcpio/hooks/miso_loop_mnt \
initcpio/hooks/miso_pxe_nbd
2015-01-29 14:09:05 +01:00
2014-12-04 19:20:40 +01:00
CPIOINST = \
2014-12-17 03:44:04 +01:00
initcpio/inst/miso \
initcpio/inst/miso_loop_mnt \
initcpio/inst/miso_pxe_nbd \
initcpio/inst/miso_kms
2015-01-29 14:09:05 +01:00
2014-12-15 04:03:50 +01:00
SCRIPTS = \
2014-12-19 17:46:25 +01:00
scripts/mhwd-live \
2015-02-26 20:53:20 +01:00
scripts/livecd \
2015-02-28 01:38:42 +01:00
scripts/kbd-model-map
2014-12-09 00:40:46 +01:00
2015-03-02 23:35:36 +01:00
EFISHELL = \
efi_shell/shellx64_v1.efi \
efi_shell/shellx64_v2.efi
2014-12-05 12:21:01 +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" \
2014-12-14 07:57:34 +01:00
-e "s|@bindir[@]|$(DESTDIR)$(PREFIX)/bin|g" \
2014-10-04 09:09:20 +02:00
-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:
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
2015-01-14 22:31:36 +01:00
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
2015-01-14 22:28:56 +01:00
install -m0644 ${SETS_PKG} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
2015-01-16 23:15:24 +01:00
install -m0644 ${SETS_ISO} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
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-12-04 19:42:03 +01:00
install -dm0755 $(DESTDIR)$(PREFIX)/lib/initcpio/hooks
install -m0755 ${CPIOHOOKS} $(DESTDIR)$(PREFIX)/lib/initcpio/hooks
install -dm0755 $(DESTDIR)$(PREFIX)/lib/initcpio/install
install -m0755 ${CPIOINST} $(DESTDIR)$(PREFIX)/lib/initcpio/install
2014-12-15 04:03:50 +01:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
2015-03-02 23:35:36 +01:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
install -m0644 ${EFISHELL} $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
2015-01-29 14:09:05 +01:00
2015-01-19 04:22:02 +01:00
# install -Dm0644 bin/bash_completion $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
# 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
2015-01-14 22:28:56 +01:00
for f in ${SETS_PKG}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg/$$f; done
for f in ${SETS_ISO}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso/$$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-12-04 19:20:40 +01:00
for f in ${CPIOHOOKS}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/hooks/$$f; done
for f in ${CPIOINST}; do rm -f $(DESTDIR)$(PREFIX)/lib/initcpio/install/$$f; done
2014-12-15 04:03:50 +01:00
for f in ${SCRIPTS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts/$$f; done
2015-03-02 23:35:36 +01:00
for f in ${EFISHELL}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell/$$f; done
2015-01-19 04:22:02 +01:00
# rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
# 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