2 # Copyright (C) 2008-2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=https
://github.com
/shadow-maint
/shadow
/releases
/download
/$(PKG_VERSION
)
16 PKG_HASH
:=a3ad4630bdc41372f02a647278a8c3514844295d36eefe68ece6c3a641c1ae62
19 PKG_LICENSE
:=BSD-3-Clause
20 PKG_LICENSE_FILES
:=COPYING
21 PKG_CPE_ID
:=cpe
:/a
:debian
:shadow
25 PKG_BUILD_DEPENDS
:=libxcrypt
27 include $(INCLUDE_DIR
)/package.mk
28 include $(INCLUDE_DIR
)/nls.mk
31 chage chfn chgpasswd chpasswd chsh expiry faillog gpasswd \
32 groupadd groupdel groupmems groupmod groups grpck grpconv grpunconv \
33 lastlog login logoutd newgidmap newgrp newuidmap newusers nologin \
34 passwd pwck pwconv pwunconv su \
35 useradd userdel usermod vipw
50 define Package
/shadow
/Default
53 TITLE
:=The PLD Linux shadow utilities
54 URL
:=https
://github.com
/shadow-maint
/shadow
58 $(call Package
/shadow
/Default
)
60 DEPENDS
:=$(foreach u
,$(SHADOW_APPLETS
),+shadow-
$(u
))
64 define Package
/shadow
/description
65 Full versions of standard shadow utilities. Normally
, you would not
66 use this package
, since the functionality in BusyBox is more than
67 sufficient and much smaller.
70 define Package
/shadow
/install
74 define Package
/shadow-utils
75 $(call Package
/shadow
/Default
)
78 define Package
/shadow-utils
/config
79 menu
"Select shadow utilities"
80 depends on PACKAGE_shadow-utils
83 bool
"Include all PLD shadow utilities"
89 $(foreach u
,$(SHADOW_APPLETS
), \
90 config PACKAGE_shadow-
$(u
)
91 prompt
"Full PLD version of $(u) utility"
99 Package
/shadow-utils
/description
= $(Package
/shadow
/description
)
101 define Package
/shadow-common
102 $(call Package
/shadow
/Default
)
103 TITLE
:=Shared definitions for the PLD Linux shadow utilities
104 DEPENDS
:=$(ICONV_DEPENDS
) $(INTL_DEPENDS
)
109 define Package
/shadow-
$(1)
110 $(call Package
/shadow
/Default
)
111 TITLE
:=Utility
$(1) from the PLD Linux shadow utilities
112 DEPENDS
:=+shadow-common
116 define Package
/shadow-
$(1)/description
117 Full version of standard
$(1) utility. Normally
, you would not use this
118 package
, since the functionality in BusyBox is more than sufficient.
122 $(foreach u
,$(SHADOW_APPLETS
),$(eval
$(call GenPlugin
,$(u
))))
124 define Package
/shadow-common
/conffiles
128 #hack to get libxcrypt working
129 TARGET_LDFLAGS
:=-L
$(STAGING_DIR
)/usr
/lib
/libxcrypt
$(TARGET_LDFLAGS
)
131 define Package
/shadow-common
/install
132 $(INSTALL_DIR
) $(1)/etc
133 $(INSTALL_CONF
) $(PKG_INSTALL_DIR
)/etc
/login.defs
$(1)/etc
/
134 $(SED
) 's,SU_NAME,#SU_NAME,g' $(1)/etc
/login.defs
135 $(SED
) 's,#ENCRYPT_METHOD DES,ENCRYPT_METHOD BCRYPT,g' $(1)/etc
/login.defs
138 define Package
/shadow-utils
/install
143 define Package
/shadow-
$(1)/install
144 [ -x
"$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
145 $(INSTALL_DIR
) $$(1)/usr
/sbin
; \
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/sbin
/$(1) $$(1)/usr
/sbin
/; \
148 $(INSTALL_DIR
) $$(1)/usr
/bin
; \
149 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/$(1) $$(1)/usr
/bin
/; \
153 $$(eval
$$(call BuildPackage
,shadow-
$(1)))
156 $(foreach u
,$(SHADOW_APPLETS
),$(eval
$(call BuildPlugin
,$(u
))))
158 $(eval
$(call BuildPackage
,shadow-utils
))
159 $(eval
$(call BuildPackage
,shadow-common
))
160 $(eval
$(call BuildPackage
,shadow
))