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.

153 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.45
  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:=cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824
  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. CONFIGURE_ARGS += \
  71. --enable-shared \
  72. --enable-static \
  73. --disable-debug \
  74. --enable-dynamic \
  75. --enable-syslog \
  76. --disable-local \
  77. --disable-slurpd \
  78. --with-cyrus-sasl \
  79. --without-fetch \
  80. --with-threads \
  81. --with-tls \
  82. --with-yielding_select="yes" \
  83. --without-threads \
  84. --enable-null \
  85. --disable-bdb \
  86. --disable-hdb \
  87. --disable-monitor \
  88. --disable-relay
  89. CONFIGURE_VARS += \
  90. ol_cv_lib_icu="no"
  91. define Build/Compile
  92. $(MAKE) -C $(PKG_BUILD_DIR) \
  93. DESTDIR="$(PKG_INSTALL_DIR)" \
  94. HOSTCC="$(HOSTCC)" \
  95. depend all install
  96. endef
  97. define Build/InstallDev
  98. $(INSTALL_DIR) $(1)/usr/include
  99. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/include/{lber,ldap}*.h $(1)/usr/include/
  100. $(INSTALL_DIR) $(1)/usr/lib/
  101. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.{a,so*} $(1)/usr/lib/
  102. endef
  103. define Package/libopenldap/install
  104. $(INSTALL_DIR) $(1)/etc/openldap
  105. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/ldap.conf $(1)/etc/openldap/
  106. $(INSTALL_DIR) $(1)/usr/lib
  107. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{lber,ldap}*.so.* $(1)/usr/lib/
  108. endef
  109. define Package/openldap-utils/install
  110. $(INSTALL_DIR) $(1)/usr/bin
  111. $(CP) $(PKG_INSTALL_DIR)/usr/bin/ldap* $(1)/usr/bin/
  112. endef
  113. define Package/openldap-server/install
  114. $(INSTALL_DIR) $(1)/etc/init.d
  115. $(INSTALL_BIN) ./files/ldap.init $(1)/etc/init.d/ldap
  116. $(INSTALL_DIR) $(1)/etc/openldap/schema
  117. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/schema/* $(1)/etc/openldap/schema/
  118. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/openldap/slapd.conf $(1)/etc/openldap/
  119. $(INSTALL_DIR) $(1)/usr/sbin
  120. # XXX: OpenLDAP installs slapd into libexecdir, not sbindir:
  121. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/slapd $(1)/usr/sbin/
  122. # XXX: switch default backend to ldif, since bdb is disabled
  123. $(SED) 's|^\(database\)\([ \t]\+\)bdb|\1\2ldif|g' \
  124. -e 's|^\(index\)|#\1|g' \
  125. $(1)/etc/openldap/slapd.conf
  126. endef
  127. $(eval $(call BuildPackage,libopenldap))
  128. $(eval $(call BuildPackage,openldap-utils))
  129. $(eval $(call BuildPackage,openldap-server))