Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # $OpenBSD: Makefile,v 1.255 2017/06/05 15:26:32 sthen Exp $
  2. COMMENT-server= compact IMAP/POP3 server
  3. COMMENT-ldap= LDAP authentication / dictionary support for Dovecot
  4. COMMENT-mysql= MySQL authentication / dictionary support for Dovecot
  5. COMMENT-postgresql= PostgreSQL authentication / dictionary support for Dovecot
  6. V_MAJOR= 2.2
  7. V_DOVECOT= 2.2.30.1
  8. DISTNAME= dovecot-${V_DOVECOT}
  9. PKGNAME= dovecot-${V_DOVECOT}
  10. PKGNAME-server= dovecot-${V_DOVECOT}
  11. PKGSPEC-server= dovecot-=${V_DOVECOT}
  12. PKGNAME-ldap= dovecot-ldap-${V_DOVECOT}
  13. PKGNAME-mysql= dovecot-mysql-${V_DOVECOT}
  14. PKGNAME-postgresql= dovecot-postgresql-${V_DOVECOT}
  15. CATEGORIES= mail
  16. MASTER_SITES= ${HOMEPAGE}releases/${V_MAJOR}/
  17. SHARED_LIBS= dovecot-compression 0.0 \
  18. dovecot-dsync 0.0 \
  19. dovecot-fts 0.0 \
  20. dovecot-lda 2.0 \
  21. dovecot-ldap 0.0 \
  22. dovecot-login 2.0 \
  23. dovecot-sql 2.0 \
  24. dovecot-storage 2.0 \
  25. dovecot 2.0
  26. HOMEPAGE= https://dovecot.org/
  27. MAINTAINER= Brad Smith <brad@comstyle.com>
  28. # LGPLv2.1 and MIT
  29. PERMIT_PACKAGE_CDROM= Yes
  30. WANTLIB-server= bz2 c crypto iconv lz4 lzma pthread sqlite3 ssl z
  31. WANTLIB-ldap= crypto lber-2.4 ldap-2.4 sasl2 ssl lib/dovecot/dovecot
  32. WANTLIB-mysql= crypto m lib/mysql/mysqlclient pthread ssl ${LIBCXX} z
  33. WANTLIB-postgresql= crypto pq>=4 ssl
  34. LIB_DEPENDS+= archivers/bzip2 \
  35. archivers/lz4 \
  36. archivers/xz \
  37. converters/libiconv \
  38. databases/sqlite3
  39. LIB_DEPENDS-ldap= ${BASE_PKGPATH} \
  40. databases/openldap
  41. LIB_DEPENDS-mysql= databases/mariadb
  42. RUN_DEPENDS-mysql= ${BASE_PKGPATH}
  43. LIB_DEPENDS-postgresql= databases/postgresql
  44. RUN_DEPENDS-postgresql= ${BASE_PKGPATH}
  45. CONFIGURE_STYLE= gnu
  46. CONFIGURE_ARGS= --with-rundir=/var/dovecot \
  47. --with-sql=plugin \
  48. --with-sqlite \
  49. --with-statedir=/var/dovecot \
  50. --without-icu \
  51. --without-nss \
  52. --without-pam \
  53. --without-shadow \
  54. --without-stemmer \
  55. --without-textcat \
  56. --without-vpopmail
  57. CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  58. LDFLAGS="-L${LOCALBASE}/lib"
  59. PSEUDO_FLAVORS= no_db no_ldap no_mysql no_postgresql
  60. FLAVOR?=
  61. .if ${FLAVOR:Mno_db}
  62. FLAVOR+= no_ldap no_mysql no_postgresql
  63. .endif
  64. MULTI_PACKAGES= -server -ldap -mysql -postgresql
  65. SUBPACKAGE?= -server
  66. .include <bsd.port.arch.mk>
  67. .if ${BUILD_PACKAGES:M-ldap}
  68. CONFIGURE_ARGS+=--with-ldap=plugin
  69. .endif
  70. .if ${BUILD_PACKAGES:M-mysql}
  71. CONFIGURE_ARGS+=--with-mysql
  72. .endif
  73. .if ${BUILD_PACKAGES:M-postgresql}
  74. CONFIGURE_ARGS+=--with-pgsql
  75. .endif
  76. pre-build:
  77. @${SUBST_CMD} ${WRKSRC}/doc/example-config/conf.d/10-mail.conf
  78. post-install:
  79. ${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf \
  80. ${PREFIX}/share/examples/dovecot
  81. ${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh \
  82. ${PREFIX}/sbin/dovecot-mkcert.sh
  83. @rm ${PREFIX}/share/doc/dovecot/{dovecot-openssl.cnf,mkcert.sh}
  84. @find ${PREFIX}/lib/dovecot -name '*.a' -print | xargs rm
  85. @find ${PREFIX}/lib/dovecot -name '*.la' -print | xargs rm
  86. .include <bsd.port.mk>