You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
3.3 KiB

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