Makefile 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. # $OpenBSD: Makefile,v 1.152 2017/06/03 13:17:41 sthen Exp $
  2. DPB_PROPERTIES = parallel
  3. COMMENT-main = open-source LDAP software (client)
  4. COMMENT-server = open-source LDAP software (server)
  5. DISTNAME = openldap-2.4.45
  6. PKGNAME-main = ${DISTNAME:S/-/-client-/}
  7. PKGNAME-server = ${DISTNAME:S/-/-server-/}
  8. # overwrite -main pkgname/path to strip FLAVOR, aci only affects the server
  9. FULLPKGNAME-main = ${DISTNAME:S/-/-client-/}${FLAVOR_EXT:S/-aci//}
  10. FULLPKGPATH-main = databases/openldap,-main${FLAVOR_EXT:S/-aci//:S/-/,/g}
  11. SHARED_LIBS += lber 12.0 # 12.6
  12. SHARED_LIBS += lber-2.4 12.0
  13. SHARED_LIBS += ldap 13.1 # 12.6
  14. SHARED_LIBS += ldap-2.4 13.1
  15. SHARED_LIBS += ldap_r 13.1
  16. SHARED_LIBS += ldap_r-2.4 13.1
  17. CATEGORIES = databases net
  18. HOMEPAGE = http://www.openldap.org/
  19. MAINTAINER = Stuart Henderson <sthen@openbsd.org>
  20. # OpenLDAP Public License
  21. PERMIT_PACKAGE_CDROM = Yes
  22. WANTLIB += c crypto ssl
  23. MASTER_SITES = http://mirror.switch.ch/ftp/mirror/OpenLDAP/openldap-release/ \
  24. http://gd.tuwien.ac.at/infosys/network/OpenLDAP/openldap-release/ \
  25. http://mirror.aarnet.edu.au/pub/openldap/openldap-release/ \
  26. ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/ \
  27. http://ftp.ntua.gr/mirror/OpenLDAP/openldap-release/
  28. EXTRACT_SUFX = .tgz
  29. SEPARATE_BUILD = Yes
  30. AUTOCONF_VERSION = 2.65
  31. CONFIGURE_STYLE = autoconf
  32. # formatting is ok with mandoc, but it uses soelim
  33. USE_GROFF = Yes
  34. FLAVOR ?=
  35. FLAVORS = aci gssapi
  36. CONFIGURE_ARGS += --enable-ipv6 \
  37. --with-tls=openssl
  38. # slapd options
  39. CONFIGURE_ARGS += --enable-slapd \
  40. --enable-cleartext \
  41. --enable-crypt \
  42. --enable-rewrite \
  43. --with-cyrus-sasl \
  44. --enable-spasswd
  45. # slapd modules
  46. CONFIGURE_ARGS += --enable-bdb \
  47. --enable-dnssrv \
  48. --enable-hdb \
  49. --enable-ldap \
  50. --enable-meta \
  51. --enable-monitor \
  52. --enable-null \
  53. --enable-overlays \
  54. --enable-passwd \
  55. --enable-perl \
  56. --enable-shell
  57. # MDB assumes UBC; see http://www.openldap.org/pub/hyc/mdm-paper.pdf
  58. # section 3.1, references 17, 18, and 19.
  59. #
  60. # However, note (from Howard Chu): "This requirement can be relaxed in
  61. # the current version of the library. If you create the environment
  62. # with the MDB_WRITEMAP option then all reads and writes are performed
  63. # using mmap, so the file buffer cache is irrelevant. Of course then
  64. # you lose the protection that the read-only map offers."
  65. #
  66. # A patch has been added to this port to enforce that MDB_WRITEMAP is
  67. # used, however crashes have been seen with mdb in use, so this is
  68. # disabled at this time.
  69. #
  70. CONFIGURE_ARGS += --disable-mdb
  71. .if ${FLAVOR:Maci}
  72. CONFIGURE_ARGS += --enable-aci
  73. .endif
  74. .if ${FLAVOR:Mgssapi}
  75. CONFIGURE_ARGS += --enable-gssapi=${LOCALBASE}/heimdal
  76. MODULES += security/heimdal
  77. WANTLIB += heimdal/lib/gssapi
  78. WANTLIB += heimdal/lib/heimntlm
  79. WANTLIB += heimdal/lib/heimsqlite
  80. .endif
  81. MODGNU_CONFIG_GUESS_DIRS = ${WRKSRC} ${WRKSRC}/build
  82. TEST_TARGET = test
  83. MULTI_PACKAGES = -main -server
  84. LIB_DEPENDS += security/cyrus-sasl2
  85. WANTLIB += pthread sasl2
  86. CPPFLAGS += -I${LOCALBASE}/include/sasl
  87. LIB_DEPENDS-server = ${LIB_DEPENDS-main} \
  88. sysutils/e2fsprogs \
  89. textproc/icu4c \
  90. databases/db/v4,no_java,no_tcl
  91. CONFIGURE_ENV += CPPFLAGS="-I${LOCALBASE}/include/sasl -I${LOCALBASE}/include/db4 -I${LOCALBASE}/include" \
  92. LDFLAGS="-L${LOCALBASE}/lib/db4 -L${LOCALBASE}/lib"
  93. RUN_DEPENDS-server = databases/openldap,-main
  94. WANTLIB-server += ${WANTLIB} perl m icudata icuuc uuid
  95. WANTLIB-server += ${LIBCXX} lib/db4/db>=4
  96. pre-build:
  97. @cd ${WRKBUILD}; ${MAKE_PROGRAM} depend
  98. post-install:
  99. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openldap
  100. ${INSTALL_DATA} ${DESTDIR}${SYSCONFDIR}/openldap/*.conf \
  101. ${PREFIX}/share/examples/openldap
  102. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openldap/schema
  103. ${INSTALL_DATA} ${DESTDIR}${SYSCONFDIR}/openldap/schema/*.schema \
  104. ${PREFIX}/share/examples/openldap/schema
  105. ${INSTALL_DATA} ${WRKSRC}/servers/slapd/DB_CONFIG \
  106. ${PREFIX}/share/examples/openldap
  107. @rm -rf ${DESTDIR}${SYSCONFDIR}/openldap
  108. .include <bsd.port.mk>