Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. # $OpenBSD: Makefile,v 1.100 2017/05/06 14:56:08 giovanni Exp $
  2. COMMENT= mailfilter to identify and mark spam
  3. VER= 3.4.1
  4. DISTNAME= Mail-SpamAssassin-${VER}
  5. PKGNAME= p5-${DISTNAME}
  6. REVISION= 6
  7. RULESNAME= Mail-SpamAssassin-rules-${VER}.r1675274.tgz
  8. CATEGORIES= mail perl5
  9. DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${RULESNAME}
  10. EXTRACT_SUFX= .tar.bz2
  11. EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
  12. MAINTAINER= Giovanni Bechis <giovanni@openbsd.org>
  13. HOMEPAGE= http://spamassassin.apache.org/
  14. # Apache Software License (v2)
  15. PERMIT_PACKAGE_CDROM= Yes
  16. WANTLIB= c crypto ssl z
  17. MASTER_SITES= ${MASTER_SITE_APACHE:=spamassassin/source/}
  18. COMMON_DEPENDS= www/p5-HTML-Parser>=3.31 \
  19. mail/p5-Mail-DKIM>=0.31 \
  20. net/p5-Net-DNS>=0.34 \
  21. net/p5-NetAddr-IP \
  22. security/p5-IO-Socket-SSL
  23. BUILD_DEPENDS= ${COMMON_DEPENDS}
  24. RUN_DEPENDS= ${COMMON_DEPENDS} \
  25. devel/re2c \
  26. p5-Mail-SPF-*|p5-Mail-SPF-Query-*:mail/p5-Mail-SPF \
  27. net/p5-Geo-IP \
  28. net/p5-Net-Patricia \
  29. security/gnupg \
  30. textproc/p5-Encode-Detect \
  31. curl-*|p5-libwww-*:net/curl \
  32. www/p5-HTTP-Date
  33. TEST_DEPENDS= ${RUN_DEPENDS}
  34. MAKE_ENV+= CC="${CC}"
  35. CONFIGURE_STYLE= perl
  36. CONFIGURE_ARGS+= DESTDIR=${WRKINST} \
  37. SYSCONFDIR=${SYSCONFDIR} \
  38. LOCALSTATEDIR=${LOCALSTATEDIR} \
  39. CONTACT_ADDRESS="the administrator of this system" \
  40. ENABLE_SSL="yes"
  41. CONFDIR= ${SYSCONFDIR}/mail/spamassassin
  42. LOCALSTATEDIR= /var/db/spamassassin
  43. SAMPLE_CONFDIR= ${PREFIX}/share/examples/SpamAssassin
  44. SUBST_VARS= CONFDIR
  45. # test insists on creating files in $HOME
  46. PORTHOME= ${WRKDIR}/temp-home
  47. DOCS= CREDITS NOTICE README UPGRADE USAGE LICENSE TRADEMARK \
  48. procmailrc.example sample-nonspam.txt sample-spam.txt
  49. # handling this in the extract stage (rather than untarring directly under
  50. # PREFIX in post-install) allows us to patch the rules if necessary.
  51. _R= ${WRKSRC}/_dist_rules
  52. post-extract:
  53. mkdir ${_R} && cd ${_R} && tar xzf ${FULLDISTDIR}/${RULESNAME}
  54. pre-configure:
  55. ${SUBST_CMD} ${WRKSRC}/lib/Mail/SpamAssassin/Util.pm
  56. post-install:
  57. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/SpamAssassin
  58. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/SpamAssassin/ldap
  59. ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/SpamAssassin/sql
  60. ${INSTALL_DATA_DIR} ${SAMPLE_CONFDIR}
  61. ${INSTALL_DATA} ${WRKSRC}/rules/local.cf ${WRKSRC}/rules/*.pre \
  62. ${SAMPLE_CONFDIR}
  63. .for i in ${DOCS}
  64. ${INSTALL_DATA} ${WRKSRC}/${i} ${PREFIX}/share/doc/SpamAssassin
  65. .endfor
  66. ${INSTALL_DATA} ${WRKSRC}/ldap/* ${PREFIX}/share/doc/SpamAssassin/ldap
  67. ${INSTALL_DATA} ${WRKSRC}/sql/* ${PREFIX}/share/doc/SpamAssassin/sql
  68. cp -r ${_R}/* ${PREFIX}/share/spamassassin/
  69. chown ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/spamassassin/*
  70. pre-test:
  71. mkdir -p ${PORTHOME}
  72. .include <bsd.port.mk>