Add ISC/BSD to PKG_LICENSE_*
[feed/packages.git] / utils / shadow / Makefile
1 #
2 # Copyright (C) 2008-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=shadow
11 PKG_VERSION:=4.1.5.1
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
16 PKG_MD5SUM:=a00449aa439c69287b6d472191dc2247
17 PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
18
19 PKG_FIXUP:=autoreconf
20 PKG_BUILD_PARALLEL:=1
21 PKG_INSTALL:=1
22
23 PKG_BUILD_DEPENDS:=libintl
24
25 include $(INCLUDE_DIR)/package.mk
26
27 SHADOW_APPLETS := \
28 chage groupadd groupdel groupmod groups passwd su \
29 useradd userdel usermod
30
31 CONFIGURE_ARGS += \
32 --without-audit \
33 --without-libpam \
34 --without-selinux \
35 --without-acl \
36 --without-attr \
37 --without-tcb \
38 --without-nscd
39
40 define Package/shadow/Default
41 SECTION:=utils
42 CATEGORY:=Utilities
43 TITLE:=The PLD Linux shadow utilities
44 URL:=http://pkg-shadow.alioth.debian.org/
45 endef
46
47 define Package/shadow
48 $(call Package/shadow/Default)
49 DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
50 endef
51
52 define Package/shadow/description
53 Full versions of standard shadow utilities. Normally, you would not
54 use this package, since the functionality in BusyBox is more than
55 sufficient and much smaller.
56 endef
57
58 define Package/shadow/install
59 true
60 endef
61
62
63 define Package/shadow-common
64 $(call Package/shadow/Default)
65 TITLE:=Shared definitions for the PLD Linux shadow utilities
66 endef
67
68
69 define GenPlugin
70 define Package/shadow-$(1)
71 $(call Package/shadow/Default)
72 TITLE:=Utility $(1) from the PLD Linux shadow utilities
73 DEPENDS:=+shadow-common
74 endef
75
76 define Package/shadow-$(1)/description
77 Full version of standard $(1) utility. Normally, you would not use this
78 package, since the functionality in BusyBox is more than sufficient.
79 endef
80 endef
81
82 $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
83
84
85 define Package/shadow-common/conffiles
86 /etc/login.defs
87 endef
88
89 define Package/shadow-common/install
90 $(INSTALL_DIR) $(1)/etc
91 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
92 endef
93
94
95 define BuildPlugin
96 define Package/shadow-$(1)/install
97 [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
98 $(INSTALL_DIR) $$(1)/usr/sbin; \
99 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
100 } || { \
101 $(INSTALL_DIR) $$(1)/usr/bin; \
102 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
103 }
104 endef
105
106 $$(eval $$(call BuildPackage,shadow-$(1)))
107 endef
108
109 $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
110
111 $(eval $(call BuildPackage,shadow))
112 $(eval $(call BuildPackage,shadow-common))