blob: a1cb00d21eeebab91bf1f2316e430edce45b3f1f (
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
|
# New ports collection makefile for: bannerfilter
# Date created: 14 Aug 2005
# Whom: Emanuel Haupt <ehaupt@critical.ch>
#
# $FreeBSD$
#
PORTNAME= bannerfilter
PORTVERSION= 1.31
CATEGORIES= www
MASTER_SITES= http://phroggy.com/files/unix/ \
CRITICAL
MAINTAINER= ehaupt@FreeBSD.org
COMMENT= A squid redirect script for filtering web banners
RUN_DEPENDS= squid:${PORTSDIR}/www/squid
USE_PERL5= 5.8.6+
NO_BUILD= yes
WWW_ROOT?= www
PLIST_SUB+= WWW_ROOT="${WWW_ROOT}"
CONFIG_FILES= bannerfilter.conf banners.data banners.local.data \
exceptions.data exceptions.local.data frames.data \
frames.local.data popups.data popups.local.data
post-patch:
@${REINPLACE_CMD} -e \
's|/usr/local/etc|${PREFIX}/etc|; s|/usr/bin/perl|${PERL}|' \
${WRKSRC}/redirector.pl
@${REINPLACE_CMD} -e \
's|^;\ \(DATA\ =\ \).*|\1${PREFIX}/etc/${PORTNAME}/|' \
${WRKSRC}/${PORTNAME}.conf
@${REINPLACE_CMD} -e \
's|^\(CONFIGDIR=\).*|\1"${PREFIX}/etc/${PORTNAME}"|' \
${WRKSRC}/update.sh
do-install:
${MKDIR} ${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKSRC}/redirector.pl ${PREFIX}/libexec/${PORTNAME}
${INSTALL_SCRIPT} ${WRKSRC}/update.sh \
${PREFIX}/bin/update-bannerfilter-rules
${MKDIR} ${PREFIX}/etc/${PORTNAME}
.for f in ${CONFIG_FILES}
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/etc/${PORTNAME}/${f}.default
.if !exists(${PREFIX}/etc/${PORTNAME}/${f})
${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/etc/${PORTNAME}
.endif
.endfor
${CP} -R ${WRKSRC}/www ${PREFIX}/${WWW_ROOT}/${PORTNAME}
post-install:
@${ECHO_MSG} ""
@${ECHO_MSG} "==========================================================================="
@${ECHO_MSG} ""
@${ECHO_MSG} "Please add the following redirector config directive to your squid.conf:"
@${ECHO_MSG} " redirect_program ${PREFIX}/libexec/bannerfilter/redirector.pl"
@${ECHO_MSG} ""
@${ECHO_MSG} "Make sure ${PREFIX}/${WWW_ROOT}/${PORTNAME} is available under"
@${ECHO_MSG} " http://localhost/${PORTNAME}"
@${ECHO_MSG} ""
@${ECHO_MSG} "==========================================================================="
@${ECHO_MSG} ""
.include <bsd.port.mk>
|