Date: Wed, 2 Nov 2005 10:11:34 GMT From: Elisey Savateev <b3k@mail.ru> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/88395: New port: www/rejik A squid redirector used for blocking unwanted content Message-ID: <200511021011.jA2ABYui056594@www.freebsd.org> Resent-Message-ID: <200511021020.jA2AKBuk074941@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 88395 >Category: ports >Synopsis: New port: www/rejik A squid redirector used for blocking unwanted content >Confidential: no >Severity: non-critical >Priority: high >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Wed Nov 02 10:20:11 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Elisey Savateev >Release: FreeBSD 5.4-STABLE i386 >Organization: >Environment: FreeBSD beastie 5.4-STABLE FreeBSD 5.4-STABLE #21: Wed Oct 26 14:28:20 YEKST 2005 root@beastie:/usr/obj/usr/src/sys/CUSTOM i386 >Description: Rejik is a squid redirector used for blocking unwanted content basing on URLs and Perl Compatible Regular Expressions (http://www.pcre.org/). WWW: http://www.rejik.ru/ >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # rejik # rejik/Makefile # rejik/distinfo # rejik/files # rejik/pkg-descr # rejik/pkg-message # rejik/pkg-plist # echo c - rejik mkdir -p rejik > /dev/null 2>&1 echo x - rejik/Makefile sed 's/^X//' >rejik/Makefile << 'END-of-rejik/Makefile' X# New ports collection makefile for: rejik X# Date created: 29 October 2005 X# Whom: Elisey Savateev <b3k@mail.ru> X# X# $FreeBSD$ X# X XPORTNAME= rejik XPORTVERSION= 3.2.0 XCATEGORIES= www XMASTER_SITES= http://www.rejik.ru/download/ XDISTNAME= redirector-3.2.0 XEXTRACT_SUFX= .tgz X XMAINTAINER= b3k@mail.ru XCOMMENT= A squid redirector used for blocking unwanted content X XLIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre XUSE_REINPLACE= yes X XDISTFILES= ${DISTNAME}${EXTRACT_SUFX} XEXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX} XWRKSRC= ${WRKDIR}/redirector X X# Redifine this if you need XSQUID_USER?= squid XSQUID_GROUP?= squid XWWW_USER?= www XWWW_GROUP?= www XWWW_PATH?= ${LOCALBASE}/www XINSTALL_PATH?= ${LOCALBASE}/${PORTNAME} X XOPTIONS= BAN "With banlists" on \ X DBL "With DBL scripts" off \ X WWW "With error pages" on \ X X.include <bsd.port.pre.mk> X X.if defined(WITH_BAN) XDISTFILES+= banlists-2.x.x.tgz XPLIST_SUB+= BAN="" X.else XPLIST_SUB+= BAN="@comment " X.endif X X.if defined(WITH_WWW) XDISTFILES+= www.tgz XPLIST_SUB+= WWW="" X.else XPLIST_SUB+= WWW="@comment " X.endif X X.if defined(WITH_DBL) XDISTFILES+= dbl-2.0.tgz XUSE_PERL5_RUN= yes XRUN_DEPENDS= ${SITE_PERL}/mach/Text/Iconv.pm:${PORTSDIR}/converters/p5-Text-Iconv \ X ${SITE_PERL}/mach/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser \ X wget:${PORTSDIR}/ftp/wget XPLIST_SUB+= DBL="" X.else XPLIST_SUB+= DBL="@comment " X.endif X Xpost-extract: X @${ECHO_MSG} "===> ----------------------------------------------" X @${ECHO_MSG} "===> Make sure that squid runs under user squid" X @${ECHO_MSG} "===> and group squid. If not, redefine SQUID_USER" X @${ECHO_MSG} "===> and SQUID_GROUP." X @${ECHO_MSG} "===> ----------------------------------------------" X Xpost-patch: X @${REINPLACE_CMD} -e 's|SQUID_USER=nobody|SQUID_USER=${SQUID_USER}|; \ X s|SQUID_GROUP=nogroup|SQUID_GROUP=${SQUID_GROUP}|; \ X s|INSTALL_PATH=/usr/local/rejik3|INSTALL_PATH=${INSTALL_PATH}|' \ X ${WRKSRC}/Makefile X Xpost-install: X @${ECHO_MSG} "===> ----------------------------------------------" X @${ECHO_MSG} "===> Copy ${LOCALBASE}/${PORTNAME}/redirector.conf.dist" X @${ECHO_MSG} "===> to ${LOCALBASE}/${PORTNAME}/redirector.conf and edit it." X @${ECHO_MSG} "===> Add line" X @${ECHO_MSG} "===> redirect_program ${LOCALBASE}/${PORTNAME}/redirector ${LOCALBASE}/${PORTNAME}/redirector.conf" X @${ECHO_MSG} "===> to squid.conf" X @${ECHO_MSG} "===> ----------------------------------------------" X.if defined(WITH_BAN) X @${TAR} -xzf ${DISTDIR}/banlists-2.x.x.tgz X @${MV} banlists ${LOCALBASE}/${PORTNAME}/ X @${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${LOCALBASE}/${PORTNAME}/banlists X.endif X.if defined(WITH_DBL) X @${TAR} -xzf ${DISTDIR}/dbl-2.0.tgz X @${MV} dbl ${LOCALBASE}/${PORTNAME}/ X @${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${LOCALBASE}/${PORTNAME}/dbl X.endif X.if defined(WITH_WWW) X @${TAR} -xzf ${DISTDIR}/www.tgz X @${MV} www ${WWW_PATH}/ban X @${CHOWN} -R ${WWW_USER}:${WWW_GROUP} ${WWW_PATH}/ban X.endif X X.include <bsd.port.post.mk> END-of-rejik/Makefile echo x - rejik/distinfo sed 's/^X//' >rejik/distinfo << 'END-of-rejik/distinfo' XMD5 (redirector-3.2.0.tgz) = 0b5a5c013424716ab1869b742eb16530 XSIZE (redirector-3.2.0.tgz) = 43991 XMD5 (banlists-2.x.x.tgz) = a1c7c48f9ae94b2ef35f56a094285c10 XSIZE (banlists-2.x.x.tgz) = 116100 XMD5 (www.tgz) = 56756aa2a8978c88e3213b060092dfbb XSIZE (www.tgz) = 824 XMD5 (dbl-2.0.tgz) = f8d51329458aaac5b7fe1a89ad9bbd4a XSIZE (dbl-2.0.tgz) = 3355 END-of-rejik/distinfo echo c - rejik/files mkdir -p rejik/files > /dev/null 2>&1 echo x - rejik/pkg-descr sed 's/^X//' >rejik/pkg-descr << 'END-of-rejik/pkg-descr' XRejik is a squid redirector used for blocking unwanted content basing Xon URLs and Perl Compatible Regular Expressions (http://www.pcre.org/). X XWWW: http://www.rejik.ru/ X X- Elisey Savateev Xb3k@mail.ru END-of-rejik/pkg-descr echo x - rejik/pkg-message sed 's/^X//' >rejik/pkg-message << 'END-of-rejik/pkg-message' X1. Make sure that squid runs under user squid and group squid. X X2. Copy /usr/local/rejik/redirector.conf.dist to X /usr/local/rejik/redirector.conf and edit it. X X3. Add line X redirect_program /usr/local/rejik/redirector /usr/local/rejik/redirector.conf X to squid.conf. X X4. Download ban-list and www files from http://www.rejik.ru/ and untar X this. X X5. See http://www.rejik.ru/ for detailed instructions. END-of-rejik/pkg-message echo x - rejik/pkg-plist sed 's/^X//' >rejik/pkg-plist << 'END-of-rejik/pkg-plist' X%%BAN%%rejik/banlists/banners/pcre X%%BAN%%rejik/banlists/banners/urls X%%BAN%%@dirrm rejik/banlists/banners X%%BAN%%rejik/banlists/js/urls X%%BAN%%@dirrm rejik/banlists/js X%%BAN%%rejik/banlists/mp3/pcre X%%BAN%%@dirrm rejik/banlists/mp3 X%%BAN%%rejik/banlists/porno/urls X%%BAN%%@dirrm rejik/banlists/porno X%%BAN%%@dirrm rejik/banlists X%%DBL%%rejik/dbl/FAST X%%DBL%%rejik/dbl/FULL X%%DBL%%@dirrm rejik/dbl/NEW X%%DBL%%rejik/dbl/Update X%%DBL%%rejik/dbl/Update.Fast X%%DBL%%rejik/dbl/dbl_expand X%%DBL%%rejik/dbl/dbl_stat X%%DBL%%@dirrm rejik/dbl/lists X%%DBL%%@dirrm rejik/dbl Xrejik/make-cache Xrejik/redirector Xrejik/redirector.conf.dist Xrejik/tools/IN.gz Xrejik/tools/benchmark Xrejik/tools/check-redirector Xrejik/tools/kill-cache Xrejik/tools/set-permissions X@dirrm rejik/tools X@dirrm rejik X%%WWW%%www/ban/1x1.gif X%%WWW%%www/ban/js.js X%%WWW%%www/ban/mp3.html X%%WWW%%www/ban/porno.html X%%WWW%%@dirrm www/ban END-of-rejik/pkg-plist exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511021011.jA2ABYui056594>