From: Michael Tremer Date: Sat, 26 Mar 2011 19:57:07 +0000 (+0100) Subject: build-essentials: Add support for systemd unit files. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03c731562af673b69d5bb30d5df70326d6bda3eb;p=ipfire-3.x.git build-essentials: Add support for systemd unit files. Dropping support for upstart. References #149. --- diff --git a/pkgs/build-essentials/build-essentials.nm b/pkgs/build-essentials/build-essentials.nm index 6509f73cb..5c8997999 100644 --- a/pkgs/build-essentials/build-essentials.nm +++ b/pkgs/build-essentials/build-essentials.nm @@ -26,7 +26,7 @@ include $(PKGROOT)/Include PKG_NAME = build-essentials PKG_VER = $(DISTRO_VERSION) -PKG_REL = 13 +PKG_REL = 14 PKG_EPOCH = 1 PKG_ARCH = noarch diff --git a/pkgs/build-essentials/buildsystem/Constants b/pkgs/build-essentials/buildsystem/Constants index 0bc56c112..fde3c39d3 100644 --- a/pkgs/build-essentials/buildsystem/Constants +++ b/pkgs/build-essentials/buildsystem/Constants @@ -48,6 +48,8 @@ CONFIGURE_OPTIONS = \ --build=$(DISTRO_MACHINE) \ --prefix=/usr +SYSTEMD_UNIT_DIR = /lib/systemd/system + ############################################################################### # # Packager variables @@ -140,10 +142,9 @@ DO_PATCHES = cd $(DIR_APP) && $(BUILD_TOOLS)/patch \ # Get a list of files that are installed automatically PKG_DEFAULT_FILES = $(wildcard $(DIR_SOURCE)/*.default) PKG_DEFAULT_FILES += $(wildcard $(DIR_SOURCE)/default/*) -PKG_INIT_FILES = $(wildcard $(DIR_SOURCE)/*.init) -PKG_INIT_FILES += $(wildcard $(DIR_SOURCE)/init/*.conf) PKG_PAM_FILES = $(wildcard $(DIR_SOURCE)/*.pam) PKG_PAM_FILES += $(wildcard $(DIR_SOURCE)/pam.d/*) +PKG_SYSTEMD_FILES += $(wildcard $(DIR_SOURCE)/systemd/*) ############################################################################### # diff --git a/pkgs/build-essentials/buildsystem/Functions b/pkgs/build-essentials/buildsystem/Functions index 53cceb6a8..b4a629cd2 100644 --- a/pkgs/build-essentials/buildsystem/Functions +++ b/pkgs/build-essentials/buildsystem/Functions @@ -59,14 +59,14 @@ define DO_INSTALL_DEFAULT $(foreach file,$(PKG_DEFAULT_FILES),$(call __INSTALL_DEFAULT,$(file))) endef -define __INSTALL_INIT - -mkdir -pv $(BUILDROOT)/etc/init - cd $(DIR_APP) && cp -vf $(1) $(BUILDROOT)/etc/init/$(subst .init,.conf,$(notdir $(1))) +define __INSTALL_SYSTEMD + -mkdir -pv $(BUILDROOT)$(SYSTEMD_UNIT_DIR) + cd $(DIR_APP) && cp -vf $(1) $(BUILDROOT)$(SYSTEMD_UNIT_DIR)/$(notdir $(1)) endef -define DO_INSTALL_INIT - $(foreach file,$(PKG_INIT_FILES),$(call __INSTALL_INIT,$(file))) +define DO_INSTALL_SYSTEMD + $(foreach file,$(PKG_SYSTEMD_FILES),$(call __INSTALL_SYSTEMD,$(file))) endef define __INSTALL_PAM @@ -141,7 +141,7 @@ define DO_INSTALL $(STAGE_INSTALL) $(DO_INSTALL_DEFAULT) - $(DO_INSTALL_INIT) + $(DO_INSTALL_SYSTEMD) $(DO_INSTALL_PAM) @echo "#####################################################################"