Makefile 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. # $OpenBSD: Makefile,v 1.61 2017/04/10 11:46:22 sthen Exp $
  2. COMMENT-main= authentication library for courier
  3. COMMENT-ldap= ldap authentication module for courier-authLib
  4. COMMENT-mysql= mysql authentication module for courier-authLib
  5. COMMENT-pgsql= pgsql authentication module for courier-authLib
  6. COMMENT-userdb= userdb authentication module for courier-authLib
  7. DISTNAME= courier-authlib-0.67.0
  8. PKGNAME-main= ${DISTNAME}
  9. PKGNAME-ldap= ${DISTNAME:S/lib-/lib-ldap-/}
  10. PKGNAME-mysql= ${DISTNAME:S/lib-/lib-mysql-/}
  11. PKGNAME-pgsql= ${DISTNAME:S/lib-/lib-pgsql-/}
  12. PKGNAME-userdb= ${DISTNAME:S/lib-/lib-userdb-/}
  13. SHARED_LIBS += courierauth 1.0 # .0.0
  14. SHARED_LIBS += courierauthsasl 1.0 # .0.0
  15. SHARED_LIBS += courierauthsaslclient 0.0 # .0.0
  16. SHARED_LIBS += courierauthcommon 1.0 # .0.0
  17. SHARED_LIBS += authuserdb 0.0 # .0.0
  18. SHARED_LIBS += authpwd 0.0 # .0.0
  19. SHARED_LIBS += authpgsql 0.0 # .0.0
  20. SHARED_LIBS += authldap 1.0 # .0.0
  21. SHARED_LIBS += authmysql 0.0 # .0.0
  22. SHARED_LIBS += authpipe 0.0 # .0.0
  23. SHARED_LIBS += authsqlite 0.0 # .0.0
  24. CATEGORIES= mail security
  25. HOMEPAGE= http://www.courier-mta.org/authlib/
  26. MAINTAINER= Giovanni Bechis <giovanni@openbsd.org>
  27. # GPLv3
  28. PERMIT_PACKAGE_CDROM= Yes
  29. MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
  30. EXTRACT_SUFX= .tar.bz2
  31. USE_GMAKE= Yes
  32. CONFIGURE_STYLE= gnu
  33. CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib" \
  34. LDFLAGS="-L${LOCALBASE}/lib" \
  35. CPPFLAGS="-I${LOCALBASE}/include" \
  36. ac_cv_lib_db_dbopen=no \
  37. ac_cv_lib_db_db_env_create=no
  38. COURIERSTATE= /var/run/courier-auth
  39. EXAMPLE_DIR= ${PREFIX}/share/examples/courier-authlib
  40. SUBST_VARS= COURIERSTATE EXAMPLE_DIR
  41. CONFIGURE_ARGS+= --enable-static \
  42. --without-authpam \
  43. --without-authvchkpw \
  44. --without-authcustom \
  45. --with-authpwd \
  46. --with-authshadow \
  47. --with-mailuser=_courier \
  48. --with-mailgroup=_courier \
  49. --with-pkgconfdir=${SYSCONFDIR}/courier \
  50. --with-authdaemonvar=${COURIERSTATE} \
  51. --libdir=${PREFIX}/lib \
  52. --includedir=${PREFIX}/include \
  53. --enable-ltdl-install=no \
  54. --with-ltdl-lib=${LOCALBASE}/lib \
  55. --with-ltdl-include=${LOCALBASE}/include \
  56. --cache-file=${WRKDIR}/courier-authlib.cache
  57. RUN_DEPENDS-main= lang/expect
  58. BUILD_DEPENDS= lang/expect \
  59. mail/courier-unicode
  60. DOCS= COPYING COPYING.GPL INSTALL NEWS README
  61. MODULES= devel/gettext \
  62. textproc/intltool
  63. MULTI_PACKAGES= -main -ldap -mysql -pgsql -userdb
  64. PSEUDO_FLAVORS= no_ldap no_mysql no_pgsql no_userdb
  65. FLAVOR?=
  66. WANTLIB-main= c ltdl pthread sqlite3
  67. LIB_DEPENDS-main= databases/sqlite3 \
  68. devel/libtool,-ltdl
  69. WANTLIB-ldap= crypto ssl courierauthcommon courierauth \
  70. ldap-2.4 lber-2.4 sasl2
  71. RUN_DEPENDS-ldap=
  72. LIB_DEPENDS-ldap= ${BUILD_PKGPATH} \
  73. databases/openldap \
  74. security/cyrus-sasl2
  75. WANTLIB-mysql= crypto m ssl z courierauthcommon courierauth \
  76. mysqlclient pthread ${LIBCXX}
  77. RUN_DEPENDS-mysql=
  78. LIB_DEPENDS-mysql= ${BUILD_PKGPATH} \
  79. databases/mariadb
  80. WANTLIB-pgsql= m courierauthcommon courierauth pq crypto ssl
  81. RUN_DEPENDS-pgsql=
  82. LIB_DEPENDS-pgsql= ${BUILD_PKGPATH} \
  83. databases/postgresql
  84. WANTLIB-userdb= c courierauthcommon courierauth \
  85. gdbm>=3 ${MODGETTEXT_WANTLIB}
  86. LIB_DEPENDS-userdb= ${BUILD_PKGPATH} \
  87. ${MODGETTEXT_LIB_DEPENDS} \
  88. databases/gdbm
  89. .include <bsd.port.arch.mk>
  90. .if ${BUILD_PACKAGES:M-ldap}
  91. CONFIGURE_ARGS+= --with-authldap
  92. DOCS+= README.ldap
  93. .else
  94. CONFIGURE_ARGS+= --without-authldap
  95. .endif
  96. .if ${BUILD_PACKAGES:M-mysql}
  97. CONFIGURE_ARGS+= --with-authmysql \
  98. --with-mysql-libs=${LOCALBASE}/lib/mysql \
  99. --with-mysql-includes=${LOCALBASE}/include/mysql
  100. DOCS+= README.authmysql.myownquery
  101. .else
  102. CONFIGURE_ARGS+= --without-authmysql
  103. .endif
  104. .if ${BUILD_PACKAGES:M-pgsql}
  105. CONFIGURE_ARGS+= --with-authpgsql \
  106. --with-pgsql-libs=${LOCALBASE}/lib \
  107. --with-pgsql-includes=${LOCALBASE}/include/postgresql
  108. .else
  109. CONFIGURE_ARGS+= --without-authpgsql
  110. .endif
  111. .if ${BUILD_PACKAGES:M-userdb}
  112. CONFIGURE_ARGS+= --with-makedatprog=${PREFIX}/libexec/courier-authlib/makedatprog \
  113. --with-authuserdb \
  114. --with-db=gdbm
  115. .else
  116. CONFIGURE_ARGS+= --without-authuserdb \
  117. --without-makedatprog
  118. .endif
  119. post-install:
  120. mv ${PREFIX}/lib/courier-authlib/lib* ${PREFIX}/lib
  121. ${INSTALL_SCRIPT} ${WRKSRC}/sysconftool \
  122. ${PREFIX}/libexec/courier-authlib/sysconftool
  123. ${INSTALL_SCRIPT} ${WRKSRC}/authmigrate \
  124. ${PREFIX}/libexec/courier-authlib/authmigrate
  125. ${INSTALL_DATA_DIR} ${EXAMPLE_DIR}
  126. @mv ${WRKINST}${SYSCONFDIR}/courier/*.dist ${EXAMPLE_DIR}
  127. @chown root:wheel ${EXAMPLE_DIR}/*
  128. .if ${BUILD_PACKAGES:M-ldap}
  129. ${INSTALL_DATA} ${WRKSRC}/authldap.schema ${EXAMPLE_DIR}
  130. .endif
  131. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/courier-authlib
  132. .for i in ${DOCS}
  133. ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/courier-authlib
  134. .endfor
  135. chmod a+r ${PREFIX}/share/examples/courier-authlib/*.dist
  136. .include <bsd.port.mk>