Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= openldap
  5. PKG_VERSION:= 2.4.25
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= ec63f9c2add59f323a0459128846905b
  8. PKG_DESCR:= OpenLDAP client libraries
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libopenssl libsasl2
  11. PKG_BUILDDEP:= cyrus-sasl openssl db
  12. PKG_URL:= http://www.openldap.org/
  13. PKG_SITES:= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/
  14. PKG_NEED_CXX:= 1
  15. PKG_SUBPKGS:= LIBOPENLDAP LIBOPENLDAP_DEV OPENLDAP_UTILS OPENLDAP_SLAPD
  16. PKGSD_LIBOPENLDAP_DEV:= OpenLDAP headers
  17. PKGSC_LIBOPENLDAP_DEV:= devel
  18. PKGSD_OPENLDAP_UTILS:= OpenLDAP utilities
  19. PKGSS_OPENLDAP_UTILS:= libopenldap
  20. PKGSC_OPENLDAP_UTILS:= net/misc
  21. PKGSD_OPENLDAP_SLAPD:= OpenLDAP server daemon
  22. PKGSS_OPENLDAP_SLAPD:= libopenldap
  23. PKGSC_OPENLDAP_SLAPD:= net/misc
  24. DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz
  25. PKG_FLAVOURS_OPENLDAP_SLAPD:= WITH_IPV6
  26. PKGFD_WITH_IPV6:= enable IPv6 support
  27. include ${TOPDIR}/mk/package.mk
  28. $(eval $(call PKG_template,LIBOPENLDAP,libopenldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  29. $(eval $(call PKG_template,LIBOPENLDAP_DEV,libopenldap-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBOPENLDAP_DEV},${PKGSC_LIBOPENLDAP_DEV}))
  30. $(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENLDAP_UTILS},${PKGSD_OPENLDAP_UTILS},${PKGSC_OPENLDAP_UTILS}))
  31. $(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENLDAP_SLAPD},${PKGSD_OPENLDAP_SLAPD},${PKGSC_OPENLDAP_SLAPD}))
  32. PKG_CONFIGURE_OPTIONS+= --enable-slapd \
  33. --libexecdir=/usr/sbin \
  34. --enable-bdb \
  35. --disable-hdb \
  36. --disable-relay \
  37. --enable-dynamic \
  38. --enable-syslog \
  39. --enable-local \
  40. --disable-syncprov \
  41. --without-fetch \
  42. --with-cyrus-sasl \
  43. --with-threads \
  44. --with-tls \
  45. --with-yielding_select="yes" \
  46. ifneq (${ADK_PACKAGE_OPENLDAP_SLAPD_WITH_IPV6},)
  47. CONFIGURE_ARGS+= --enable-ipv6
  48. else
  49. CONFIGURE_ARGS+= --disable-ipv6
  50. endif
  51. CONFIGURE_ENV+= ac_cv_func_memcmp_working=yes
  52. CONFIGURE_ARGS+= ${PKG_CONFIGURE_OPTIONS}
  53. XAKE_FLAGS+= STRIP="" CPPFLAGS="-D_GNU_SOURCE"
  54. pre-configure:
  55. (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \
  56. CPPFLAGS=-D_GNU_SOURCE ./configure \
  57. ${PKG_CONFIGURE_OPTIONS} \
  58. --disable-slapd \
  59. --without-cyrus-sasl \
  60. --without-threads \
  61. --without-tls \
  62. );
  63. ${MAKE} -C ${WRKBUILD} depend
  64. ${MAKE} -C ${WRKBUILD}/libraries/liblutil
  65. ${MAKE} -C ${WRKBUILD}/libraries/liblber
  66. ${MAKE} -C ${WRKBUILD}/libraries/liblunicode
  67. ${MAKE} -C ${WRKBUILD}/libraries/liblber clean
  68. ${MAKE} -C ${WRKBUILD}/libraries/liblutil clean
  69. ${MAKE} -C ${WRKBUILD}/libraries/liblunicode clean
  70. libopenldap-install:
  71. ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/etc/openldap
  72. ${CP} ${WRKINST}/etc/openldap/ldap.conf \
  73. ${IDIR_LIBOPENLDAP}/etc/openldap
  74. ${INSTALL_DIR} ${IDIR_LIBOPENLDAP}/usr/lib
  75. ${CP} ${WRKINST}/usr/lib/lib{lber,ldap}*.so* \
  76. ${IDIR_LIBOPENLDAP}/usr/lib
  77. libopenldap-dev-install:
  78. ${INSTALL_DIR} ${IDIR_LIBOPENLDAP_DEV}/usr/include
  79. ${CP} ${WRKINST}/usr/include/* \
  80. ${IDIR_LIBOPENLDAP_DEV}/usr/include
  81. openldap-utils-install:
  82. ${INSTALL_DIR} ${IDIR_OPENLDAP_UTILS}/usr/bin
  83. ${CP} ${WRKINST}/usr/bin/ldap* ${IDIR_OPENLDAP_UTILS}/usr/bin/
  84. openldap-slapd-install:
  85. ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema
  86. ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/usr/sbin
  87. ${CP} ${WRKINST}/usr/sbin/slap* ${IDIR_OPENLDAP_SLAPD}/usr/sbin
  88. ${INSTALL_DATA} ${WRKINST}/etc/openldap/schema/core.schema \
  89. ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema
  90. ${INSTALL_DATA} ./files/slapd.conf ${IDIR_OPENLDAP_SLAPD}/etc/openldap
  91. include ${TOPDIR}/mk/pkg-bottom.mk