manjaro-tools/Makefile

204 lines
6.7 KiB
Makefile
Raw Normal View History

2015-06-04 15:35:51 +02:00
V=0.9.9
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
2015-06-12 01:26:44 +02:00
BIN = \
bin/mkchroot \
bin/basestrap \
bin/manjaro-chroot \
bin/fstabgen \
bin/buildset \
bin/chroot-run
BIN_PKG = \
2015-06-12 01:33:50 +02:00
bin/pkg/checkpkg \
bin/pkg/lddd \
bin/pkg/finddeps \
bin/pkg/find-libdeps \
bin/pkg/signpkg \
bin/pkg/signpkgs \
bin/pkg/mkchrootpkg \
bin/pkg/buildpkg \
bin/pkg/buildtree
2014-10-05 00:17:23 +02:00
2015-06-12 01:26:44 +02:00
BIN_ISO = \
2015-06-12 01:33:50 +02:00
bin/iso/buildiso \
bin/iso/testiso
2015-06-12 01:26:44 +02:00
SYSCONF = \
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
2015-06-12 01:26:44 +02:00
SHARED = \
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-06-05 09:39:02 +02:00
conf/pacman-lng.conf \
conf/profile.conf.example
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 \
2015-06-11 22:56:13 +02:00
lib/util-fstab.sh
LIBS_PKG = \
lib/pkg/util-pkg.sh \
lib/pkg/util-pkgtree.sh
LIBS_ISO = \
lib/iso/util-iso.sh \
lib/iso/util-iso-fs.sh \
lib/iso/util-iso-image.sh \
lib/iso/util-iso-calamares.sh \
lib/iso/util-livecd.sh \
lib/iso/util-iso-boot.sh \
lib/iso/util-iso-log.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 \
2015-05-08 20:30:22 +02:00
initcpio/hooks/miso_pxe_common \
2015-05-10 23:53:21 +02:00
initcpio/hooks/miso_pxe_http
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 \
2015-05-08 20:30:22 +02:00
initcpio/inst/miso_pxe_common \
initcpio/inst/miso_pxe_http \
2014-12-17 03:44:04 +01:00
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
2015-05-15 20:10:49 +02:00
MAN_XML = \
2015-06-05 09:39:02 +02:00
buildset.xml \
buildpkg.xml \
buildtree.xml \
2015-05-25 12:15:46 +02:00
buildiso.xml \
manjaro-tools.conf.xml \
profile.conf.xml
2015-05-15 20:10:49 +02:00
2015-06-12 01:43:24 +02:00
all: $(BIN) $(BIN_PKG) $(BIN_ISO) doc #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 "$@"
2015-05-15 20:10:49 +02:00
doc:
mkdir -p man
2015-05-25 12:17:40 +02:00
$(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;)
2015-05-15 20:10:49 +02:00
2014-10-04 00:46:40 +02:00
clean:
2015-06-12 01:26:44 +02:00
rm -f $(BIN) #bin/bash_completion bin/zsh_completion
2015-05-15 20:10:49 +02:00
rm -rf man
2014-10-04 00:46:40 +02:00
install:
2014-10-04 09:09:20 +02:00
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
2015-06-12 01:26:44 +02:00
install -m0644 ${SYSCONF} $(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
2015-06-11 22:56:13 +02:00
2014-10-04 09:09:20 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
2015-06-11 22:56:13 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools/pkg
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools/iso
2015-06-12 01:26:44 +02:00
install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin
install -m0755 ${BIN_PKG} $(DESTDIR)$(PREFIX)/bin
install -m0755 ${BIN_ISO} $(DESTDIR)$(PREFIX)/bin
install -m0644 ${SHARED} $(DESTDIR)$(PREFIX)/share/manjaro-tools
2014-10-04 00:46:40 +02:00
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
2015-06-11 22:56:13 +02:00
2014-10-04 09:09:20 +02:00
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
2015-06-11 22:56:13 +02:00
install -m0644 ${LIBS_PKG} $(DESTDIR)$(PREFIX)/lib/manjaro-tools/pkg
install -m0644 ${LIBS_ISO} $(DESTDIR)$(PREFIX)/lib/manjaro-tools/iso
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-06-11 22:56:13 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
2015-06-05 09:39:02 +02:00
gzip -c man/buildset.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildset.1.gz
gzip -c man/buildpkg.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildpkg.1.gz
gzip -c man/buildtree.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildtree.1.gz
2015-05-25 12:15:46 +02:00
gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
2015-06-11 22:56:13 +02:00
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man5
2015-05-25 12:15:46 +02:00
gzip -c man/manjaro-tools.conf.5 > $(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
gzip -c man/profile.conf.5 > $(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
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:
2015-06-12 01:26:44 +02:00
for f in ${SYSCONF}; 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
2015-06-12 01:26:44 +02:00
for f in ${BIN}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
for f in ${BIN_PKG}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
for f in ${BIN_ISO}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
for f in ${SHARED}; 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
2015-06-11 22:56:13 +02:00
2014-10-04 09:09:20 +02:00
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
2015-06-11 22:56:13 +02:00
for f in ${LIBS_PKG}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/pkg/$$f; done
for f in ${LIBS_ISO}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/iso/$$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-06-05 09:39:02 +02:00
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildset.1.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildpkg.1.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildtree.1.gz
2015-05-25 12:15:46 +02:00
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
2015-06-05 09:49:15 +02:00
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
2015-05-15 20:10:49 +02:00
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