svn commit: r361633 - in head/www/polipo: . files
Bartek Rutkowski
robak at FreeBSD.org
Sat Jul 12 18:35:36 UTC 2014
Author: robak
Date: Sat Jul 12 18:35:35 2014
New Revision: 361633
URL: http://svnweb.freebsd.org/changeset/ports/361633
QAT: https://qat.redports.org/buildarchive/r361633/
Log:
www/polipo: stage and various fixes
- Add stage support
- Add LICENSE
- Fix man pages handling
- Fix cache dir handling
PR: 185275
Submitted by: Frank Behrens <frank at pinky.sax.de>
Reviewed by: marino (mentor)
Approved by: swills (mentor), blanker (portmgr)
Modified:
head/www/polipo/Makefile
head/www/polipo/files/pkg-install.in
head/www/polipo/pkg-plist
Modified: head/www/polipo/Makefile
==============================================================================
--- head/www/polipo/Makefile Sat Jul 12 18:25:15 2014 (r361632)
+++ head/www/polipo/Makefile Sat Jul 12 18:35:35 2014 (r361633)
@@ -8,21 +8,14 @@ MASTER_SITES= http://freehaven.net/~chri
http://www.sax.de/~frank/polipo4bsd/files/
MAINTAINER= frank at 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-d
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>
Modified: head/www/polipo/files/pkg-install.in
==============================================================================
--- head/www/polipo/files/pkg-install.in Sat Jul 12 18:25:15 2014 (r361632)
+++ head/www/polipo/files/pkg-install.in Sat Jul 12 18:35:35 2014 (r361633)
@@ -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
Modified: head/www/polipo/pkg-plist
==============================================================================
--- head/www/polipo/pkg-plist Sat Jul 12 18:25:15 2014 (r361632)
+++ head/www/polipo/pkg-plist Sat Jul 12 18:35:35 2014 (r361633)
@@ -1,7 +1,14 @@
bin/polipo
-etc/polipo/config.sample
-etc/polipo/forbidden.sample
+ at sample etc/polipo/config.sample
+ at sample etc/polipo/forbidden.sample
etc/periodic/daily/400.polipo
-%%PORTDOCS%%%%DATADIR%%/www/index.html
+man/man1/polipo.1.gz
+%%DATADIR%%/www/index.html
+ at dirrmtry %%DATADIR%%/www
+ at dirrmtry %%DATADIR%%
+ at dirrmtry etc/polipo
@dirrmtry etc/periodic/daily
@dirrmtry etc/periodic
+ at cwd /
+ at dirrmtry var/cache/polipo
+ at cwd %%RESETPREFIX%%
More information about the svn-ports-all
mailing list