From 5df61f0c9e89725b59d0e975d6e320fa0ea579ba Mon Sep 17 00:00:00 2001 From: Gerardo Exequiel Pozzi Date: Sat, 25 Aug 2012 15:14:51 -0300 Subject: [PATCH] [archiso] Rework Makefile / Reorder files Signed-off-by: Gerardo Exequiel Pozzi --- Makefile | 58 +++++-------------- archiso/{ => initcpio}/hooks/archiso | 0 archiso/{ => initcpio}/hooks/archiso_loop_mnt | 0 .../{ => initcpio}/hooks/archiso_pxe_common | 0 archiso/{ => initcpio}/hooks/archiso_pxe_http | 0 archiso/{ => initcpio}/hooks/archiso_pxe_nbd | 0 archiso/{ => initcpio}/hooks/archiso_pxe_nfs | 0 archiso/{ => initcpio}/hooks/archiso_shutdown | 0 archiso/{ => initcpio}/install/archiso | 0 archiso/{ => initcpio}/install/archiso_kms | 0 .../{ => initcpio}/install/archiso_loop_mnt | 0 .../{ => initcpio}/install/archiso_pxe_common | 0 .../{ => initcpio}/install/archiso_pxe_http | 0 .../{ => initcpio}/install/archiso_pxe_nbd | 0 .../{ => initcpio}/install/archiso_pxe_nfs | 0 .../{ => initcpio}/install/archiso_shutdown | 0 .../{ => initcpio/script}/archiso_shutdown | 0 17 files changed, 16 insertions(+), 42 deletions(-) rename archiso/{ => initcpio}/hooks/archiso (100%) rename archiso/{ => initcpio}/hooks/archiso_loop_mnt (100%) rename archiso/{ => initcpio}/hooks/archiso_pxe_common (100%) rename archiso/{ => initcpio}/hooks/archiso_pxe_http (100%) rename archiso/{ => initcpio}/hooks/archiso_pxe_nbd (100%) rename archiso/{ => initcpio}/hooks/archiso_pxe_nfs (100%) rename archiso/{ => initcpio}/hooks/archiso_shutdown (100%) rename archiso/{ => initcpio}/install/archiso (100%) rename archiso/{ => initcpio}/install/archiso_kms (100%) rename archiso/{ => initcpio}/install/archiso_loop_mnt (100%) rename archiso/{ => initcpio}/install/archiso_pxe_common (100%) rename archiso/{ => initcpio}/install/archiso_pxe_http (100%) rename archiso/{ => initcpio}/install/archiso_pxe_nbd (100%) rename archiso/{ => initcpio}/install/archiso_pxe_nfs (100%) rename archiso/{ => initcpio}/install/archiso_shutdown (100%) rename archiso/{ => initcpio/script}/archiso_shutdown (100%) diff --git a/Makefile b/Makefile index cb5ec1d..0b9e035 100644 --- a/Makefile +++ b/Makefile @@ -1,62 +1,36 @@ V=1 +INSTALL_FILES=$(wildcard archiso/initcpio/install/*) +HOOKS_FILES=$(wildcard archiso/initcpio/hooks/*) +SCRIPT_FILES=$(wildcard archiso/initcpio/script/*) + + +INSTALL_DIR=$(DESTDIR)/usr/lib/initcpio/install +HOOKS_DIR=$(DESTDIR)/usr/lib/initcpio/hooks +SCRIPT_DIR=$(DESTDIR)/usr/lib/initcpio + all: -install: install-program install-hooks install-examples install-doc +install: install-program install-initcpio install-examples install-doc install-program: install -D -m 755 archiso/mkarchiso $(DESTDIR)/usr/sbin/mkarchiso -install-hooks: - # hooks/install are needed by mkinitcpio - install -D -m 644 archiso/hooks/archiso $(DESTDIR)/usr/lib/initcpio/hooks/archiso - install -D -m 644 archiso/install/archiso $(DESTDIR)/usr/lib/initcpio/install/archiso - install -D -m 755 archiso/archiso_shutdown $(DESTDIR)/usr/lib/initcpio/archiso_shutdown - install -D -m 644 archiso/hooks/archiso_shutdown $(DESTDIR)/usr/lib/initcpio/hooks/archiso_shutdown - install -D -m 644 archiso/install/archiso_shutdown $(DESTDIR)/usr/lib/initcpio/install/archiso_shutdown - install -D -m 644 archiso/hooks/archiso_pxe_common $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_common - install -D -m 644 archiso/install/archiso_pxe_common $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_common - install -D -m 644 archiso/hooks/archiso_pxe_nbd $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_nbd - install -D -m 644 archiso/install/archiso_pxe_nbd $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_nbd - install -D -m 644 archiso/hooks/archiso_pxe_http $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_http - install -D -m 644 archiso/install/archiso_pxe_http $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_http - install -D -m 644 archiso/hooks/archiso_pxe_nfs $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_nfs - install -D -m 644 archiso/install/archiso_pxe_nfs $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_nfs - install -D -m 644 archiso/hooks/archiso_loop_mnt $(DESTDIR)/usr/lib/initcpio/hooks/archiso_loop_mnt - install -D -m 644 archiso/install/archiso_loop_mnt $(DESTDIR)/usr/lib/initcpio/install/archiso_loop_mnt - install -D -m 644 archiso/install/archiso_kms $(DESTDIR)/usr/lib/initcpio/install/archiso_kms +install-initcpio: + install -d $(SCRIPT_DIR) $(HOOKS_DIR) $(INSTALL_DIR) + install -m 755 -t $(SCRIPT_DIR) $(SCRIPT_FILES) + install -m 644 -t $(HOOKS_DIR) $(HOOKS_FILES) + install -m 644 -t $(INSTALL_DIR) $(INSTALL_FILES) install-examples: install -d -m 755 $(DESTDIR)/usr/share/archiso/ cp -r configs $(DESTDIR)/usr/share/archiso/ install-doc: - install -d -m 755 $(DESTDIR)/usr/share/archiso/ install -D -m 644 README $(DESTDIR)/usr/share/doc/archiso/README -uninstall: - rm -f $(DESTDIR)/usr/sbin/mkarchiso - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso - rm -f $(DESTDIR)/usr/lib/initcpio/archiso_shutdown - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_shutdown - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_shutdown - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_common - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_common - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_nbd - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_nbd - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_http - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_http - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_pxe_nfs - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_pxe_nfs - rm -f $(DESTDIR)/usr/lib/initcpio/hooks/archiso_loop_mnt - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_loop_mnt - rm -f $(DESTDIR)/usr/lib/initcpio/install/archiso_kms - rm -rf $(DESTDIR)/usr/share/archiso/ - rm -f $(DESTDIR)/usr/share/doc/archiso/README - dist: git archive --format=tar --prefix=archiso-$(V)/ v$(V) | gzip -9 > archiso-$(V).tar.gz gpg --detach-sign --use-agent archiso-$(V).tar.gz -.PHONY: install install-program install-hooks install-examples install-doc uninstall dist +.PHONY: install install-program install-initcpio install-examples install-doc dist diff --git a/archiso/hooks/archiso b/archiso/initcpio/hooks/archiso similarity index 100% rename from archiso/hooks/archiso rename to archiso/initcpio/hooks/archiso diff --git a/archiso/hooks/archiso_loop_mnt b/archiso/initcpio/hooks/archiso_loop_mnt similarity index 100% rename from archiso/hooks/archiso_loop_mnt rename to archiso/initcpio/hooks/archiso_loop_mnt diff --git a/archiso/hooks/archiso_pxe_common b/archiso/initcpio/hooks/archiso_pxe_common similarity index 100% rename from archiso/hooks/archiso_pxe_common rename to archiso/initcpio/hooks/archiso_pxe_common diff --git a/archiso/hooks/archiso_pxe_http b/archiso/initcpio/hooks/archiso_pxe_http similarity index 100% rename from archiso/hooks/archiso_pxe_http rename to archiso/initcpio/hooks/archiso_pxe_http diff --git a/archiso/hooks/archiso_pxe_nbd b/archiso/initcpio/hooks/archiso_pxe_nbd similarity index 100% rename from archiso/hooks/archiso_pxe_nbd rename to archiso/initcpio/hooks/archiso_pxe_nbd diff --git a/archiso/hooks/archiso_pxe_nfs b/archiso/initcpio/hooks/archiso_pxe_nfs similarity index 100% rename from archiso/hooks/archiso_pxe_nfs rename to archiso/initcpio/hooks/archiso_pxe_nfs diff --git a/archiso/hooks/archiso_shutdown b/archiso/initcpio/hooks/archiso_shutdown similarity index 100% rename from archiso/hooks/archiso_shutdown rename to archiso/initcpio/hooks/archiso_shutdown diff --git a/archiso/install/archiso b/archiso/initcpio/install/archiso similarity index 100% rename from archiso/install/archiso rename to archiso/initcpio/install/archiso diff --git a/archiso/install/archiso_kms b/archiso/initcpio/install/archiso_kms similarity index 100% rename from archiso/install/archiso_kms rename to archiso/initcpio/install/archiso_kms diff --git a/archiso/install/archiso_loop_mnt b/archiso/initcpio/install/archiso_loop_mnt similarity index 100% rename from archiso/install/archiso_loop_mnt rename to archiso/initcpio/install/archiso_loop_mnt diff --git a/archiso/install/archiso_pxe_common b/archiso/initcpio/install/archiso_pxe_common similarity index 100% rename from archiso/install/archiso_pxe_common rename to archiso/initcpio/install/archiso_pxe_common diff --git a/archiso/install/archiso_pxe_http b/archiso/initcpio/install/archiso_pxe_http similarity index 100% rename from archiso/install/archiso_pxe_http rename to archiso/initcpio/install/archiso_pxe_http diff --git a/archiso/install/archiso_pxe_nbd b/archiso/initcpio/install/archiso_pxe_nbd similarity index 100% rename from archiso/install/archiso_pxe_nbd rename to archiso/initcpio/install/archiso_pxe_nbd diff --git a/archiso/install/archiso_pxe_nfs b/archiso/initcpio/install/archiso_pxe_nfs similarity index 100% rename from archiso/install/archiso_pxe_nfs rename to archiso/initcpio/install/archiso_pxe_nfs diff --git a/archiso/install/archiso_shutdown b/archiso/initcpio/install/archiso_shutdown similarity index 100% rename from archiso/install/archiso_shutdown rename to archiso/initcpio/install/archiso_shutdown diff --git a/archiso/archiso_shutdown b/archiso/initcpio/script/archiso_shutdown similarity index 100% rename from archiso/archiso_shutdown rename to archiso/initcpio/script/archiso_shutdown