Makefile 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. # $OpenBSD: Makefile,v 1.59 2017/04/10 11:46:22 sthen Exp $
  2. COMMENT-main = anti-spam filter
  3. COMMENT-pgsql = PostgreSQL driver for dspam
  4. COMMENT-mysql = MySQL driver for dspam
  5. VERSION = 3.10.2
  6. DISTNAME = dspam-${VERSION}
  7. REVISION-main = 5
  8. REVISION-mysql = 4
  9. REVISION-pgsql = 3
  10. PKGNAME-main = ${PKGNAME}
  11. .for p in pgsql mysql
  12. PKGNAME-$p = dspam-$p-${VERSION}
  13. # non-flavoured db backend packages
  14. FULLPKGNAME-$p = dspam-$p-${VERSION}
  15. FULLPKGPATH-$p = ${PKGPATH},-$p
  16. .endfor
  17. SHARED_LIBS = dspam 9.0
  18. CATEGORIES = mail
  19. MASTER_SITES = ${MASTER_SITE_SOURCEFORGE:=dspam/}
  20. HOMEPAGE = http://dspam.nuclearelephant.com/
  21. MAINTAINER = Todd T. Fries <todd@OpenBSD.org>
  22. # AGPLv3/BSD/GPLv2
  23. PERMIT_PACKAGE_CDROM = Yes
  24. MULTI_PACKAGES = -main -mysql -pgsql
  25. WANTLIB = m pthread
  26. WANTLIB-main += ${WANTLIB} c sqlite3
  27. LIBTOOL_FLAGS = --tag=disable-static
  28. CONFIGURE_STYLE = gnu
  29. SEPARATE_BUILD = Yes
  30. CONFIGURE_ARGS += --with-dspam-home=/var/dspam \
  31. --with-dspam-home-owner=_dspam \
  32. --with-dspam-home-group=_dspam \
  33. --with-dspam-home-mode=0755 \
  34. --with-dspam-owner=root \
  35. --with-dspam-group=bin \
  36. --with-dspam-mode=0555 \
  37. --with-storage-driver=sqlite3_drv,mysql_drv,pgsql_drv,hash_drv \
  38. --with-mysql-includes=${LOCALBASE}/include/mysql \
  39. --with-mysql-libraries=${LOCALBASE}/lib/mysql \
  40. --with-pgsql-includes=${LOCALBASE}/include/postgresql \
  41. --with-pgsql-libraries=${LOCALBASE}/lib \
  42. --with-sqlite-includes=${LOCALBASE}/include \
  43. --with-sqlite-libraries=${LOCALBASE}/lib \
  44. --enable-virtual-users \
  45. --enable-preferences-extension \
  46. --enable-daemon \
  47. --enable-long-usernames
  48. EXAMPLESDIR = ${PREFIX}/share/examples/dspam
  49. FLAVORS = clamav ldap domainscale largescale
  50. FLAVOR ?=
  51. . if ${FLAVOR:Mlargescale} && ${FLAVOR:Mdomainscale}
  52. ERRORS += "Fatal: choose either domainscale or largescale, not both"
  53. . endif
  54. LIB_DEPENDS-mysql = ${LIB_DEPENDS} ${PKGNAME-main}:mail/dspam,-main \
  55. databases/mariadb
  56. WANTLIB-mysql = ${WANTLIB} crypto dspam z ssl ${LIBCXX} lib/mysql/mysqlclient
  57. LIB_DEPENDS-pgsql = ${LIB_DEPENDS} ${PKGNAME-main}:mail/dspam,-main \
  58. databases/postgresql
  59. WANTLIB-pgsql = ${WANTLIB} c crypto dspam pq ssl
  60. LIB_DEPENDS-main = ${LIB_DEPENDS} \
  61. databases/sqlite3
  62. .if ${FLAVOR:Mclamav}
  63. CONFIGURE_ARGS += --enable-clamav
  64. RUN_DEPENDS-main += security/clamav
  65. .endif
  66. .if ${FLAVOR:Mldap}
  67. CONFIGURE_ARGS += --enable-external-lookup
  68. CONFIGURE_ENV = CPPFLAGS="-I${LOCALBASE}/include" \
  69. LDFLAGS="-L${LOCALBASE}/lib"
  70. LIB_DEPENDS += databases/openldap
  71. WANTLIB += crypto ssl sasl2 ldap-2.4 lber-2.4
  72. .endif
  73. .if ${FLAVOR:Mdomainscale}
  74. CONFIGURE_ARGS += --enable-domain-scale
  75. .else
  76. CONFIGURE_ARGS += --disable-domain-scale
  77. .endif
  78. .if ${FLAVOR:Mlargescale}
  79. CONFIGURE_ARGS += --enable-large-scale
  80. .else
  81. CONFIGURE_ARGS += --disable-large-scale
  82. .endif
  83. post-install:
  84. ${INSTALL_DATA_DIR} ${EXAMPLESDIR}
  85. ${INSTALL_DATA} ${WRKBUILD}/src/dspam.conf \
  86. ${PREFIX}/share/examples/dspam/dspam.conf
  87. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/dspam
  88. ${INSTALL_DATA} ${WRKSRC}/{README,UPGRADING,RELEASE.NOTES,doc/*.txt} \
  89. ${PREFIX}/share/doc/dspam
  90. .for DRIVER in mysql sqlite pgsql
  91. ${INSTALL_DATA_DIR} ${EXAMPLESDIR}/${DRIVER}
  92. ${INSTALL_DATA} ${WRKSRC}/src/tools.${DRIVER}_drv/*.sql \
  93. ${EXAMPLESDIR}/${DRIVER}
  94. .endfor
  95. .include <bsd.port.mk>