2011-09-16 08:00:05 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.12 2011/09/16 12:00:09 espie Exp $
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 17:20:36 -04:00
|
|
|
COMMENT = filter, redirector and access controller for Squid
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 19:53:13 -04:00
|
|
|
DISTNAME = squidGuard-1.4
|
2011-09-16 08:00:05 -04:00
|
|
|
REVISION = 2
|
2009-04-09 17:20:36 -04:00
|
|
|
CATEGORIES = www
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 17:20:36 -04:00
|
|
|
HOMEPAGE = http://www.squidguard.org/
|
|
|
|
MAINTAINER = Claudio Correa <correa@pucpcaldas.br>
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-03-16 18:55:31 -04:00
|
|
|
# GPLv2 only
|
2009-04-09 17:20:36 -04:00
|
|
|
PERMIT_PACKAGE_CDROM = Yes
|
|
|
|
PERMIT_PACKAGE_FTP = Yes
|
|
|
|
PERMIT_DISTFILES_CDROM =Yes
|
|
|
|
PERMIT_DISTFILES_FTP = Yes
|
2009-04-09 19:53:13 -04:00
|
|
|
|
2010-11-11 07:35:09 -05:00
|
|
|
WANTLIB = c lib/db4/db pthread
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 17:20:36 -04:00
|
|
|
MASTER_SITES = http://www.squidguard.org/Downloads/
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 19:53:13 -04:00
|
|
|
SG_DIR = /var/db/squidGuard
|
2009-04-09 17:20:36 -04:00
|
|
|
CONFIG_DIR = ${SYSCONFDIR}/squidguard
|
2009-04-09 19:53:13 -04:00
|
|
|
SUBST_VARS = SG_DIR CONFIG_DIR
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2010-11-26 09:50:09 -05:00
|
|
|
LIB_DEPENDS = databases/db/v4
|
2010-11-22 03:36:47 -05:00
|
|
|
RUN_DEPENDS = www/squid
|
2009-04-09 17:20:36 -04:00
|
|
|
BUILD_DEPENDS = ${RUN_DEPENDS}
|
2007-06-02 11:26:54 -04:00
|
|
|
|
2009-04-09 17:20:36 -04:00
|
|
|
CONFIGURE_ENV = CFLAGS='${CFLAGS} -I${LOCALBASE}/include' \
|
2007-06-02 11:26:54 -04:00
|
|
|
LDFLAGS='${LDFLAGS} -L${LOCALBASE}/lib' \
|
|
|
|
ac_cv_path_LYNX=false
|
|
|
|
|
2009-04-09 17:20:36 -04:00
|
|
|
CONFIGURE_STYLE = gnu
|
2009-04-09 19:53:13 -04:00
|
|
|
CONFIGURE_ARGS = --with-squiduser='_squid' \
|
2007-06-02 11:26:54 -04:00
|
|
|
--localstatedir=${SG_DIR} \
|
2009-04-09 19:53:13 -04:00
|
|
|
--with-sg-logdir=/var/log/squidguard \
|
2007-06-02 11:26:54 -04:00
|
|
|
--with-sg-dbhome=${SG_DIR}/db \
|
2009-04-09 19:53:13 -04:00
|
|
|
--with-sg-config=${CONFIG_DIR}/squidguard.conf \
|
2007-06-02 11:26:54 -04:00
|
|
|
--with-db-lib=${LOCALBASE}/lib/db4 \
|
|
|
|
--with-db-inc=${LOCALBASE}/include/db4
|
|
|
|
|
2009-04-09 19:53:13 -04:00
|
|
|
REGRESS_TARGET = test
|
|
|
|
|
|
|
|
FLAVORS = ldap mysql
|
|
|
|
FLAVOR ?=
|
2007-06-02 11:26:54 -04:00
|
|
|
|
|
|
|
.if ${FLAVOR:L:Mldap}
|
2010-11-22 03:36:47 -05:00
|
|
|
LIB_DEPENDS += databases/openldap
|
2010-11-11 07:35:09 -05:00
|
|
|
WANTLIB += ldap
|
2009-04-09 17:20:36 -04:00
|
|
|
CONFIGURE_ARGS += --with-ldap=yes
|
2007-06-02 11:26:54 -04:00
|
|
|
.else
|
2009-04-09 17:20:36 -04:00
|
|
|
CONFIGURE_ARGS += --with-ldap=no
|
2007-06-02 11:26:54 -04:00
|
|
|
.endif
|
|
|
|
|
2009-04-09 19:53:13 -04:00
|
|
|
.if ${FLAVOR:L:Mmysql}
|
2010-11-22 03:36:47 -05:00
|
|
|
LIB_DEPENDS += databases/mysql
|
2009-04-09 19:53:13 -04:00
|
|
|
CONFIGURE_ARGS += --with-mysql=${LOCALBASE}
|
2010-11-11 07:35:09 -05:00
|
|
|
WANTLIB += mysqlclient z
|
2009-04-09 19:53:13 -04:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS += --with-mysql=no
|
|
|
|
.endif
|
|
|
|
|
|
|
|
pre-configure:
|
|
|
|
@perl -pi -e "s,\@prefix\@\/squidGuard/squidGuard.conf,\@cfgdir\@\/squidguard/squidguard.conf," ${WRKSRC}/src/sg.h.in
|
|
|
|
@perl -pi -e "s,\@prefix\@\/squidGuard/log,\@logdir\@\/squidGuard," ${WRKSRC}/src/sg.h.in
|
|
|
|
@perl -pi -e "s,\@prefix\@\/squidGuard/db,\@logdir\@\/squidGuard/db," ${WRKSRC}/src/sg.h.in
|
2007-06-02 11:26:54 -04:00
|
|
|
|
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKDIST}/src/squidGuard ${PREFIX}/bin
|
|
|
|
|
2009-04-09 19:53:13 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/squidguard \
|
|
|
|
${PREFIX}/share/doc/squidguard/html
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/doc/README ${WRKDIST}/doc/*.txt \
|
|
|
|
${PREFIX}/share/doc/squidguard/
|
|
|
|
${INSTALL_DATA} ${WRKDIST}/doc/*.gif ${WRKDIST}/doc/*.html \
|
|
|
|
${PREFIX}/share/doc/squidguard/html/
|
2007-06-02 11:26:54 -04:00
|
|
|
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/squidguard
|
2009-04-09 19:53:13 -04:00
|
|
|
@rm ${WRKDIST}/samples/{Makefile,*.in}
|
2007-06-02 11:26:54 -04:00
|
|
|
cp -R ${WRKDIST}/samples/* ${PREFIX}/share/examples/squidguard/
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|