aboutsummaryrefslogtreecommitdiffstats
path: root/mail/qsf/Makefile
blob: d122394ffb045e9def1b3f0a2523afbf1b7d2064 (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
# New ports collection makefile for: qsf
# Date created:     15 January 2004
# Whom:         liamfoy@sepulcrum.org
#
# $FreeBSD$
#

PORTNAME=   qsf
PORTVERSION=    1.1.0
CATEGORIES= mail
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= qsf

MAINTAINER= ports@FreeBSD.org
COMMENT=    A small fast spam filter intended to be used with procmail

USE_BZIP2=  yes
USE_GETOPT_LONG=    yes
USE_REINPLACE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_TARGET=   --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ENV=  CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"

MAN1=       qsf.1
PLIST_FILES=    bin/qsf

CPPFLAGS=   -I${LOCALBASE}/include
LDFLAGS=    -L${LOCALBASE}/lib

OPTIONS=    GDBM "GDBM support" off \
        MYSQL "MySQL support" off \
        SQLITE2 "SQLite2 support" off

.include <bsd.port.pre.mk>

.if defined(WITH_GDBM)
LIB_DEPENDS+=   gdbm.3:${PORTSDIR}/databases/gdbm
.else
CONFIGURE_ARGS+=    --without-gdbm
.endif

.if defined(WITH_MYSQL)
USE_MYSQL=  yes
.else
CONFIGURE_ARGS+=    --without-mysql
.endif

.if defined(WITH_SQLITE2)
LIB_DEPENDS+=   sqlite.2:${PORTSDIR}/databases/sqlite2
.else
CONFIGURE_ARGS+=    --without-sqlite
.endif

# not supported yet.
#.if defined(WITH_SQLITE3)
#.endif

post-patch:
    @${REINPLACE_CMD} -e 's/Linux/${OPSYS}/g' ${WRKSRC}/doc/quickref.1.in

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/qsf ${PREFIX}/bin/qsf
    ${INSTALL_MAN} ${WRKSRC}/doc/quickref.1 ${MANPREFIX}/man/man1/qsf.1

.include <bsd.port.post.mk>