FreeBSD Bugzilla – Attachment 49478 Details for
Bug 75554
[New Port] www/polipo A web caching proxy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
polipo-0.9.7-port.shar
polipo-0.9.7-port.shar (text/plain), 12.46 KB, created by
Frank Behrens
on 2004-12-27 21:20:25 UTC
(
hide
)
Description:
polipo-0.9.7-port.shar
Filename:
MIME Type:
Creator:
Frank Behrens
Created:
2004-12-27 21:20:25 UTC
Size:
12.46 KB
patch
obsolete
># 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: ># ># Makefile ># pkg-descr ># pkg-plist ># distinfo ># files ># files/400.polipo.in ># files/patch-aa ># files/pkg-deinstall.in ># files/pkg-install.in ># files/pkg-message.in ># files/polipo.sh.in ># >echo x - Makefile >sed 's/^X//' >Makefile << 'END-of-Makefile' >X# New ports collection makefile for: polipo >X# Date created: 2004-12-27 >X# Whom: Frank Behrens <frank@pinky.sax.de> >X# >X# $FreeBSD$ >X# >X >XPORTNAME= polipo >XPORTVERSION= 0.9.7 >XCATEGORIES= www >XMASTER_SITES= http://www.pps.jussieu.fr/~jch/software/files/polipo/ \ >X http://www.sax.de/~frank/polipo4bsd/files/ >X >XMAINTAINER= frank@pinky.sax.de >XCOMMENT= A small and fast caching web proxy >X >XMAN1= polipo.1 >X >XUSE_RC_SUBR= yes >X >X.include <bsd.port.pre.mk> >X# in some 4.x makeinfo does not work. So we do not try to build and install. >X.if ${OSVERSION} < 500000 >XNO_PTEXINFO= yes >X.endif >X.if defined(NO_PTEXINFO) >XALL_TARGET= polipo >XNOPORTDOCS= yes >XNO_PORTDOCS= yes >X.else >XINFO= polipo >X.endif >X >X.if !defined(NOPORTDOCS) >X DOCSDIR= ${DATADIR}/www/doc >X PORTDOCS= * >X PLIST_FILES+= share/polipo/www/index.html >X.endif >X >X# created on the fly due to variable substitution >XPKGINSTALL= ${WRKDIR}/pkg-install >XPKGDEINSTALL= ${WRKDIR}/pkg-deinstall >XPKGMESSAGE= ${WRKDIR}/pkg-message >X >XPATCHINSTALLFILES=pkg-message pkg-install pkg-deinstall 400.polipo polipo.sh >X >X# polipo installation options, propagated to install scripts >XPUSER?= polipo >XPGRP?= polipo >XPCONFIGDIR?= ${PREFIX}/etc/polipo/ >XPCACHEDIR?= /var/cache/polipo >XPPIDDIR?= /var/run/polipo/ >XPPIDFILE= ${PPIDDIR}polipo.pid >XPLOGFILE?= /var/log/polipo >XMAKE_ENV+= DISK_CACHE_ROOT=${PCACHEDIR} >X >Xdo-install: >X ${INSTALL_PROGRAM} ${WRKSRC}/polipo ${DESTDIR}${PREFIX}/bin/ >X ${INSTALL_SCRIPT} ${WRKDIR}/polipo.sh ${DESTDIR}${PREFIX}/etc/rc.d/ >X ${MKDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily/ >X ${INSTALL_SCRIPT} ${WRKDIR}/400.polipo ${DESTDIR}${PREFIX}/etc/periodic/daily/ >X ${INSTALL_MAN} ${WRKSRC}/polipo.man ${DESTDIR}${PREFIX}/man/man1/polipo.1 >X ${MKDIR} ${DESTDIR}${PCONFIGDIR} >X ${INSTALL_DATA} ${WRKSRC}/config.sample ${DESTDIR}${PCONFIGDIR} >X ${INSTALL_DATA} ${WRKSRC}/forbidden.sample ${DESTDIR}${PCONFIGDIR} >X ${CHGRP} -R ${PGRP} ${DESTDIR}${PCONFIGDIR} >X.if !defined(NO_PTEXINFO) >X ${INSTALL_DATA} ${WRKSRC}/polipo.info ${DESTDIR}${PREFIX}/info/ >X install-info ${PREFIX}/info/polipo.info ${DESTDIR}${PREFIX}/info/dir >X.endif >X.if !defined(NOPORTDOCS) >X ${MKDIR} ${DESTDIR}${DOCSDIR} >X ${INSTALL_DATA} ${WRKSRC}/html/* ${DESTDIR}${DOCSDIR} >X ${INSTALL_DATA} ${WRKSRC}/localindex.html ${DESTDIR}${DATADIR}/www/index.html >X ${CHGRP} -R ${PGRP} ${DESTDIR}${DATADIR} >X.endif >X >Xpre-install: >X.for _F in ${PATCHINSTALLFILES} >X ${SED} -e "s:%%USER%%:${PUSER}:g" \ >X -e "s:%%GROUP%%:${PGRP}:g" \ >X -e "s:%%DESTDIR%%:${DESTDIR}:g" \ >X -e "s:%%PREFIX%%:${PREFIX}:g" \ >X -e "s:%%DOCSDIR%%:${DOCSDIR}:g" \ >X -e "s:%%DATADIR%%:${DATADIR}:g" \ >X -e "s:%%PCONFIGDIR%%:${PCONFIGDIR}:g" \ >X -e "s:%%PCACHEDIR%%:${PCACHEDIR}:g" \ >X -e "s:%%PPIDDIR%%:${PPIDDIR}:g" \ >X -e "s:%%PPIDFILE%%:${PPIDFILE}:g" \ >X -e "s:%%PLOGFILE%%:${PLOGFILE}:g" \ >X -e "s:%%RC_SUBR%%:${RC_SUBR}:g" \ >X <${FILESDIR}/${_F}.in >${WRKDIR}/${_F} >X.endfor >X @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL >X >Xpost-install: >X @PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL >X ${CAT} ${PKGMESSAGE} >X >X.include <bsd.port.post.mk> >END-of-Makefile >echo x - pkg-descr >sed 's/^X//' >pkg-descr << 'END-of-pkg-descr' >XPolipo is a small and fast caching web proxy (a web cache, an HTTP proxy) >Xdesigned to be used by one person or a small group of people. >X >XWWW: http://www.pps.jussieu.fr/~jch/software/polipo/ >XAuthor: Juliusz Chroboczek <jch@pps.jussieu.fr> >X >XBSD port: http://www.sax.de/~frank/polipo4bsd/ >X-- >XFrank Behrens >Xfrank@pinky.sax.de >END-of-pkg-descr >echo x - pkg-plist >sed 's/^X//' >pkg-plist << 'END-of-pkg-plist' >Xbin/polipo >Xetc/polipo/config.sample >Xetc/polipo/forbidden.sample >Xetc/rc.d/polipo.sh >Xetc/periodic/daily/400.polipo >END-of-pkg-plist >echo x - distinfo >sed 's/^X//' >distinfo << 'END-of-distinfo' >XMD5 (polipo-0.9.7.tar.gz) = 76fda6c864711f45a80db428a9f1da31 >XSIZE (polipo-0.9.7.tar.gz) = 147415 >END-of-distinfo >echo c - files >mkdir -p files > /dev/null 2>&1 >echo x - files/400.polipo.in >sed 's/^X//' >files/400.polipo.in << 'END-of-files/400.polipo.in' >X#!/bin/sh >X# >X# control file for periodic/daily >X# polipo expiry >X# >X# >X >Xif [ -r %%DESTDIR%%%%PREFIX%%/etc/rc.d/polipo.sh ] >Xthen >X echo "" >X echo "polipo expiry:" >X %%DESTDIR%%%%PREFIX%%/etc/rc.d/polipo.sh expire >Xfi >X >Xexit 0 >END-of-files/400.polipo.in >echo x - files/patch-aa >sed 's/^X//' >files/patch-aa << 'END-of-files/patch-aa' >X--- Makefile Tue Jun 29 02:07:35 2004 >X+++ Makefile Mon Dec 27 15:35:40 2004 >X@@ -2,8 +2,8 @@ >X BINDIR = $(PREFIX)/bin >X MANDIR = $(PREFIX)/man >X INFODIR = $(PREFIX)/info >X-LOCAL_ROOT = /usr/share/polipo/www >X-DISK_CACHE_ROOT = /var/cache/polipo >X+LOCAL_ROOT = $(PREFIX)/share/polipo/www >X+DISK_CACHE_ROOT ?= /var/cache/polipo >X >X # CDEBUGFLAGS = -O >X >X@@ -47,7 +47,8 @@ >X >X DEFINES = $(FILE_DEFINES) $(PLATFORM_DEFINES) >X >X-CFLAGS = $(MD5INCLUDES) $(CDEBUGFLAGS) $(DEFINES) $(EXTRA_DEFINES) >X+CFLAGS ?= $(CDEBUGFLAGS) >X+CFLAGS += $(MD5INCLUDES) $(DEFINES) $(EXTRA_DEFINES) >X >X SRCS = util.c event.c io.c chunk.c atom.c object.c log.c diskcache.c main.c \ >X config.c local.c http.c client.c server.c auth.c tunnel.c \ >X--- config.sample Mon Sep 6 23:31:57 2004 >X+++ config.sample Mon Dec 27 15:35:40 2004 >X@@ -65,6 +65,11 @@ >X >X # localDocumentRoot = "" >X >X+# Access rights for new cache files. >X+diskCacheFilePermissions=0640 >X+# Access rights for new directories. >X+diskCacheDirectoryPermissions=0750 >X+ >X >X ### Domain Name System >X ### ****************** >X--- forbidden.c Sat Sep 11 00:31:24 2004 >X+++ forbidden.c Mon Dec 27 15:35:40 2004 >X@@ -158,8 +158,8 @@ >X } >X >X if(forbiddenFile == NULL) { >X- if(access("/etc/polipo/forbidden", F_OK) >= 0) >X- forbiddenFile = internAtom("/etc/polipo/forbidden"); >X+ if(access("/usr/local/etc/polipo/forbidden", F_OK) >= 0) >X+ forbiddenFile = internAtom("/usr/local/etc/polipo/forbidden"); >X } >X >X if(have_forbiddenDomains) { >X--- main.c Tue Oct 5 23:41:49 2004 >X+++ main.c Mon Dec 27 15:35:40 2004 >X@@ -106,8 +106,8 @@ >X } >X >X if(configFile == NULL) { >X- if(access("/etc/polipo/config", F_OK) >= 0) >X- configFile = internAtom("/etc/polipo/config"); >X+ if(access("/usr/local/etc/polipo/config", F_OK) >= 0) >X+ configFile = internAtom("/usr/local/etc/polipo/config"); >X if(configFile && access(configFile->string, F_OK) < 0) { >X releaseAtom(configFile); >X configFile = NULL; >X--- polipo.man Tue Jun 29 02:07:35 2004 >X+++ polipo.man Mon Dec 27 15:35:40 2004 >X@@ -43,16 +43,16 @@ >X Change the value of a configuration variable. >X .SH FILES >X .TP >X-.B /etc/polipo/config >X+.B /usr/local/etc/polipo/config >X The default location of Polipo's configuration file. >X .TP >X-.B /etc/polipo/forbidden >X+.B /usr/local/etc/polipo/forbidden >X The default location of the list of forbidden URLs. >X .TP >X .B /var/cache/polipo/ >X The default location of the on-disk cache. >X .TP >X-.B /usr/share/polipo/www/ >X+.B /usr/local/share/polipo/www/ >X The default root of the local web space. >X .SH SIGNALS >X .TP >END-of-files/patch-aa >echo x - files/pkg-deinstall.in >sed 's/^X//' >files/pkg-deinstall.in << 'END-of-files/pkg-deinstall.in' >X#!/bin/sh >X >X >Xif [ "$2" != "POST-DEINSTALL" ]; then >X exit 0 >Xfi >X >XPOLIPOUSER=%%USER%% >XPOLIPOGROUP=%%GROUP%% >X >XPCONFIGDIR=%%PCONFIGDIR%% >XPPIDDIR=%%PPIDDIR%% >XPOLIPOCACHE=%%PCACHEDIR%% >XPOLIPOLOG=%%PLOGFILE%% >XPOLIPOPID=%%PPIDFILE%% >XPOLIPODATA=%%DATADIR%% >X >X >Xif pw usershow "${POLIPOUSER}" 2>/dev/null 1>&2; then >X echo "---> To delete ${POLIPOUSER} user permanently, use 'pw userdel \"${POLIPOUSER}\"'" >Xfi >X >Xif [ -d "$POLIPOCACHE" ]; then >X rm -r "$POLIPOCACHE" || exit 1 >Xfi >Xif [ -d "$PPIDDIR" ]; then >X rm -r "$PPIDDIR" || exit 1 >Xfi >X >Xif fgrep "${POLIPOLOG}" "/etc/newsyslog.conf" 2>/dev/null 1>&2; then >X echo "---> You should remove from /etc/newsyslog.conf the \"${POLIPOLOG}\" entry manually." >Xfi >X >Xrmdir $POLIPODATA/www/doc $POLIPODATA/www $POLIPODATA 2>/dev/null >Xrmdir $PCONFIGDIR 2>/dev/null || echo "---> If you not plan to reinstall polipo, you can safely remove ${PCONFIGDIR}." >Xexit 0 >END-of-files/pkg-deinstall.in >echo x - files/pkg-install.in >sed 's/^X//' >files/pkg-install.in << 'END-of-files/pkg-install.in' >X#!/bin/sh >X >X >X >XPOLIPOUSER=%%USER%% >XPOLIPOGROUP=%%GROUP%% >X >XPOLIPOCACHE=%%PCACHEDIR%% >XPOLIPOLOG=%%PLOGFILE%% >XPPIDDIR=%%PPIDDIR%% >XPOLIPOPID=%%PPIDFILE%% >X >Xif [ "$2" = "PRE-INSTALL" ]; then >X >X if [ "%%RC_SUBR%%" = "" ]; then >X echo "=> Port requires /etc/rc.subr (native or port/sysutils/rc_subr)!" >X echo "=> If you want to install without you should modify startup script and pkg-install." >X exit 1 >X fi >X >X if fgrep "polipo" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then >X if ! fgrep "polipo.pid" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then >X echo "==> ERROR: Previous installation left an invalid entry in %%DESTDIR%%/etc/newsyslog.conf." >X echo "==> Please remove the polipo line from this file and try again." >X exit 1 >X fi >X fi >X >X if ! pw groupshow "$POLIPOGROUP" 2>/dev/null 1>&2; then >X if pw groupadd $POLIPOGROUP ; then >X echo "=> Added group \"$POLIPOGROUP\"." >X else >X echo "=> Adding group \"$POLIPOGROUP\" failed..." >X exit 1 >X fi >X fi >X >X if ! pw usershow "$POLIPOUSER" 2>/dev/null 1>&2; then >X if pw useradd $POLIPOUSER -g $POLIPOGROUP -h - \ >X -s "/sbin/nologin" -d "/nonexistent" \ >X -c "polipo web cache"; \ >X then >X pw groupmod mail -m $POLIPOUSER >X echo "=> Added user \"$POLIPOUSER\"." >X else >X echo "=> Adding user \"$POLIPOUSER\" failed..." >X exit 1 >X fi >X fi >X >Xelif [ "$2" = "POST-INSTALL" ]; then >X >X if [ ! -d "%%DESTDIR%%$POLIPOCACHE" ]; then >X mkdir -p "%%DESTDIR%%$POLIPOCACHE" || exit 1 >X chown "$POLIPOUSER:$POLIPOGROUP" "%%DESTDIR%%$POLIPOCACHE" || exit 1 >X chmod 0770 "%%DESTDIR%%$POLIPOCACHE" || exit 1 >X fi >X >X if [ ! -d "%%DESTDIR%%$PPIDDIR" ]; then >X mkdir -p "%%DESTDIR%%$PPIDDIR" || exit 1 >X chgrp "$POLIPOGROUP" "%%DESTDIR%%$PPIDDIR" || exit 1 >X chmod g+w "%%DESTDIR%%$PPIDDIR" || exit 1 >X fi >X >X >X if [ ! -f "%%DESTDIR%%$POLIPOLOG" ]; then >X touch "%%DESTDIR%%$POLIPOLOG" || exit 1 >X chown "$POLIPOUSER" "%%DESTDIR%%$POLIPOLOG" || exit 1 >X chmod 0640 "%%DESTDIR%%$POLIPOLOG" || exit 1 >X fi >X >X >X if ! fgrep "${POLIPOLOG}" "%%DESTDIR%%/etc/newsyslog.conf" 2>/dev/null 1>&2; then >X echo "${POLIPOLOG} ${POLIPOUSER}: 640 3 100 * J $POLIPOPID 30" >> "%%DESTDIR%%/etc/newsyslog.conf" || exit 1 >X fi >X >Xfi >X >Xexit 0 >END-of-files/pkg-install.in >echo x - files/pkg-message.in >sed 's/^X//' >files/pkg-message.in << 'END-of-files/pkg-message.in' >X >X****************************************************************************** >XTo complete the polipo installation you should: >X >X1. copy the configuration file example and modify it if desired >X cd %%PCONFIGDIR%% >X cp config.sample config >X vi config >X >X2. enable automatic polipo startup with entry in %%DESTDIR%%/etc/rc.conf.local or %%DESTDIR%%/etc/rc.conf >X polipo_enable="YES" >X >X3. start polipo >X %%DESTDIR%%%%PREFIX%%/etc/rc.d/polipo start >X >X4. point your browser to the new proxy server, the default port is 8123 >X****************************************************************************** >X >END-of-files/pkg-message.in >echo x - files/polipo.sh.in >sed 's/^X//' >files/polipo.sh.in << 'END-of-files/polipo.sh.in' >X#!/bin/sh >X# >X >X# PROVIDE: polipo >X# REQUIRE: NETWORK >X# BEFORE: NETWORK >X# KEYWORD: FreeBSD >X >X. %%RC_SUBR%% >X >Xname=polipo >Xrcvar=`set_rcvar` >Xpolipo_enable=${polipo_enable:-"NO"} >Xpolipo_flags=${polipo_flags:-""} >Xpolipo_user=%%USER%% >Xpolipo_group=%%GROUP%% >Xpidfile=%%PPIDFILE%% >Xconfig_file=%%PCONFIGDIR%%config >Xrequired_files=$config_file >X >Xcommand="%%PREFIX%%/bin/polipo" >Xconfig_args="-c ${config_file}" >Xcommand_args="$config_args daemonise=true pidFile=${pidfile}" >X >Xextra_commands=expire >X >Xexpire_cmd=expire_cmd >Xexpire_cmd () { >X if [ $rc_pid ]; then >X kill -USR1 $rc_pid >X # allow polipo to write out all files >X sleep 5 >X fi >X su -m ${polipo_user} -c "${command} ${config_args} -x" >X if [ $rc_pid ]; then >X kill -USR2 $rc_pid >X fi >X} >X >X >Xload_rc_config $name >X >Xrun_rc_command "$1" >X >END-of-files/polipo.sh.in >exit
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 75554
: 49478