[Makefile] update

This commit is contained in:
udeved 2015-06-12 03:26:12 +02:00
parent 3a2b3918d5
commit 80be65064f

185
Makefile
View file

@ -11,19 +11,19 @@ BIN = \
bin/chroot-run
BIN_PKG = \
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
bin/checkpkg \
bin/lddd \
bin/finddeps \
bin/find-libdeps \
bin/signpkg \
bin/signpkgs \
bin/mkchrootpkg \
bin/buildpkg \
bin/buildtree
BIN_ISO = \
bin/iso/buildiso \
bin/iso/testiso
bin/buildiso \
bin/testiso
SYSCONF = \
conf/manjaro-tools.conf
@ -38,13 +38,17 @@ SETS_ISO = \
sets/iso/openrc.set
SHARED = \
conf/makepkg-i686.conf \
conf/makepkg-x86_64.conf \
conf/pacman-default.conf \
conf/pacman-multilib.conf \
conf/pacman-mirrors-stable.conf \
conf/pacman-mirrors-testing.conf \
conf/pacman-mirrors-unstable.conf \
conf/pacman-mirrors-unstable.conf
SHARED_PKG = \
conf/makepkg-i686.conf \
conf/makepkg-x86_64.conf
SHARED_ISO = \
conf/pacman-gfx.conf \
conf/pacman-lng.conf \
conf/profile.conf.example
@ -56,17 +60,17 @@ LIBS = \
lib/util-fstab.sh
LIBS_PKG = \
lib/pkg/util-pkg.sh \
lib/pkg/util-pkgtree.sh
lib/util-pkg.sh \
lib/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
lib/util-iso.sh \
lib/util-iso-fs.sh \
lib/util-iso-image.sh \
lib/util-iso-calamares.sh \
lib/util-livecd.sh \
lib/util-iso-boot.sh \
lib/util-iso-log.sh
CPIOHOOKS = \
initcpio/hooks/miso \
@ -118,83 +122,120 @@ doc:
$(foreach var,$(MAN_XML),xsltproc /usr/share/docbook2X/xslt/man/docbook.xsl docbook/$(var) | db2x_manxml --output-dir man ;)
clean:
rm -f $(BIN) #bin/bash_completion bin/zsh_completion
rm -f $(BIN) ${BIN_PKG} ${BIN_ISO} #bin/bash_completion bin/zsh_completion
rm -rf man
install:
install_base:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
install -m0644 ${SYSCONF} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
install -m0644 ${SETS_PKG} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
install -m0644 ${SETS_ISO} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools/pkg
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools/iso
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
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
install -m0644 ${LIBS_PKG} $(DESTDIR)$(PREFIX)/lib/manjaro-tools/pkg
install -m0644 ${LIBS_ISO} $(DESTDIR)$(PREFIX)/lib/manjaro-tools/iso
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
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
install -m0644 ${EFISHELL} $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -m0644 ${SHARED} $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
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
gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man5
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
# 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
uninstall:
install_pkg:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
install -m0644 ${SETS_PKG} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg
install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -m0755 ${BIN_PKG} $(DESTDIR)$(PREFIX)/bin
ln -sf find-libdeps $(DESTDIR)$(PREFIX)/bin/find-libprovides
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
install -m0644 ${LIBS_PKG} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
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:
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
install -m0644 ${SETS_ISO} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso
install -dm0755 $(DESTDIR)$(PREFIX)/bin
install -m0755 ${BIN_ISO} $(DESTDIR)$(PREFIX)/bin
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
install -m0644 ${LIBS_ISO} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
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
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -m0644 ${SHARED_ISO} $(DESTDIR)$(PREFIX)/share/manjaro-tools
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
install -m0644 ${SCRIPTS} $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
install -m0644 ${EFISHELL} $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man1
gzip -c man/buildiso.1 > $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
install -dm0755 $(DESTDIR)$(PREFIX)/share/man/man5
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
uninstall_base:
for f in ${SYSCONF}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/$$f; done
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
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
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
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
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildset.1.gz
# rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
# rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools
uninstall_pkg:
for f in ${SETS_PKG}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/pkg/$$f; done
for f in ${BIN_PKG}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
rm -f $(DESTDIR)$(PREFIX)/bin/find-libprovides
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
uninstall_iso:
for f in ${SETS_ISO}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/sets/iso/$$f; done
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
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
for f in ${SCRIPTS}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/scripts/$$f; done
for f in ${EFISHELL}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/efi_shell/$$f; done
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
rm -f $(DESTDIR)$(PREFIX)/share/man/man1/buildiso.1.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
# rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
# rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools
install: install_base install_pkg install_iso
uninstall: uninstall_base uninstall_pkg uninstall_iso
dist:
git archive --format=tar --prefix=manjaro-tools-$(V)/ $(V) | gzip -9 > manjaro-tools-$(V).tar.gz