summaryrefslogtreecommitdiff
path: root/www/squidGuard/Makefile
blob: 2e8a0486293688fad7022778e5745f4939cdcb4b (plain)
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
# $NetBSD: Makefile,v 1.19 2009/10/17 01:50:38 taca Exp $

DISTNAME=	squidGuard-1.4
PKGREVISION=	1
CATEGORIES=	www
MASTER_SITES=	http://www.squidguard.org/Downloads/ \
		http://www.squidguard.org/Downloads/Patches/1.4/
DISTFILES=	${DEFAULT_DISTFILES} squidGuard-1.4-patch-20091015.tar.gz

MAINTAINER=	zuntum@NetBSD.org
HOMEPAGE=	http://www.squidguard.org/
COMMENT=	Ultrafast and free filter, redirector and access controller for Squid
LICENSE=	gnu-gpl-v2

.include "../../www/squid/Makefile.common"

PKG_DESTDIR_SUPPORT=	user-destdir

BDB_ACCEPTED=		db4
USE_TOOLS+=		lex yacc perl
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-db-inc=${BUILDLINK_PREFIX.db4}/include/db4
CONFIGURE_ARGS+=	--with-db-lib=${BUILDLINK_PREFIX.db4}/lib/db4
CONFIGURE_ARGS+=	--with-sg-config=${PKG_SYSCONFDIR}/squidGuard.conf
CONFIGURE_ARGS+=	--with-sg-logdir=${LOGDIR}
CONFIGURE_ARGS+=	--with-sg-dbhome=${DBDIR}
CONFIGURE_ARGS+=	--with-squiduser=${SQUID_USER}

CHECK_PORTABILITY_SKIP=	configure-old

EGDIR=		share/examples/squidGuard
DBDIR=		${VARBASE}/squidGuard

PLIST_SUBST+=	EGDIR=${EGDIR}

CONF_FILES_PERMS+=	${PREFIX}/${EGDIR}/squidGuard-simple.cgi \
			${CGIBINDIR}/squidGuard.cgi ${BINOWN} ${BINGRP} 0755
CONF_FILES_PERMS+=	${PREFIX}/${EGDIR}/squidGuard.conf \
			${PKG_SYSCONFDIR}/squidGuard.conf \
			${BINOWN} ${SQUID_GROUP} 0640
MAKE_DIRS+=		${CGIBINDIR}
OWN_DIRS+=		${DBDIR}
OWN_DIRS_PERMS+=	${DBDIR} ${SQUID_USER} ${SQUID_GROUP} 0750

BUILD_DEFS+=		VARBASE
INSTALLATION_DIRS+=	bin ${EGDIR}

.include "../../mk/bsd.prefs.mk"

CGIBINDIR?=		${PREFIX}/libexec/cgi-bin/

pre-patch:
	${CP} ${WRKDIR}/squidGuard-1.4-patch-20091015/sgLog.c \
		${WRKSRC}/src

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/src/squidGuard ${DESTDIR}${PREFIX}/bin
	${INSTALL_DATA} ${WRKSRC}/samples/sample.conf \
		${DESTDIR}${PREFIX}/${EGDIR}/squidGuard.conf
	${INSTALL_DATA} ${WRKSRC}/samples/squidGuard-simple.cgi \
		${DESTDIR}${PREFIX}/${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/squidGuard-simple-de.cgi \
		${DESTDIR}${PREFIX}/${EGDIR}
	${INSTALL_DATA} ${WRKSRC}/samples/squidGuard.cgi \
		${DESTDIR}${PREFIX}/${EGDIR}

.include "../../mk/bdb.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"