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.

114 lines
2.6 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=shadow
  9. PKG_VERSION:=4.2.1
  10. PKG_RELEASE:=1
  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. PKG_BUILD_DEPENDS:=libintl
  20. include $(INCLUDE_DIR)/package.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. DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
  42. endef
  43. define Package/shadow/description
  44. Full versions of standard shadow utilities. Normally, you would not
  45. use this package, since the functionality in BusyBox is more than
  46. sufficient and much smaller.
  47. endef
  48. define Package/shadow/install
  49. true
  50. endef
  51. define Package/shadow-common
  52. $(call Package/shadow/Default)
  53. TITLE:=Shared definitions for the PLD Linux shadow utilities
  54. endef
  55. define GenPlugin
  56. define Package/shadow-$(1)
  57. $(call Package/shadow/Default)
  58. TITLE:=Utility $(1) from the PLD Linux shadow utilities
  59. DEPENDS:=+shadow-common
  60. endef
  61. define Package/shadow-$(1)/description
  62. Full version of standard $(1) utility. Normally, you would not use this
  63. package, since the functionality in BusyBox is more than sufficient.
  64. endef
  65. endef
  66. $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
  67. define Package/shadow-common/conffiles
  68. /etc/login.defs
  69. endef
  70. define Package/shadow-common/install
  71. $(INSTALL_DIR) $(1)/etc
  72. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
  73. endef
  74. define BuildPlugin
  75. define Package/shadow-$(1)/install
  76. [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
  77. $(INSTALL_DIR) $$(1)/usr/sbin; \
  78. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
  79. } || { \
  80. $(INSTALL_DIR) $$(1)/usr/bin; \
  81. $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
  82. }
  83. endef
  84. $$(eval $$(call BuildPackage,shadow-$(1)))
  85. endef
  86. $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
  87. $(eval $(call BuildPackage,shadow))
  88. $(eval $(call BuildPackage,shadow-common))