packages/boxbackup: remove trailing whitespaces
[openwrt/svn-archive/archive.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
18 PKG_FIXUP:=autoreconf
19 PKG_BUILD_PARALLEL:=1
20 PKG_INSTALL:=1
21
22 PKG_BUILD_DEPENDS:=libintl
23
24 include $(INCLUDE_DIR)/package.mk
25
26 SHADOW_APPLETS := \
27 chage groupadd groupdel groupmod groups passwd su \
28 useradd userdel usermod
29
30 CONFIGURE_ARGS += \
31 --without-audit \
32 --without-libpam \
33 --without-selinux \
34 --without-acl \
35 --without-attr \
36 --without-tcb \
37 --without-nscd
38
39 define Package/shadow/Default
40 SECTION:=utils
41 CATEGORY:=Utilities
42 TITLE:=The PLD Linux shadow utilities
43 URL:=http://pkg-shadow.alioth.debian.org/
44 endef
45
46 define Package/shadow
47 $(call Package/shadow/Default)
48 DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
49 endef
50
51 define Package/shadow/description
52 Full versions of standard shadow utilities. Normally, you would not
53 use this package, since the functionality in BusyBox is more than
54 sufficient and much smaller.
55 endef
56
57 define Package/shadow/install
58 true
59 endef
60
61
62 define Package/shadow-common
63 $(call Package/shadow/Default)
64 TITLE:=Shared definitions for the PLD Linux shadow utilities
65 endef
66
67
68 define GenPlugin
69 define Package/shadow-$(1)
70 $(call Package/shadow/Default)
71 TITLE:=Utility $(1) from the PLD Linux shadow utilities
72 DEPENDS:=+shadow-common
73 endef
74
75 define Package/shadow-$(1)/description
76 Full version of standard $(1) utility. Normally, you would not use this
77 package, since the functionality in BusyBox is more than sufficient.
78 endef
79 endef
80
81 $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
82
83
84 define Package/shadow-common/conffiles
85 /etc/login.defs
86 endef
87
88 define Package/shadow-common/install
89 $(INSTALL_DIR) $(1)/etc
90 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
91 endef
92
93
94 define BuildPlugin
95 define Package/shadow-$(1)/install
96 [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
97 $(INSTALL_DIR) $$(1)/usr/sbin; \
98 $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
99 } || { \
100 $(INSTALL_DIR) $$(1)/usr/bin; \
101 $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
102 }
103 endef
104
105 $$(eval $$(call BuildPackage,shadow-$(1)))
106 endef
107
108 $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
109
110 $(eval $(call BuildPackage,shadow))
111 $(eval $(call BuildPackage,shadow-common))