]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
naoki: Automatically install initscripts and pam files.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Feb 2010 20:23:32 +0000 (21:23 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 21 Feb 2010 20:23:32 +0000 (21:23 +0100)
pkgs/Constants
pkgs/Functions

index a5fb776242f07ac0c4dbc2fa25adf8783d4d7944..087330658423492a954622b301078a47d907d481 100644 (file)
@@ -64,6 +64,9 @@ else
        STAGE_DONE = $(ROOT)/.done
 endif
 
+PKG_INIT_FILES = $(wildcard *.init)
+PKG_PAM_FILES = $(wildcard *.pam)
+
 export CFLAGS CXXFLAGS BUILD_HOST
 
 export PKG_NAME PKG_VER PKG_REL PKG_MAINTAINER PKG_GROUP PKG_URL PKG_LICENSE
index 0f349bb0f26510e809fc2db8d8b2c35d9fd3173c..8883a6713b4cfaf09597382a12d7633f45d05e6d 100644 (file)
@@ -12,6 +12,24 @@ define DO_FILELIST
        @cd $(BUILDROOT) && find -ls
 endef
 
+define __INSTALL_INIT
+       -mkdir -pv $(BUILDROOT)/etc/init
+       cd $(DIR_APP) && cp -vf $(DIR_SOURCE)/$(1) $(BUILDROOT)/etc/init/$(subst .init,.conf,$(1))
+endef
+
+define DO_INSTALL_INIT
+       $(foreach file,$(PKG_INIT_FILES),$(call __INSTALL_INIT,$(file)))
+endef
+
+define __INSTALL_PAM
+       -mkdir -pv $(BUILDROOT)/etc/pam.d
+       cd $(DIR_APP) && cp -vf $(DIR_SOURCE)/$(1) $(BUILDROOT)/etc/pam.d/$(subst .pam,,$(1))
+endef
+
+define DO_INSTALL_PAM
+       $(foreach file,$(PKG_PAM_FILES),$(call __INSTALL_PAM,$(file)))
+endef
+
 define DO_PREPARE
        @echo "#####################################################################"
        @echo "# $(PKG_NAME) - Preparation started"
@@ -55,6 +73,9 @@ define DO_INSTALL
 
        $(STAGE_INSTALL)
 
+       $(DO_INSTALL_INIT)
+       $(DO_INSTALL_PAM)
+
        @echo "#####################################################################"
        @echo "# $(PKG_NAME) - Install finished"
        @echo "#####################################################################"