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.

112 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.1.5.1
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://pkg-shadow.alioth.debian.org/releases
  13. PKG_MD5SUM:=a00449aa439c69287b6d472191dc2247
  14. PKG_MAINTAINER:=Steven Barth <cyrus@openwrt.org>
  15. PKG_FIXUP:=autoreconf
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. PKG_BUILD_DEPENDS:=libintl
  19. include $(INCLUDE_DIR)/package.mk
  20. SHADOW_APPLETS := \
  21. chage groupadd groupdel groupmod groups passwd su \
  22. useradd userdel usermod
  23. CONFIGURE_ARGS += \
  24. --without-audit \
  25. --without-libpam \
  26. --without-selinux \
  27. --without-acl \
  28. --without-attr \
  29. --without-tcb \
  30. --without-nscd
  31. define Package/shadow/Default
  32. SECTION:=utils
  33. CATEGORY:=Utilities
  34. TITLE:=The PLD Linux shadow utilities
  35. URL:=http://pkg-shadow.alioth.debian.org/
  36. endef
  37. define Package/shadow
  38. $(call Package/shadow/Default)
  39. DEPENDS:=$(foreach u,$(SHADOW_APPLETS),+shadow-$(u))
  40. endef
  41. define Package/shadow/description
  42. Full versions of standard shadow utilities. Normally, you would not
  43. use this package, since the functionality in BusyBox is more than
  44. sufficient and much smaller.
  45. endef
  46. define Package/shadow/install
  47. true
  48. endef
  49. define Package/shadow-common
  50. $(call Package/shadow/Default)
  51. TITLE:=Shared definitions for the PLD Linux shadow utilities
  52. endef
  53. define GenPlugin
  54. define Package/shadow-$(1)
  55. $(call Package/shadow/Default)
  56. TITLE:=Utility $(1) from the PLD Linux shadow utilities
  57. DEPENDS:=+shadow-common
  58. endef
  59. define Package/shadow-$(1)/description
  60. Full version of standard $(1) utility. Normally, you would not use this
  61. package, since the functionality in BusyBox is more than sufficient.
  62. endef
  63. endef
  64. $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
  65. define Package/shadow-common/conffiles
  66. /etc/login.defs
  67. endef
  68. define Package/shadow-common/install
  69. $(INSTALL_DIR) $(1)/etc
  70. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
  71. endef
  72. define BuildPlugin
  73. define Package/shadow-$(1)/install
  74. [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
  75. $(INSTALL_DIR) $$(1)/usr/sbin; \
  76. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
  77. } || { \
  78. $(INSTALL_DIR) $$(1)/usr/bin; \
  79. $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
  80. }
  81. endef
  82. $$(eval $$(call BuildPackage,shadow-$(1)))
  83. endef
  84. $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
  85. $(eval $(call BuildPackage,shadow))
  86. $(eval $(call BuildPackage,shadow-common))