37230baecb
OpenSSL-1.1 and should happen automatically with this version.
105 lines
3 KiB
Makefile
105 lines
3 KiB
Makefile
# $NetBSD: Makefile,v 1.49 2018/10/12 12:49:28 roy Exp $
|
|
|
|
DISTNAME= rspamd-1.8.0
|
|
PKGREVISION= 1
|
|
CATEGORIES= mail
|
|
MASTER_SITES= ${MASTER_SITE_GITHUB:=vstakhov/}
|
|
|
|
MAINTAINER= bartosz.kuzma@gmail.com
|
|
HOMEPAGE= https://www.rspamd.com/
|
|
COMMENT= Fast, free and open-source spam filtering system
|
|
LICENSE= 2-clause-bsd
|
|
|
|
.include "options.mk"
|
|
|
|
DEPENDS+= ${LUA_PKGPREFIX}-lpeg-[0-9]*:../../devel/lua-lpeg
|
|
DEPENDS+= ragel-[0-9]*:../../devel/ragel
|
|
|
|
USE_CMAKE= yes
|
|
USE_TOOLS+= perl pkg-config
|
|
USE_LANGUAGES= c99
|
|
BUILD_DEFS+= VARBASE
|
|
|
|
# Not really true, but difficult to avoid picking up 5.3
|
|
LUA_VERSIONS_ACCEPTED= 53
|
|
|
|
CPPFLAGS.SunOS+= -D__EXTENSIONS__
|
|
|
|
LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/rspamd
|
|
TEST_TARGET= run-test
|
|
|
|
RSPAMD_USER?= rspamd
|
|
RSPAMD_GROUP?= rspamd
|
|
PKG_GROUPS= ${RSPAMD_GROUP}
|
|
PKG_USERS= ${RSPAMD_USER}:${RSPAMD_GROUP}
|
|
|
|
PKG_GROUPS_VARS= RSPAMD_GROUP
|
|
PKG_USERS_VARS= RSPAMD_USER
|
|
|
|
PKG_GECOS.${RSPAMD_USER}= rspamd user
|
|
|
|
PKG_SYSCONFSUBDIR= rspamd
|
|
|
|
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
|
|
LOGDIR= ${VARBASE}/log/rspamd
|
|
DBDIR= ${VARBASE}/db/rspamd
|
|
RUNDIR= ${VARBASE}/run/rspamd
|
|
|
|
FILES_SUBST+= RSPAMD_USER=${RSPAMD_USER}
|
|
FILES_SUBST+= RSPAMD_GROUP=${RSPAMD_GROUP}
|
|
|
|
RCD_SCRIPTS= rspamd
|
|
|
|
CMAKE_ARGS+= -DMANDIR:PATH=${PREFIX}/${PKGMANDIR}
|
|
CMAKE_ARGS+= -DLOGDIR:PATH=${LOGDIR}
|
|
CMAKE_ARGS+= -DRUNDIR:PATH=${VARBASE}/run/rspamd
|
|
CMAKE_ARGS+= -DDBDIR:PATH=${DBDIR}
|
|
CMAKE_ARGS+= -DCONFDIR:PATH=${PKG_SYSCONFDIR}
|
|
CMAKE_ARGS+= -DRSPAMD_USER=${RSPAMD_USER}
|
|
CMAKE_ARGS+= -DRSPAMD_GROUP=${RSPAMD_GROUP}
|
|
CMAKE_ARGS+= -DENABLE_SQLITE=ON
|
|
# Torch requires LuaJIT2, but LuaJIT2 only supports Lua 5.1
|
|
CMAKE_ARGS+= -DENABLE_LUAJIT=OFF
|
|
CMAKE_ARGS+= -DENABLE_TORCH=OFF
|
|
|
|
REPLACE_PERL+= utils/rspamd_stats.pl
|
|
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/modules.d
|
|
MAKE_DIRS+= ${PKG_SYSCONFDIR}/scores.d
|
|
|
|
OWN_DIRS_PERMS+= ${DBDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0700
|
|
OWN_DIRS_PERMS+= ${LOGDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0750
|
|
OWN_DIRS_PERMS+= ${RUNDIR} ${RSPAMD_USER} ${RSPAMD_GROUP} 0755
|
|
|
|
.include "cfgfiles.mk"
|
|
|
|
.for file in ${CFGFILES}
|
|
CONF_FILES+= ${EGDIR}/${file} ${PKG_SYSCONFDIR}/${file}
|
|
.endfor
|
|
|
|
###
|
|
### Generate list of config files
|
|
###
|
|
.PHONY: cfgfiles
|
|
cfgfiles: do-extract
|
|
@${ECHO} "# \$$NetBSD\$$" > ${.CURDIR}/cfgfiles.mk
|
|
@${ECHO} "# Do not edit, regenerate post-extract using 'make cfgfiles'" >> ${.CURDIR}/cfgfiles.mk
|
|
@${ECHO} "CFGFILES= \\" >> ${.CURDIR}/cfgfiles.mk
|
|
cd ${WRKSRC}/conf && ${FIND} * -type f | ${SORT} | ${TR} '\n' ' ' >> ${.CURDIR}/cfgfiles.mk
|
|
@${ECHO} >> ${.CURDIR}/cfgfiles.mk
|
|
|
|
post-extract:
|
|
${FIND} ${WRKSRC}/conf -type d -exec ${CHMOD} ${PKGDIRMODE} {} \;
|
|
${FIND} ${WRKSRC}/conf -type f -exec ${CHMOD} ${DOCMODE} {} \;
|
|
|
|
.include "../../databases/hiredis/buildlink3.mk"
|
|
.include "../../databases/sqlite3/buildlink3.mk"
|
|
.include "../../devel/fann/buildlink3.mk"
|
|
.include "../../devel/glib2/buildlink3.mk"
|
|
.include "../../devel/libevent/buildlink3.mk"
|
|
.include "../../lang/lua/buildlink3.mk"
|
|
.include "../../mail/gmime/buildlink3.mk"
|
|
.include "../../security/openssl/buildlink3.mk"
|
|
.include "../../sysutils/file/buildlink3.mk"
|
|
.include "../../textproc/icu/buildlink3.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|