forked from mirrored-repos/manjaro-tools
clean up Makefile
This commit is contained in:
parent
0876404faf
commit
44570ca07c
4 changed files with 47 additions and 59 deletions
106
Makefile
106
Makefile
|
@ -3,13 +3,33 @@ Version=0.9.15
|
|||
PREFIX = /usr/local
|
||||
SYSCONFDIR = /etc
|
||||
|
||||
BIN = \
|
||||
SYSCONF = \
|
||||
data/manjaro-tools.conf
|
||||
|
||||
BIN_BASE = \
|
||||
bin/mkchroot \
|
||||
bin/basestrap \
|
||||
bin/manjaro-chroot \
|
||||
bin/fstabgen \
|
||||
bin/chroot-run
|
||||
|
||||
LIBS_BASE = \
|
||||
lib/util.sh \
|
||||
lib/util-mount.sh \
|
||||
lib/util-msg.sh \
|
||||
lib/util-pac-conf.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
|
||||
|
||||
BIN_PKG = \
|
||||
bin/checkpkg \
|
||||
bin/lddd \
|
||||
|
@ -21,16 +41,14 @@ BIN_PKG = \
|
|||
bin/buildpkg \
|
||||
bin/buildtree
|
||||
|
||||
BIN_ISO = \
|
||||
bin/buildiso \
|
||||
bin/testiso \
|
||||
bin/deployiso
|
||||
LIBS_PKG = \
|
||||
lib/util-pkg.sh \
|
||||
lib/util-pkgtree.sh
|
||||
|
||||
SYSCONF = \
|
||||
data/manjaro-tools.conf
|
||||
|
||||
SETS_PKG = \
|
||||
data/pkg.d/default.set
|
||||
SHARED_PKG = \
|
||||
data/makepkg-i686.conf \
|
||||
data/base-devel-udev \
|
||||
data/makepkg-x86_64.conf
|
||||
|
||||
SETS_ISO = \
|
||||
data/iso.d/default.set \
|
||||
|
@ -38,32 +56,10 @@ SETS_ISO = \
|
|||
data/iso.d/community.set \
|
||||
data/iso.d/community-minimal.set
|
||||
|
||||
SHARED = \
|
||||
data/pacman-default.conf \
|
||||
data/pacman-multilib.conf \
|
||||
data/pacman-mirrors-stable.conf \
|
||||
data/pacman-mirrors-testing.conf \
|
||||
data/pacman-mirrors-unstable.conf
|
||||
|
||||
SHARED_PKG = \
|
||||
data/makepkg-i686.conf \
|
||||
data/base-devel-udev \
|
||||
data/makepkg-x86_64.conf
|
||||
|
||||
SHARED_ISO = \
|
||||
data/pacman-gfx.conf \
|
||||
data/profile.conf.example
|
||||
|
||||
LIBS = \
|
||||
lib/util.sh \
|
||||
lib/util-mount.sh \
|
||||
lib/util-msg.sh \
|
||||
lib/util-pac-conf.sh \
|
||||
lib/util-fstab.sh
|
||||
|
||||
LIBS_PKG = \
|
||||
lib/util-pkg.sh \
|
||||
lib/util-pkgtree.sh
|
||||
BIN_ISO = \
|
||||
bin/buildiso \
|
||||
bin/testiso \
|
||||
bin/deployiso
|
||||
|
||||
LIBS_ISO = \
|
||||
lib/util-iso.sh \
|
||||
|
@ -76,6 +72,10 @@ LIBS_ISO = \
|
|||
lib/util-publish.sh \
|
||||
lib/util-iso-log.sh
|
||||
|
||||
SHARED_ISO = \
|
||||
data/pacman-gfx.conf \
|
||||
data/profile.conf.example
|
||||
|
||||
CPIOHOOKS = \
|
||||
initcpio/hooks/miso \
|
||||
initcpio/hooks/miso_overlayfs \
|
||||
|
@ -92,9 +92,9 @@ CPIOINST = \
|
|||
initcpio/inst/miso_kms
|
||||
|
||||
SCRIPTS = \
|
||||
scripts/mhwd-live \
|
||||
scripts/livecd \
|
||||
scripts/kbd-model-map
|
||||
data/scripts/mhwd-live \
|
||||
data/scripts/livecd \
|
||||
data/scripts/kbd-model-map
|
||||
|
||||
MAN_XML = \
|
||||
buildpkg.xml \
|
||||
|
@ -104,7 +104,7 @@ MAN_XML = \
|
|||
manjaro-tools.conf.xml \
|
||||
profile.conf.xml
|
||||
|
||||
all: $(BIN) $(BIN_PKG) $(BIN_ISO) doc #bin/bash_completion bin/zsh_completion
|
||||
all: $(BIN_BASE) $(BIN_PKG) $(BIN_ISO) doc
|
||||
|
||||
edit = sed -e "s|@pkgdatadir[@]|$(DESTDIR)$(PREFIX)/share/manjaro-tools|g" \
|
||||
-e "s|@sysconfdir[@]|$(DESTDIR)$(SYSCONFDIR)/manjaro-tools|g" \
|
||||
|
@ -123,7 +123,7 @@ 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_PKG} ${BIN_ISO} #bin/bash_completion bin/zsh_completion
|
||||
rm -f $(BIN_BASE) ${BIN_PKG} ${BIN_ISO}
|
||||
rm -rf man
|
||||
|
||||
install_base:
|
||||
|
@ -131,17 +131,13 @@ install_base:
|
|||
install -m0644 ${SYSCONF} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/bin
|
||||
install -m0755 ${BIN} $(DESTDIR)$(PREFIX)/bin
|
||||
install -m0755 ${BIN_BASE} $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
||||
install -m0644 ${LIBS} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
||||
install -m0644 ${LIBS_BASE} $(DESTDIR)$(PREFIX)/lib/manjaro-tools
|
||||
|
||||
install -dm0755 $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
install -m0644 ${SHARED} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
|
||||
# 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
|
||||
|
||||
install -m0644 ${SHARED_BASE} $(DESTDIR)$(PREFIX)/share/manjaro-tools
|
||||
|
||||
install_pkg:
|
||||
install -dm0755 $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/pkg.d
|
||||
|
@ -162,7 +158,6 @@ install_pkg:
|
|||
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/iso.d
|
||||
install -m0644 ${SETS_ISO} $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/iso.d
|
||||
|
@ -193,16 +188,11 @@ install_iso:
|
|||
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 ${BIN}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||
for f in ${SHARED}; do rm -f $(DESTDIR)$(PREFIX)/share/manjaro-tools/$$f; done
|
||||
for f in ${LIBS}; do rm -f $(DESTDIR)$(PREFIX)/lib/manjaro-tools/$$f; done
|
||||
|
||||
# rm $(DESTDIR)/$(PREFIX)/share/bash-completion/completions/manjaro_tools
|
||||
# rm $(DESTDIR)$(PREFIX)/share/zsh/site-functions/_manjaro_tools
|
||||
|
||||
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
|
||||
|
||||
uninstall_pkg:
|
||||
for f in ${SETS_PKG}; do rm -f $(DESTDIR)$(SYSCONFDIR)/manjaro-tools/pkg.d/$$f; done
|
||||
|
@ -213,7 +203,6 @@ uninstall_pkg:
|
|||
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/iso.d/$$f; done
|
||||
for f in ${BIN_ISO}; do rm -f $(DESTDIR)$(PREFIX)/bin/$$f; done
|
||||
|
@ -227,7 +216,6 @@ uninstall_iso:
|
|||
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/manjaro-tools.conf.5.gz
|
||||
rm -f $(DESTDIR)$(PREFIX)/share/man/man5/profile.conf.5.gz
|
||||
|
||||
|
||||
install: install_base install_pkg install_iso
|
||||
|
||||
uninstall: uninstall_base uninstall_pkg uninstall_iso
|
||||
|
|
Loading…
Reference in a new issue