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.

149 lines
4.0 KiB

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