Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # $OpenBSD: Makefile,v 1.96 2017/04/10 11:46:33 sthen Exp $
  2. COMMENT= RFC 2222 SASL (Simple Authentication and Security Layer)
  3. DISTNAME= cyrus-sasl-2.1.26
  4. REVISION= 21
  5. SHARED_LIBS += sasl2 3.0 # 3.0
  6. CATEGORIES= security
  7. HOMEPAGE= http://www.cyrusimap.org/
  8. MAINTAINER= Antoine Jacoutot <ajacoutot@openbsd.org>
  9. # see the COPYRIGHT file in package sources
  10. PERMIT_PACKAGE_CDROM= yes
  11. MASTER_SITES= ftp://ftp.cyrusimap.org/cyrus-sasl/
  12. WANTLIB += c crypto
  13. MODGNU_CONFIG_GUESS_DIRS=${WRKSRC}/config ${WRKSRC}/saslauthd/config
  14. CONFIGURE_STYLE= gnu
  15. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  16. LIBS="-L${LOCALBASE}/lib"
  17. CONFIGURE_ARGS= --enable-static \
  18. --without-pam \
  19. --without-sqlite \
  20. --with-saslauthd="/var/sasl2" \
  21. --with-plugindir=${PREFIX}/lib/sasl2 \
  22. --enable-login \
  23. --enable-ntlm \
  24. --enable-auth-sasldb \
  25. --disable-sample
  26. CFLAGS += -fPIC
  27. FLAVORS= db4 gssapi ldap mysql pgsql sqlite3
  28. FLAVOR?=
  29. .if ${FLAVOR:Mdb4}
  30. CONFIGURE_ARGS += --with-dblib=berkeley \
  31. --with-bdb-libdir="${LOCALBASE}/lib/db4" \
  32. --with-bdb-incdir="${LOCALBASE}/include/db4"
  33. LIB_DEPENDS += databases/db/v4
  34. WANTLIB += lib/db4/db>=4
  35. .else
  36. CONFIGURE_ARGS += --with-dblib=ndbm \
  37. --without-bdb-libdir \
  38. --without-bdb-incdir
  39. .endif
  40. .if ${FLAVOR:Mgssapi}
  41. CONFIGURE_ARGS += --enable-gssapi=${LOCALBASE}/heimdal
  42. MODULES += security/heimdal
  43. WANTLIB += heimdal/lib/gssapi
  44. WANTLIB += heimdal/lib/heimntlm
  45. WANTLIB += heimdal/lib/heimsqlite
  46. .endif
  47. .if ${FLAVOR:Mldap}
  48. LIB_DEPENDS += databases/openldap
  49. CONFIGURE_ARGS += --with-ldap=${LOCALBASE} \
  50. --enable-ldapdb
  51. WANTLIB += lber lber-2.4 ldap ldap-2.4 ssl
  52. .else
  53. CONFIGURE_ARGS += --without-ldap
  54. .endif
  55. .if ${FLAVOR:Mmysql} || ${FLAVOR:Mpgsql} || ${FLAVOR:Msqlite3}
  56. CONFIGURE_ARGS += --enable-sql
  57. PKG_ARGS= -Dsql=1
  58. .else
  59. CONFIGURE_ARGS += --disable-sql
  60. PKG_ARGS= -Dsql=0
  61. .endif
  62. .if ${FLAVOR:Mmysql}
  63. LIB_DEPENDS += databases/mariadb
  64. WANTLIB+= m pthread ssl ${LIBCXX} z lib/mysql/mysqlclient
  65. .else
  66. CONFIGURE_ARGS += --without-mysql
  67. .endif
  68. .if ${FLAVOR:Mpgsql}
  69. LIB_DEPENDS += databases/postgresql
  70. CFLAGS += -I${LOCALBASE}/include/postgresql
  71. WANTLIB += pq ssl
  72. .else
  73. CONFIGURE_ARGS += --without-pgsql
  74. .endif
  75. .if ${FLAVOR:Msqlite3}
  76. LIB_DEPENDS += databases/sqlite3
  77. WANTLIB += pthread sqlite3
  78. .else
  79. CONFIGURE_ARGS += --without-sqlite3
  80. .endif
  81. pre-configure:
  82. sed -i -e "s,/usr/local/etc,${SYSCONFDIR},g" \
  83. ${WRKSRC}/saslauthd/saslauthd.mdoc \
  84. ${WRKSRC}/saslauthd/LDAP_SASLAUTHD
  85. post-install:
  86. rm ${PREFIX}/lib/sasl2/*.a
  87. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/cyrus-sasl
  88. ${INSTALL_DATA} ${WRKSRC}/doc/{*.html,*.txt} ${PREFIX}/share/doc/cyrus-sasl
  89. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/cyrus-sasl
  90. ${INSTALL_DATA} ${FILESDIR}/Sendmail.conf-sql \
  91. ${PREFIX}/share/examples/cyrus-sasl
  92. .if ${FLAVOR:Mldap}
  93. ${INSTALL_DATA} ${WRKSRC}/saslauthd/LDAP_SASLAUTHD \
  94. ${PREFIX}/share/doc/cyrus-sasl
  95. ${SUBST_DATA} ${FILESDIR}/saslauthd.conf \
  96. ${PREFIX}/share/examples/cyrus-sasl/saslauthd.conf
  97. .endif
  98. .include <bsd.port.mk>