From: Luka Perkov Date: Sat, 4 May 2013 23:14:44 +0000 (+0000) Subject: [package] shadow: rework Makefile X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;hb=be7c09ce65e088d5255696b61f668ac74f9309ec [package] shadow: rework Makefile Signed-off-by: Luka Perkov SVN-Revision: 36547 --- diff --git a/utils/shadow/Makefile b/utils/shadow/Makefile index 7b9c3523dc..fd2df65f25 100644 --- a/utils/shadow/Makefile +++ b/utils/shadow/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2008-2012 OpenWrt.org +# Copyright (C) 2008-2013 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -16,12 +16,12 @@ PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases PKG_MD5SUM:=a00449aa439c69287b6d472191dc2247 PKG_FIXUP:=autoreconf - +PKG_BUILD_PARALLEL:=1 PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk -UTILS := \ +SHADOW_APPLETS := \ chage groupadd groupdel groupmod groups passwd su \ useradd userdel usermod @@ -34,16 +34,20 @@ CONFIGURE_ARGS += \ --without-tcb \ --without-nscd -define Package/shadow +define Package/shadow/Default SECTION:=utils CATEGORY:=Utilities TITLE:=The PLD Linux shadow utilities URL:=http://pkg-shadow.alioth.debian.org/ - DEPENDS:=$(foreach u,$(UTILS),+shadow-$(u)) +endef + +define Package/shadow + $(call Package/shadow/Default) + MENU:=1 endef define Package/shadow/description - Full versions of standard shadow utilities. Normally, you would not + Full versions of standard shadow utilities. Normally, you would not use this package, since the functionality in BusyBox is more than sufficient and much smaller. endef @@ -54,36 +58,39 @@ endef define Package/shadow-common - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Shared definitions for the shadow utilities - URL:=http://pkg-shadow.alioth.debian.org/ + $(call Package/shadow/Default) + TITLE:=Shared definitions for the PLD Linux shadow utilities + DEPENDS:=shadow endef -define Package/shadow-common/conffiles -/etc/login.defs -endef - -define Package/shadow-common/install - $(INSTALL_DIR) $(1)/etc - $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/ -endef - -define program +define GenPlugin define Package/shadow-$(1) - SECTION:=utils - CATEGORY:=Utilities + $(call Package/shadow/Default) TITLE:=Utility $(1) from the PLD Linux shadow utilities - URL:=http://pkg-shadow.alioth.debian.org/ - DEPENDS:=+shadow-common + DEPENDS:=shadow +shadow-common endef define Package/shadow-$(1)/description Full version of standard $(1) utility. Normally, you would not use this package, since the functionality in BusyBox is more than sufficient. endef +endef + +$(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u)))) + + +define Package/shadow-common/conffiles +/etc/login.defs +endef +define Package/shadow-common/install + $(INSTALL_DIR) $(1)/etc + $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/ +endef + + +define BuildPlugin define Package/shadow-$(1)/install [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \ $(INSTALL_DIR) $$(1)/usr/sbin; \ @@ -97,6 +104,7 @@ define program $$(eval $$(call BuildPackage,shadow-$(1))) endef +$(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u)))) + $(eval $(call BuildPackage,shadow)) $(eval $(call BuildPackage,shadow-common)) -$(foreach u,$(UTILS),$(eval $(call program,$(u))))