summaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authornovel <novel@FreeBSD.org>2006-03-30 08:17:43 +0000
committernovel <novel@FreeBSD.org>2006-03-30 08:17:43 +0000
commit55979ed6d1de78658580894d2695c60cf4fa5e04 (patch)
treedc686da56805110aa1ec67f65868c39f39d476da /www
parentc18a76ca5e2babecaa0325d191471c573c8c8739 (diff)
downloadFreeBSD-ports-55979ed6d1de78658580894d2695c60cf4fa5e04.zip
FreeBSD-ports-55979ed6d1de78658580894d2695c60cf4fa5e04.tar.gz
- Update to 3.2.1
- Error pages and banlists now installs in ${EXAMPLESDIR} - Improved pkg-plist - Minor cleanups in port Makefile PR: 94042 Submitted by: Elisey O. Savateev (maintainer)
Diffstat (limited to 'www')
-rw-r--r--www/rejik/Makefile56
-rw-r--r--www/rejik/distinfo6
-rw-r--r--www/rejik/files/pkg-message.in6
-rw-r--r--www/rejik/pkg-plist42
4 files changed, 55 insertions, 55 deletions
diff --git a/www/rejik/Makefile b/www/rejik/Makefile
index d5f0db5..1f6f34d 100644
--- a/www/rejik/Makefile
+++ b/www/rejik/Makefile
@@ -6,14 +6,13 @@
#
PORTNAME= rejik
-PORTVERSION= 3.2.0
-PORTREVISION= 1
+PORTVERSION= 3.2.1
CATEGORIES= www
MASTER_SITES= http://www.rejik.ru/download/ \
http://bio3k.softboard.ru/uploads/arch/
DISTNAME= redirector-${PORTVERSION}
EXTRACT_SUFX= .tgz
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
+DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= b3k@mail.ru
@@ -22,21 +21,8 @@ COMMENT= A squid redirector used for blocking unwanted content
LIB_DEPENDS= pcre:${PORTSDIR}/devel/pcre
RUN_DEPENDS= squid:${PORTSDIR}/www/squid
-USE_REINPLACE= yes
-WRKSRC= ${WRKDIR}/redirector
-
-# Redifine this if you need
-SQUID_USER?= squid
-SQUID_GROUP?= squid
-WWW_USER?= www
-WWW_GROUP?= www
-WWW_DIR?= www
-WWW_PATH?= ${PREFIX}/${WWW_DIR}
-INSTALL_DIR?= ${PORTNAME}
-INSTALL_PATH?= ${PREFIX}/${INSTALL_DIR}
-
-PLIST_SUB= WWW_DIR=${WWW_DIR} INSTALL_DIR=${INSTALL_DIR}
-SUB_LIST= WWW_DIR=${WWW_DIR} INSTALL_DIR=${INSTALL_DIR} SQUID_USER=${SQUID_USER} SQUID_GROUP=${SQUID_GROUP}
+PLIST_SUB= INSTALL_DIR=${INSTALL_DIR}
+SUB_LIST= INSTALL_PATH=${INSTALL_PATH} SQUID_USER=${SQUID_USER} SQUID_GROUP=${SQUID_GROUP}
SUB_FILES= pkg-message
OPTIONS= BAN "With banlists" on \
@@ -45,6 +31,12 @@ OPTIONS= BAN "With banlists" on \
.include <bsd.port.pre.mk>
+# Redifine this if you need
+SQUID_USER?= squid
+SQUID_GROUP?= squid
+INSTALL_DIR?= ${PORTNAME}
+INSTALL_PATH?= ${PREFIX}/${INSTALL_DIR}
+
.if !defined(WITHOUT_BAN)
DISTFILES+= banlists-2.x.x.tgz
PLIST_SUB+= BAN=""
@@ -78,28 +70,34 @@ post-extract:
@${ECHO_MSG} "===> ----------------------------------------------"
post-patch:
- @${REINPLACE_CMD} -e 's|SQUID_USER=nobody|SQUID_USER=${SQUID_USER}|; \
- s|SQUID_GROUP=nogroup|SQUID_GROUP=${SQUID_GROUP}|; \
- s|INSTALL_PATH=/usr/local/rejik3|INSTALL_PATH=${INSTALL_PATH}|' \
+ @${REINPLACE_CMD} -e 's|nobody|${SQUID_USER}|g; s|nogroup|${SQUID_GROUP}|g; \
+ s|/usr/local/rejik3|${INSTALL_PATH}|g' \
${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -e 's|/usr/local/rejik3|${INSTALL_PATH}|g' \
+ ${WRKSRC}/vars.h ${WRKSRC}/redirector.conf.dist
post-install:
+ @[ -f ${INSTALL_PATH}/redirector.conf ] || \
+ ${CP} -p ${INSTALL_PATH}/redirector.conf.dist ${INSTALL_PATH}/redirector.conf
.if !defined(WITHOUT_BAN)
- @${TAR} -xzf ${DISTDIR}/banlists-2.x.x.tgz -C ${INSTALL_PATH}
- @${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}/banlists
+.if !exists(${EXAMPLESDIR})
+ @${MKDIR} ${EXAMPLESDIR}
+.endif
+ @${TAR} -xf ${DISTDIR}/banlists-2.x.x.tgz -C ${EXAMPLESDIR}
.endif
.if defined(WITH_DBL)
- @${TAR} -xzf ${DISTDIR}/dbl-2.0.tgz -C ${INSTALL_PATH}
+ @${TAR} -xf ${DISTDIR}/dbl-2.0.tgz -C ${INSTALL_PATH}
@${CHOWN} -R ${SQUID_USER}:${SQUID_GROUP} ${INSTALL_PATH}/dbl
- @${REINPLACE_CMD} -e 's|$WGET="/usr/bin/wget";|$WGET="${LOCALBASE}/wget";| ; \
- s|$dir="/usr/local/rejik3/dbl";|$dir="${INSTALL_PATH}/dbl";|' \
+ @${REINPLACE_CMD} -e 's|/usr/bin/wget|${LOCALBASE}/bin/wget|g ; \
+ s|/usr/local/rejik3|${INSTALL_PATH}|g' \
${INSTALL_PATH}/dbl/Update ${INSTALL_PATH}/dbl/Update.Fast ${INSTALL_PATH}/dbl/dbl_expand
@${RM} ${INSTALL_PATH}/dbl/*.bak
.endif
.if !defined(WITHOUT_WWW)
- @${TAR} -xzf ${DISTDIR}/squid-like-www-en.tgz -C ${WWW_PATH}
- @${MV} ${WWW_PATH}/squid-like-www-en ${WWW_PATH}/ban
- @${CHOWN} -R ${WWW_USER}:${WWW_GROUP} ${WWW_PATH}/ban
+.if !exists(${EXAMPLESDIR})
+ @${MKDIR} ${EXAMPLESDIR}
+.endif
+ @${TAR} -xf ${DISTDIR}/squid-like-www-en.tgz -C ${EXAMPLESDIR}
.endif
@${CAT} ${PKGMESSAGE}
diff --git a/www/rejik/distinfo b/www/rejik/distinfo
index 5536232..9c739779 100644
--- a/www/rejik/distinfo
+++ b/www/rejik/distinfo
@@ -1,6 +1,6 @@
-MD5 (redirector-3.2.0.tgz) = 0b5a5c013424716ab1869b742eb16530
-SHA256 (redirector-3.2.0.tgz) = 725e6b0d8da86da00699170ebe66234c94f57491920e5fe1dd6458a601d31caa
-SIZE (redirector-3.2.0.tgz) = 43991
+MD5 (redirector-3.2.1.tgz) = 0c0f25c1b92eb1a4a9f151935cf538e5
+SHA256 (redirector-3.2.1.tgz) = dea62aa7248cf58931dbb3606dec051fc6949542c62f9468b6702e8677afd057
+SIZE (redirector-3.2.1.tgz) = 46022
MD5 (banlists-2.x.x.tgz) = a1c7c48f9ae94b2ef35f56a094285c10
SHA256 (banlists-2.x.x.tgz) = 221a40e8db9d19477d6fdece00c9152526a0d2f0c2298504fc99b4378457b09e
SIZE (banlists-2.x.x.tgz) = 116100
diff --git a/www/rejik/files/pkg-message.in b/www/rejik/files/pkg-message.in
index e93429f..7192cd3 100644
--- a/www/rejik/files/pkg-message.in
+++ b/www/rejik/files/pkg-message.in
@@ -1,12 +1,10 @@
===============================================================================
1. Make sure that squid runs under user %%SQUID_USER%% and group %%SQUID_GROUP%%.
-2. Copy %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf.dist to
- %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf and edit it.
+2. See %%INSTALL_PATH%%/redirector.conf.dist for default configuration. Edit %%INSTALL_PATH%%/redirector.conf if you need.
3. Add line
- redirect_program %%PREFIX%%/%%INSTALL_DIR%%/redirector %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf
- to squid.conf.
+ redirect_program %%INSTALL_PATH%%/redirector to squid.conf.
4. See http://www.rejik.ru/ for detailed instructions.
===============================================================================
diff --git a/www/rejik/pkg-plist b/www/rejik/pkg-plist
index a3d0109..496c5b9 100644
--- a/www/rejik/pkg-plist
+++ b/www/rejik/pkg-plist
@@ -1,25 +1,18 @@
-%%BAN%%%%INSTALL_DIR%%/banlists/banners/pcre
-%%BAN%%%%INSTALL_DIR%%/banlists/banners/urls
-%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/banners
-%%BAN%%%%INSTALL_DIR%%/banlists/js/urls
-%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/js
-%%BAN%%%%INSTALL_DIR%%/banlists/mp3/pcre
-%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/mp3
-%%BAN%%%%INSTALL_DIR%%/banlists/porno/urls
-%%BAN%%@dirrm %%INSTALL_DIR%%/banlists/porno
-%%BAN%%@dirrm %%INSTALL_DIR%%/banlists
+@comment $FreeBSD$
%%DBL%%%%INSTALL_DIR%%/dbl/FAST
%%DBL%%%%INSTALL_DIR%%/dbl/FULL
-%%DBL%%@dirrm %%INSTALL_DIR%%/dbl/NEW
+%%DBL%%@dirrmtry %%INSTALL_DIR%%/dbl/NEW
%%DBL%%%%INSTALL_DIR%%/dbl/Update
%%DBL%%%%INSTALL_DIR%%/dbl/Update.Fast
%%DBL%%%%INSTALL_DIR%%/dbl/dbl_expand
%%DBL%%%%INSTALL_DIR%%/dbl/dbl_stat
-%%DBL%%@dirrm %%INSTALL_DIR%%/dbl/lists
+%%DBL%%@dirrmtry %%INSTALL_DIR%%/dbl/lists
%%DBL%%@dirrm %%INSTALL_DIR%%/dbl
%%INSTALL_DIR%%/make-cache
%%INSTALL_DIR%%/redirector
+@unexec if cmp -s %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf.dist; then rm -f %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf; fi
%%INSTALL_DIR%%/redirector.conf.dist
+@exec [ -f %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf ] || cp -p %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf.dist %%PREFIX%%/%%INSTALL_DIR%%/redirector.conf
%%INSTALL_DIR%%/tools/IN.gz
%%INSTALL_DIR%%/tools/benchmark
%%INSTALL_DIR%%/tools/check-redirector
@@ -27,10 +20,21 @@
%%INSTALL_DIR%%/tools/set-permissions
@dirrm %%INSTALL_DIR%%/tools
@dirrm %%INSTALL_DIR%%
-%%WWW%%%%WWW_DIR%%/ban/1x1.gif
-%%WWW%%%%WWW_DIR%%/ban/access_denied.html
-%%WWW%%%%WWW_DIR%%/ban/audio-video.html
-%%WWW%%%%WWW_DIR%%/ban/js.js
-%%WWW%%%%WWW_DIR%%/ban/porno.html
-%%WWW%%%%WWW_DIR%%/ban/spyware.html
-%%WWW%%@dirrm %%WWW_DIR%%/ban
+%%BAN%%share/examples/%%INSTALL_DIR%%/banlists/banners/pcre
+%%BAN%%share/examples/%%INSTALL_DIR%%/banlists/banners/urls
+%%BAN%%@dirrm share/examples/%%INSTALL_DIR%%/banlists/banners
+%%BAN%%share/examples/%%INSTALL_DIR%%/banlists/js/urls
+%%BAN%%@dirrm share/examples/%%INSTALL_DIR%%/banlists/js
+%%BAN%%share/examples/%%INSTALL_DIR%%/banlists/mp3/pcre
+%%BAN%%@dirrm share/examples/%%INSTALL_DIR%%/banlists/mp3
+%%BAN%%share/examples/%%INSTALL_DIR%%/banlists/porno/urls
+%%BAN%%@dirrm share/examples/%%INSTALL_DIR%%/banlists/porno
+%%BAN%%@dirrm share/examples/%%INSTALL_DIR%%/banlists
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/1x1.gif
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/access_denied.html
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/audio-video.html
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/js.js
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/porno.html
+%%WWW%%share/examples/%%INSTALL_DIR%%/squid-like-www-en/spyware.html
+%%WWW%%@dirrm share/examples/%%INSTALL_DIR%%/squid-like-www-en
+@dirrmtry share/examples/%%INSTALL_DIR%%
OpenPOWER on IntegriCloud