blob: ca10d38b74fc24a9f34bb8cc03efa6ce7edffdef (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
# New ports collection makefile for: spmfilter
# Date created: 2010-04-12
# Whom: Frank Wall <fw@moov.de>
#
# $FreeBSD$
#
PORTNAME= spmfilter
PORTVERSION= 0.4.2
CATEGORIES= mail
MASTER_SITES= http://www.${PORTNAME}.org/attachments/download/60/
MAINTAINER= fw@moov.de
COMMENT= Spmfilter is a high-performance mail filtering framework, written in C
BUILD_DEPENDS= gmime-24>=2.4:${PORTSDIR}/mail/gmime24 \
libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
glib>=2.14:${PORTSDIR}/devel/glib20
RUN_DEPENDS= gmime-24>=2.4:${PORTSDIR}/mail/gmime24 \
libesmtp>=1.0:${PORTSDIR}/mail/libesmtp \
glib>=2.14:${PORTSDIR}/devel/glib20
LICENSE= LGPL3
USE_CMAKE= yes
CMAKE_ARGS+= -DCMAKE_INCLUDE_PATH="${LOCALBASE}/include" \
-DCMAKE_LIBRARY_PATH="${LOCALBASE}/lib"
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}
USE_RC_SUBR= ${PORTNAME}
OPTIONS= DB4 "Enable DB4 backend" on \
DEBUG "Enable Debugging" off \
LDAP "Enable LDAP backend" off \
MYSQL "Enable MYSQL backend" off \
PGSQL "Enable PGSQL backend" off
# Default requirement for spmfilter rc script
_REQUIRE= LOGIN
.include <bsd.port.pre.mk>
.if !defined(WITH_DB4) || defined(WITHOUT_DB4)
CMAKE_ARGS+= -DWITHOUT_DB4=TRUE
.else
USE_BDB= yes
CMAKE_ARGS+= -DDB4_INCLUDE_DIR="${BDB_INCLUDE_DIR}"
.endif
.if defined(WITH_DEBUG)
CMAKE_ARGS+= -DENABLE_DEBUG=TRUE
.endif
.if !defined(WITH_LDAP) || defined(WITHOUT_LDAP)
CMAKE_ARGS+= -DWITHOUT_LDAP=TRUE
.else
USE_OPENLDAP= yes
.if defined(WITH_OPENLDAP_VER)
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
.endif
_REQUIRE+= slapd
.endif
.if !defined(WITH_MYSQL) && !defined(WITH_PGSQL)
CMAKE_ARGS+= -DWITHOUT_ZDB=TRUE
.else
LIB_DEPENDS+= zdb:${PORTSDIR}/databases/libzdb
.endif
.if defined(WITH_MYSQL)
USE_MYSQL= yes
_REQUIRE+= mysql
.endif
.if defined(WITH_PGSQL)
USE_PGSQL= yes
_REQUIRE+= postgresql
.endif
MAN1= ${PORTNAME}.1
MAN5= ${PORTNAME}.conf.5
MANCOMPRESSED= yes
SUB_LIST+= REQUIRE="${_REQUIRE}"
PLIST_SUB= LIB_VERSION=${PORTVERSION}
post-patch:
@${REINPLACE_CMD} -e 's|share/man|man|' \
${WRKSRC}/cmake/Modules/SMFMacros.cmake
@${REINPLACE_CMD} -E -e 's|(HAVE_DB4 )db|\1${BDB_LIB_NAME}|' \
${WRKSRC}/cmake/Modules/FindDB4.cmake
@${REINPLACE_CMD} -E -e 's|\$${LIBDIR}(/pkgconfig)|$${CMAKE_INSTALL_PREFIX}/libdata\1|' \
-e 's|(COMMON_LIBS )db|\1${BDB_LIB_NAME}|' \
${WRKSRC}/src/CMakeLists.txt
post-install:
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}.conf.sample ${PREFIX}/etc/
@if [ ! -f ${PREFIX}/etc/${PORTNAME}.conf ]; then \
${CP} -p ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf ; \
fi
.include <bsd.port.post.mk>
|