aboutsummaryrefslogtreecommitdiffstats
path: root/security/squidclam/Makefile
blob: 54362535f83f3617bbc59d32a67477c3941912b3 (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
# New ports collection makefile for:    squidclam
# Date created:     2005-06-26
# Whom:         Alexander Novitsky <alecn2002@yandex.ru>
#
# $FreeBSD$
#

PORTNAME=   squidclam
PORTVERSION=    0.11
PORTREVISION=   2
CATEGORIES= security
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= alecn2002@yandex.ru
COMMENT=    Bridge betwean ClamAV antivirus software and Squid caching proxy

BUILD_DEPENDS=  ${LOCALBASE}/bin/clamscan:${PORTSDIR}/security/clamav   \
        ${LOCALBASE}/bin/curl:${PORTSDIR}/ftp/curl
RUN_DEPENDS=    ${BUILD_DEPENDS}

GNU_CONFIGURE=  yes
USE_GMAKE=  yes
NO_INSTALL_MANPAGES=    yes

PORTDOCS=   README Changelog

SUB_FILES=  pkg-message

PLIST_FILES=    bin/squidclam %%EXAMPLESDIR%%/squidclam.conf
PLIST_DIRS= %%EXAMPLESDIR%%

.include <bsd.port.pre.mk>

.if ${OSVERSION} < 600000
BROKEN=     Fails to compile: does not find pthread include file
.endif

post-patch:
    @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
              -e 's|%%PREFIX%%|${PREFIX}|g' \
        ${WRKSRC}/configure
    @${REINPLACE_CMD} -e 's|cl_perror|cl_strerror|g' \
        ${WRKSRC}/squidclam.c

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/${PORTNAME}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
.for f in ${PORTDOCS}
    ${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}/$f
.endfor
.endif
    ${MKDIR} ${EXAMPLESDIR}
    ${INSTALL_DATA} ${WRKSRC}/sample.conf ${EXAMPLESDIR}/${PORTNAME}.conf

post-install:
    @${CAT} ${PKGMESSAGE}

.include <bsd.port.post.mk>