Makefile 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. # $OpenBSD: Makefile,v 1.37 2017/05/28 09:35:26 jasper Exp $
  2. COMMENT= event-driven spam filtering system in C/Lua
  3. GH_ACCOUNT= vstakhov
  4. GH_PROJECT= rspamd
  5. GH_TAGNAME= 1.5.8
  6. CATEGORIES= mail
  7. HOMEPAGE= https://rspamd.com/
  8. # Apache License 2.0
  9. PERMIT_PACKAGE_CDROM= Yes
  10. WANTLIB += c crypto event fann gd glib-2.0 gthread-2.0 icudata icui18n icuuc
  11. WANTLIB += intl luajit-5.1 m magic pcre pthread sqlite3 ssl
  12. MODULES= devel/cmake
  13. LIB_DEPENDS= databases/sqlite3 \
  14. devel/libmagic \
  15. devel/gettext \
  16. devel/glib2 \
  17. devel/pcre \
  18. graphics/gd \
  19. lang/luajit \
  20. math/fann \
  21. textproc/icu4c
  22. BUILD_DEPENDS +=devel/ragel
  23. # /var/rspamd needs to exist for tests to run
  24. TEST_DEPENDS = ${FULLPKGNAME}:${FULLPKGPATH}
  25. TEST_DEPENDS += databases/redis \
  26. sysutils/py-psutil \
  27. textproc/py-demjson \
  28. devel/py-robotframework
  29. CONFIGURE_ARGS+=-DOPENBSD_BUILD=1 \
  30. -DCMAKE_C_OPT_FLAGS="${CFLAGS}" \
  31. -DCONFDIR="${SYSCONFDIR}/rspamd" \
  32. -DDBDIR="${LOCALSTATEDIR}/rspamd" \
  33. -DLOGDIR="${LOCALSTATEDIR}/log/rspamd" \
  34. -DMANDIR="${PREFIX}/man" \
  35. -DRUNDIR="${LOCALSTATEDIR}/run/rspamd" \
  36. -DRSPAMD_USER="_rspamd" \
  37. -DRSPAMD_GROUP="_rspamd"
  38. # Make sure we pick up the base libevent, never the ports one!
  39. CONFIGURE_ARGS += -DLIBEVENT_ROOT_DIR=/usr
  40. # Make sure you have no rspamd or redis instances running and note that the
  41. # test suite uses the network.
  42. #
  43. # In the event of failing tests, look at log.html in ${WRKSRC}
  44. do-test:
  45. cd ${WRKSRC} && \
  46. env RSPAMADM=${WRKBUILD}/src/rspamadm/rspamadm \
  47. RSPAMC=${WRKBUILD}/src/client/rspamc \
  48. RSPAMD=/usr/local/bin/rspamd \
  49. ${LOCALBASE}/bin/robot \
  50. test/functional/cases
  51. # no trailing crlf
  52. post-extract:
  53. for i in hiredis http-parser lc-btrie libottery; do \
  54. echo >> ${WRKSRC}/contrib/$$i/CMakeLists.txt; done
  55. pre-configure:
  56. ${SUBST_CMD} ${WRKSRC}/interface/README.md
  57. post-install:
  58. ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/rspamd
  59. mv ${WRKINST}${SYSCONFDIR}/rspamd/* ${PREFIX}/share/examples/rspamd
  60. rm ${PREFIX}/share/rspamd/www/README.md.{beforesubst,orig}
  61. .include <bsd.port.mk>