Makefile 4.0 KB

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