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.

154 lines
4.1 KiB

  1. #
  2. # Copyright (C) 2006-2015 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:=openldap
  9. PKG_VERSION:=2.4.46
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
  12. PKG_SOURCE_URL:=ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \
  13. ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \
  14. ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \
  15. ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/
  16. PKG_HASH:=9a90dcb86b99ae790ccab93b7585a31fbcbeec8c94bf0f7ab0ca0a87ea0c4b2d
  17. PKG_LICENSE:=OLDAP-2.8
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_FIXUP:=autoreconf
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/openldap/Default
  22. TITLE:=LDAP implementation
  23. URL:=http://www.openldap.org/
  24. MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  25. endef
  26. define Package/openldap/Default/description
  27. OpenLDAP Software is an open source implementation of the
  28. Lightweight Directory Access Protocol (LDAP).
  29. endef
  30. define Package/libopenldap
  31. $(call Package/openldap/Default)
  32. SECTION:=libs
  33. CATEGORY:=Libraries
  34. DEPENDS:=+libopenssl +libsasl2 +libpthread
  35. TITLE+= (libraries)
  36. endef
  37. define Package/libopenldap/description
  38. $(call Package/openldap/Default/description)
  39. This package contains the shared LDAP client libraries, needed by other programs.
  40. endef
  41. define Package/libopenldap/conffiles
  42. /etc/openldap/ldap.conf
  43. endef
  44. define Package/openldap-utils
  45. $(call Package/openldap/Default)
  46. SECTION:=utils
  47. CATEGORY:=Utilities
  48. DEPENDS:=+libopenldap
  49. TITLE+= (utilities)
  50. endef
  51. define Package/openldap-utils/description
  52. $(call Package/openldap/Default/description)
  53. This package contains client programs required to access LDAP servers.
  54. endef
  55. define Package/openldap-server
  56. $(call Package/openldap/Default)
  57. SECTION:=net
  58. CATEGORY:=Network
  59. DEPENDS:=+libopenldap +libuuid
  60. TITLE+= (server)
  61. endef
  62. define Package/openldap-server/description
  63. $(call Package/openldap/Default/description)
  64. This package contains server programs required to provide LDAP services.
  65. endef
  66. define Package/openldap-server/conffiles
  67. /etc/openldap/slapd.conf
  68. endef
  69. TARGET_CFLAGS += $(FPIC) -lpthread \
  70. -DURANDOM_DEVICE=\\\"/dev/urandom\\\"
  71. CONFIGURE_ARGS += \
  72. --enable-shared \
  73. --enable-static \
  74. --disable-debug \
  75. --enable-dynamic \
  76. --enable-syslog \
  77. --disable-local \
  78. --disable-slurpd \
  79. --with-cyrus-sasl \
  80. --without-fetch \
  81. --with-threads \
  82. --with-tls \
  83. --with-yielding_select="yes" \
  84. --without-threads \
  85. --enable-null \
  86. --disable-bdb \
  87. --disable-hdb \
  88. --disable-monitor \
  89. --disable-relay
  90. CONFIGURE_VARS += \
  91. ol_cv_lib_icu="no"
  92. define Build/Compile
  93. $(MAKE) -C $(PKG_BUILD_DIR) \
  94. DESTDIR="$(PKG_INSTALL_DIR)" \
  95. HOSTCC="$(HOSTCC)" \
  96. depend all install
  97. endef
  98. define Build/InstallDev
  99. $(INSTALL_DIR) $(1)/usr/include
  100. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
  101. $(INSTALL_DIR) $(1)/usr/lib/
  102. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
  103. endef
  104. define Package/libopenldap/install
  105. $(INSTALL_DIR) $(1)/etc/openldap
  106. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
  109. endef
  110. define Package/openldap-utils/install
  111. $(INSTALL_DIR) $(1)/usr/bin
  112. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
  113. endef
  114. define Package/openldap-server/install
  115. $(INSTALL_DIR) $(1)/etc/init.d
  116. $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
  117. $(INSTALL_DIR) $(1)/etc/openldap/schema
  118. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
  119. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
  120. $(INSTALL_DIR) $(1)/usr/sbin
  121. # XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
  122. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
  123. # XXX: switch default backend to ldif, since bdb is disabled
  124. $(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
  125. -e 's|^\(index\)|#\1|g' \
  126. $(1)/etc/openldap/slapd.conf
  127. endef
  128. $(eval $(call BuildPackage,libopenldap))
  129. $(eval $(call BuildPackage,openldap-utils))
  130. $(eval $(call BuildPackage,openldap-server))