2016-03-01 14:16:30 +01:00
|
|
|
Version=0.11.2
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-06-14 22:25:57 +02:00
|
|
|
PREFIX = /usr/local
|
|
|
|
SYSCONFDIR = /etc
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
SYSCONF = \
|
|
|
|
data/manjaro-tools.conf
|
|
|
|
|
|
|
|
BIN_BASE = \
|
2015-06-12 01:26:44 +02:00
|
|
|
bin/mkchroot \
|
|
|
|
bin/basestrap \
|
|
|
|
bin/manjaro-chroot \
|
|
|
|
bin/fstabgen \
|
2016-02-22 21:57:55 +01:00
|
|
|
bin/signfile \
|
2015-11-12 12:25:35 +01:00
|
|
|
bin/chroot-run
|
2015-06-12 01:26:44 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
LIBS_BASE = \
|
|
|
|
lib/util.sh \
|
|
|
|
lib/util-mount.sh \
|
|
|
|
lib/util-msg.sh \
|
|
|
|
lib/util-fstab.sh
|
|
|
|
|
|
|
|
SHARED_BASE = \
|
|
|
|
data/pacman-default.conf \
|
|
|
|
data/pacman-multilib.conf \
|
|
|
|
data/pacman-mirrors-stable.conf \
|
|
|
|
data/pacman-mirrors-testing.conf \
|
|
|
|
data/pacman-mirrors-unstable.conf
|
|
|
|
|
|
|
|
SETS_PKG = \
|
|
|
|
data/pkg.d/default.set
|
|
|
|
|
2015-06-12 01:26:44 +02:00
|
|
|
BIN_PKG = \
|
2014-10-04 08:27:55 +02:00
|
|
|
bin/checkpkg \
|
|
|
|
bin/lddd \
|
|
|
|
bin/finddeps \
|
|
|
|
bin/find-libdeps \
|
|
|
|
bin/signpkgs \
|
2014-10-04 09:09:20 +02:00
|
|
|
bin/mkchrootpkg \
|
2014-12-15 21:03:55 +01:00
|
|
|
bin/buildpkg \
|
2015-01-19 04:22:02 +01:00
|
|
|
bin/buildtree
|
2014-10-05 00:17:23 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
LIBS_PKG = \
|
|
|
|
lib/util-pkg.sh \
|
|
|
|
lib/util-pkgtree.sh
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
SHARED_PKG = \
|
|
|
|
data/makepkg-i686.conf \
|
|
|
|
data/base-devel-udev \
|
|
|
|
data/makepkg-x86_64.conf
|
2015-01-29 14:09:05 +01:00
|
|
|
|
2015-01-14 22:28:56 +01:00
|
|
|
SETS_ISO = \
|
2015-12-03 23:31:59 +01:00
|
|
|
data/iso.d/default.set \
|
|
|
|
data/iso.d/official.set \
|
|
|
|
data/iso.d/community.set \
|
2015-12-18 04:52:34 +01:00
|
|
|
data/iso.d/minimal.set \
|
2015-12-18 03:30:48 +01:00
|
|
|
data/iso.d/sonar.set \
|
|
|
|
data/iso.d/netrunner.set
|
2015-01-29 14:09:05 +01:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
BIN_ISO = \
|
|
|
|
bin/buildiso \
|
|
|
|
bin/testiso \
|
2016-02-22 21:57:55 +01:00
|
|
|
bin/deployiso
|
2015-06-11 22:56:13 +02:00
|
|
|
|
|
|
|
LIBS_ISO = \
|
2015-01-29 14:09:05 +01:00
|
|
|
lib/util-iso.sh \
|
2015-06-15 19:10:34 +02:00
|
|
|
lib/util-iso-aufs.sh \
|
2015-06-25 00:16:18 +02:00
|
|
|
lib/util-iso-overlayfs.sh \
|
2015-01-28 21:05:18 +01:00
|
|
|
lib/util-iso-image.sh \
|
2015-01-29 14:09:05 +01:00
|
|
|
lib/util-iso-calamares.sh \
|
2015-03-04 00:41:05 +01:00
|
|
|
lib/util-iso-boot.sh \
|
2016-02-27 00:39:58 +01:00
|
|
|
lib/util-publish.sh
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
SHARED_ISO = \
|
|
|
|
data/pacman-gfx.conf \
|
2015-12-31 01:56:40 +01:00
|
|
|
data/desktop.map \
|
2015-12-04 00:34:54 +01:00
|
|
|
data/profile.conf.example
|
|
|
|
|
2014-12-04 19:20:40 +01:00
|
|
|
CPIOHOOKS = \
|
2014-12-17 03:44:04 +01:00
|
|
|
initcpio/hooks/miso \
|
2015-06-11 13:59:34 +02:00
|
|
|
initcpio/hooks/miso_overlayfs \
|
2014-12-17 03:44:04 +01:00
|
|
|
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 \
|
2015-06-11 13:59:34 +02:00
|
|
|
initcpio/inst/miso_overlayfs \
|
2014-12-17 03:44:04 +01:00
|
|
|
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
|
|
|
|
2015-05-15 20:10:49 +02:00
|
|
|
MAN_XML = \
|
2015-06-05 09:39:02 +02:00
|
|
|
buildpkg.xml \
|
|
|
|
buildtree.xml \
|
2015-05-25 12:15:46 +02:00
|
|
|
buildiso.xml \
|
2015-11-28 20:46:10 +01:00
|
|
|
deployiso.xml \
|
2015-05-25 12:15:46 +02:00
|
|
|
manjaro-tools.conf.xml \
|
|
|
|
profile.conf.xml
|
2015-05-15 20:10:49 +02:00
|
|
|
|
2015-12-04 00:34:54 +01:00
|
|
|
all: $(BIN_BASE) $(BIN_PKG) $(BIN_ISO) doc
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-12-08 12:33:28 +01:00
|
|
|
edit = sed -e "s|@datadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|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" \
|
2015-06-22 21:45:12 +02:00
|
|
|
-e "s|@version@|${Version}|"
|
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-12-04 00:34:54 +01:00
|
|
|
rm -f $(BIN_BASE) ${BIN_PKG} ${BIN_ISO}
|
2015-05-15 20:10:49 +02:00
|
|
|
rm -rf man
|
2014-10-04 00:46:40 +02:00
|
|
|
|
2015-06-12 03:26:12 +02:00
|
|
|
install_base:
|
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-06-12 03:26:12 +02:00
|
|
|
|
2014-10-04 00:46:40 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
2015-12-04 00:34:54 +01:00
|
|
|
install -m0755 ${BIN_BASE} $(DESTDIR)$(PREFIX)/bin
|
2015-06-11 22:56:13 +02:00
|
|
|
|
2014-10-04 09:09:20 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
2015-12-04 00:34:54 +01:00
|
|
|
install -m0644 ${LIBS_BASE} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
2015-06-11 22:56:13 +02:00
|
|
|
|
2015-06-12 03:26:12 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
2015-12-04 00:34:54 +01:00
|
|
|
install -m0644 ${SHARED_BASE} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
2015-06-12 03:26:12 +02:00
|
|
|
|
|
|
|
install_pkg:
|
2015-12-03 22:54:58 +01:00
|
|
|
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/pkg.d
|
|
|
|
install -m0644 ${SETS_PKG} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/pkg.d
|
2015-06-12 03:26:12 +02:00
|
|
|
|
2014-10-04 00:46:40 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
2015-06-12 01:26:44 +02:00
|
|
|
install -m0755 ${BIN_PKG} $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
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
|
|
|
|
2015-06-12 03:26:12 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
|
|
|
install -m0644 ${LIBS_PKG} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
|
|
|
|
2014-10-04 09:09:20 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
2015-06-12 03:26:12 +02:00
|
|
|
install -m0644 ${SHARED_PKG} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
|
|
|
|
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
|
|
|
|
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
|
|
|
|
|
|
|
|
install_iso:
|
2015-12-03 22:54:58 +01:00
|
|
|
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/iso.d
|
|
|
|
install -m0644 ${SETS_ISO} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/iso.d
|
2015-06-12 03:26:12 +02:00
|
|
|
|
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
|
|
|
install -m0755 ${BIN_ISO} $(DESTDIR)$(PREFIX)/bin
|
|
|
|
|
2014-10-04 09:09:20 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
2015-06-12 03:26:12 +02:00
|
|
|
install -m0644 ${LIBS_ISO} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
2015-06-11 22:56:13 +02:00
|
|
|
|
2014-12-04 19:42:03 +01:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/initcpio/hooks
|
|
|
|
install -m0755 ${CPIOHOOKS} $(DESTDIR)$(PREFIX)/lib/initcpio/hooks
|
2015-06-12 03:26:12 +02:00
|
|
|
|
2014-12-04 19:42:03 +01:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/lib/initcpio/install
|
|
|
|
install -m0755 ${CPIOINST} $(DESTDIR)$(PREFIX)/lib/initcpio/install
|
2015-06-12 03:26:12 +02:00
|
|
|
|
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
|
|
|
install -m0644 ${SHARED_ISO} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
|
|
|
|
2015-06-11 22:56:13 +02:00
|
|
|
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
|
2015-05-25 12:15:46 +02:00
|
|
|
gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
|
2015-11-28 20:51:38 +01:00
|
|
|
gzip -c man/deployiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/deployiso.1.gz
|
2015-06-12 03:26:12 +02:00
|
|
|
|
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-06-12 03:26:12 +02:00
|
|
|
uninstall_base:
|
2015-06-12 01:26:44 +02:00
|
|
|
for f in ${SYSCONF}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
|
2015-12-04 00:34:54 +01:00
|
|
|
for f in ${BIN_BASE}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
|
|
|
for f in ${SHARED_BASE}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
|
|
|
for f in ${LIBS_BASE}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
2015-06-12 03:26:12 +02:00
|
|
|
|
|
|
|
uninstall_pkg:
|
2015-12-03 22:54:58 +01:00
|
|
|
for f in ${SETS_PKG}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/pkg.d/$$f; done
|
2015-06-12 03:26:12 +02:00
|
|
|
for f in ${BIN_PKG}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
2014-10-04 00:46:40 +02:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
|
2015-06-12 03:26:12 +02:00
|
|
|
for f in ${SHARED_PKG}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
|
|
|
for f in ${LIBS_PKG}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildpkg.1.gz
|
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildtree.1.gz
|
2015-06-11 22:56:13 +02:00
|
|
|
|
2015-06-12 03:26:12 +02:00
|
|
|
uninstall_iso:
|
2015-12-03 22:54:58 +01:00
|
|
|
for f in ${SETS_ISO}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/iso.d/$$f; done
|
2015-06-12 03:26:12 +02:00
|
|
|
for f in ${BIN_ISO}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
|
|
|
for f in ${SHARED_ISO}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
|
|
|
for f in ${LIBS_ISO}; 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
|
2015-05-25 12:15:46 +02:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
|
2015-11-28 20:51:38 +01:00
|
|
|
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/deployiso.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-06-12 03:26:12 +02:00
|
|
|
install: install_base install_pkg install_iso
|
|
|
|
|
|
|
|
uninstall: uninstall_base uninstall_pkg uninstall_iso
|
2014-10-04 00:46:40 +02:00
|
|
|
|
|
|
|
dist:
|
2015-06-22 21:47:52 +02:00
|
|
|
git archive --format=tar --prefix=manjaro-tools-$(Version)/ $(Version) | gzip -9 > manjaro-tools-$(Version).tar.gz
|
2015-06-22 21:45:12 +02:00
|
|
|
gpg --detach-sign --use-agent manjaro-tools-$(Version).tar.gz
|
2014-10-04 00:46:40 +02:00
|
|
|
|
|
|
|
.PHONY: all clean install uninstall dist
|