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