No Description

Makefile 3.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  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:=2
  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 libiconv
  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. 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/install
  54. endef
  55. define Package/shadow-utils
  56. $(call Package/shadow/Default)
  57. DEPENDS:=+ALL:shadow
  58. endef
  59. define Package/shadow-utils/config
  60. menu "Select shadow utilities"
  61. depends on PACKAGE_shadow-utils
  62. config shadow-all
  63. bool "Include all PLD shadow utilities"
  64. select PACKAGE_shadow
  65. comment "Utilities"
  66. $(foreach u,$(SHADOW_APPLETS), \
  67. config PACKAGE_shadow-$(u)
  68. prompt "Full PLD version of $(u) utility"
  69. )
  70. endmenu
  71. endef
  72. Package/shadow-utils/description = $(Package/shadow/description)
  73. define Package/shadow-common
  74. $(call Package/shadow/Default)
  75. TITLE:=Shared definitions for the PLD Linux shadow utilities
  76. HIDDEN:=1
  77. endef
  78. define GenPlugin
  79. define Package/shadow-$(1)
  80. $(call Package/shadow/Default)
  81. TITLE:=Utility $(1) from the PLD Linux shadow utilities
  82. DEPENDS:=+shadow-common
  83. HIDDEN:=1
  84. endef
  85. define Package/shadow-$(1)/description
  86. Full version of standard $(1) utility. Normally, you would not use this
  87. package, since the functionality in BusyBox is more than sufficient.
  88. endef
  89. endef
  90. $(foreach u,$(SHADOW_APPLETS),$(eval $(call GenPlugin,$(u))))
  91. define Package/shadow-common/conffiles
  92. /etc/login.defs
  93. endef
  94. define Package/shadow-common/install
  95. $(INSTALL_DIR) $(1)/etc
  96. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/login.defs $(1)/etc/
  97. endef
  98. define BuildPlugin
  99. define Package/shadow-$(1)/install
  100. [ -x "$(PKG_INSTALL_DIR)/usr/sbin/$(1)" ] && { \
  101. $(INSTALL_DIR) $$(1)/usr/sbin; \
  102. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/$(1) $$(1)/usr/sbin/; \
  103. } || { \
  104. $(INSTALL_DIR) $$(1)/usr/bin; \
  105. $(CP) $(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/; \
  106. }
  107. endef
  108. $$(eval $$(call BuildPackage,shadow-$(1)))
  109. endef
  110. $(foreach u,$(SHADOW_APPLETS),$(eval $(call BuildPlugin,$(u))))
  111. $(eval $(call BuildPackage,shadow-utils))
  112. $(eval $(call BuildPackage,shadow-common))
  113. $(eval $(call BuildPackage,shadow))