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.

148 lines
4.0 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.43
  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:=49ca65e27891fcf977d78c10f073c705
  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-threads \
  82. --enable-null \
  83. --disable-bdb \
  84. --disable-hdb \
  85. --disable-monitor \
  86. --disable-relay
  87. define Build/Compile
  88. $(MAKE) -C $(PKG_BUILD_DIR) \
  89. DESTDIR="$(PKG_INSTALL_DIR)" \
  90. HOSTCC="$(HOSTCC)" \
  91. depend all install
  92. endef
  93. define Build/InstallDev
  94. $(INSTALL_DIR) $(1)/usr/include
  95. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
  96. $(INSTALL_DIR) $(1)/usr/lib/
  97. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
  98. endef
  99. define Package/libopenldap/install
  100. $(INSTALL_DIR) $(1)/etc/openldap
  101. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
  102. $(INSTALL_DIR) $(1)/usr/lib
  103. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
  104. endef
  105. define Package/openldap-utils/install
  106. $(INSTALL_DIR) $(1)/usr/bin
  107. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
  108. endef
  109. define Package/openldap-server/install
  110. $(INSTALL_DIR) $(1)/etc/init.d
  111. $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
  112. $(INSTALL_DIR) $(1)/etc/openldap/schema
  113. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
  114. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
  115. $(INSTALL_DIR) $(1)/usr/sbin
  116. # XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
  117. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
  118. # XXX: switch default backend to ldif, since bdb is disabled
  119. $(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
  120. -e 's|^\(index\)|#\1|g' \
  121. $(1)/etc/openldap/slapd.conf
  122. endef
  123. $(eval $(call BuildPackage,libopenldap))
  124. $(eval $(call BuildPackage,openldap-utils))
  125. $(eval $(call BuildPackage,openldap-server))