From: Michael Tremer Date: Sun, 21 Feb 2010 20:23:32 +0000 (+0100) Subject: naoki: Automatically install initscripts and pam files. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75b075ab606fcaf559f7332fee92f74edf51a4d7;p=ipfire-3.x.git naoki: Automatically install initscripts and pam files. --- diff --git a/pkgs/Constants b/pkgs/Constants index a5fb77624..087330658 100644 --- a/pkgs/Constants +++ b/pkgs/Constants @@ -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 diff --git a/pkgs/Functions b/pkgs/Functions index 0f349bb0f..8883a6713 100644 --- a/pkgs/Functions +++ b/pkgs/Functions @@ -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 "#####################################################################"