aboutsummaryrefslogtreecommitdiff
path: root/www/polipo
diff options
context:
space:
mode:
authorBartek Rutkowski <robak@FreeBSD.org>2014-07-12 18:35:35 +0000
committerBartek Rutkowski <robak@FreeBSD.org>2014-07-12 18:35:35 +0000
commit7fa83057a8bc1275287654175d3ff62371d7dbed (patch)
tree1000f6ad329f649f267f742d609f840eee473ce1 /www/polipo
parent4976906e3abec82474898abdfd3521025200d230 (diff)
downloadports-7fa83057a8bc1275287654175d3ff62371d7dbed.tar.gz
ports-7fa83057a8bc1275287654175d3ff62371d7dbed.zip
Notes
Diffstat (limited to 'www/polipo')
-rw-r--r--www/polipo/Makefile47
-rw-r--r--www/polipo/files/pkg-install.in19
-rw-r--r--www/polipo/pkg-plist13
3 files changed, 40 insertions, 39 deletions
diff --git a/www/polipo/Makefile b/www/polipo/Makefile
index 52d150e144da..ceb303f7eb1b 100644
--- a/www/polipo/Makefile
+++ b/www/polipo/Makefile
@@ -8,21 +8,14 @@ MASTER_SITES= http://freehaven.net/~chrisd/polipo/ \
http://www.sax.de/~frank/polipo4bsd/files/
MAINTAINER= frank@pinky.sax.de
-COMMENT= A small and fast caching web proxy
+COMMENT= Small and fast caching web proxy
-MAN1= polipo.1
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/COPYING
USE_RC_SUBR= polipo
-NO_STAGE= yes
-
-.if defined(NO_PTEXINFO)
-ALL_TARGET= polipo
-NOPORTDOCS= yes
-.else
-USES= makeinfo
INFO= polipo
-.endif
.include <bsd.port.pre.mk>
@@ -33,6 +26,7 @@ SUB_FILES= pkg-message pkg-install pkg-deinstall 400.polipo
SUB_LIST+= USER=${PUSER} GROUP=${PGRP} DESTDIR=${DESTDIR} PCONFIGDIR=${PCONFIGDIR} \
PCACHEDIR=${PCACHEDIR} PPIDDIR=${PPIDDIR} PPIDFILE=${PPIDFILE} \
PLOGFILE=${PLOGFILE}
+PLIST_SUB+= RESETPREFIX=${PREFIX}
# polipo installation options, propagated to install scripts
PUSER?= polipo
@@ -44,30 +38,19 @@ PPIDFILE= ${PPIDDIR}polipo.pid
PLOGFILE?= /var/log/polipo
MAKE_ENV+= DISK_CACHE_ROOT=${PCACHEDIR}
-pre-install: apply-slist
- @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/polipo ${PREFIX}/bin/
- ${MKDIR} ${PREFIX}/etc/periodic/daily/
- ${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${PREFIX}/etc/periodic/daily/
- ${INSTALL_MAN} ${WRKSRC}/polipo.man ${PREFIX}/man/man1/polipo.1
- ${MKDIR} ${PCONFIGDIR}
- ${INSTALL_DATA} ${WRKSRC}/config.sample ${PCONFIGDIR}
- ${INSTALL_DATA} ${WRKSRC}/forbidden.sample ${PCONFIGDIR}
- ${CHGRP} -R ${PGRP} ${PCONFIGDIR}
-.if !defined(NO_PTEXINFO)
- ${INSTALL_DATA} ${WRKSRC}/polipo.info ${PREFIX}/info/
-.endif
-.if !defined(NOPORTDOCS)
- ${MKDIR} ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/html/* ${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/localindex.html ${DATADIR}/www/index.html
- ${CHGRP} -R ${PGRP} ${DATADIR}
-.endif
+ ${INSTALL_PROGRAM} ${WRKSRC}/polipo ${STAGEDIR}${PREFIX}/bin/
+ ${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily/
+ ${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${STAGEDIR}${PREFIX}/etc/periodic/daily/
+ ${INSTALL_MAN} ${WRKSRC}/polipo.man ${STAGEDIR}${PREFIX}/man/man1/polipo.1
+ ${MKDIR} ${STAGEDIR}${PCONFIGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/config.sample ${WRKSRC}/forbidden.sample ${STAGEDIR}${PCONFIGDIR}
+ ${INSTALL_DATA} ${WRKSRC}/polipo.info ${STAGEDIR}${PREFIX}/${INFO_PATH}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/html/* ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/localindex.html ${STAGEDIR}${DATADIR}/www/index.html
post-install:
- @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
- @${CAT} ${PKGMESSAGE}
+ ${MKDIR} ${STAGEDIR}${PCACHEDIR}
.include <bsd.port.post.mk>
diff --git a/www/polipo/files/pkg-install.in b/www/polipo/files/pkg-install.in
index b3e7a0f80b2b..ea423355c6ba 100644
--- a/www/polipo/files/pkg-install.in
+++ b/www/polipo/files/pkg-install.in
@@ -46,7 +46,7 @@ elif [ "$2" = "POST-INSTALL" ]; then
if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then
mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1
chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1
- chmod 0770 "%%DESTDIR%%$POLIPOCACHE" || exit 1
+ chmod ug=rwx,o= "%%DESTDIR%%$POLIPOCACHE" || exit 1
fi
if [ ! -d "%%DESTDIR%%$PPIDDIR" ]; then
@@ -58,14 +58,25 @@ elif [ "$2" = "POST-INSTALL" ]; then
if [ ! -f "%%DESTDIR%%$POLIPOLOG" ]; then
touch "%%DESTDIR%%$POLIPOLOG" || exit 1
chown "$POLIPOUSER" "%%DESTDIR%%$POLIPOLOG" || exit 1
- chmod 0640 "%%DESTDIR%%$POLIPOLOG" || exit 1
+ chmod u=rw,g=r,o= "%%DESTDIR%%$POLIPOLOG" || exit 1
fi
-
if ! fgrep "${POLIPOLOG}" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then
- echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J $POLIPOPID 30" >> "%%DESTDIR%%/etc/newsyslog.conf" || exit 1
+ echo "Add a line to /etc/newsyslog.conf (or /usr/local/etc/newsyslog.d/polipo if"
+ echo "supported on your system) to enable automatic log file rotation:"
+ echo
+ echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J ${POLIPOPID} 30"
+ echo
fi
fi
+OSVER=`uname -r | sed -e 's/\..*//'`
+if [ ${OSVER} = "8" -o ${OSVER} = "9" ]; then
+ CACHEPARENT=`dirname ${POLIPOCACHE}`
+ echo "You will need to manually run:"
+ echo " chmod o+x %%DESTDIR%%$CACHEPARENT"
+ echo "to ensure the cache is useable."
+fi
+
exit 0
diff --git a/www/polipo/pkg-plist b/www/polipo/pkg-plist
index 035298d82c98..ecb0b6cee1a9 100644
--- a/www/polipo/pkg-plist
+++ b/www/polipo/pkg-plist
@@ -1,7 +1,14 @@
bin/polipo
-etc/polipo/config.sample
-etc/polipo/forbidden.sample
+@sample etc/polipo/config.sample
+@sample etc/polipo/forbidden.sample
etc/periodic/daily/400.polipo
-%%PORTDOCS%%%%DATADIR%%/www/index.html
+man/man1/polipo.1.gz
+%%DATADIR%%/www/index.html
+@dirrmtry %%DATADIR%%/www
+@dirrmtry %%DATADIR%%
+@dirrmtry etc/polipo
@dirrmtry etc/periodic/daily
@dirrmtry etc/periodic
+@cwd /
+@dirrmtry var/cache/polipo
+@cwd %%RESETPREFIX%%