[43317] trunk/dports/www/polipo
blb at macports.org
blb at macports.org
Mon Dec 8 19:15:29 PST 2008
Revision: 43317
http://trac.macports.org/changeset/43317
Author: blb at macports.org
Date: 2008-12-08 19:15:29 -0800 (Mon, 08 Dec 2008)
Log Message:
-----------
www/polipo - move config files to ${prefix}/etc and add startupitem
(ticket #14617)
Modified Paths:
--------------
trunk/dports/www/polipo/Portfile
Added Paths:
-----------
trunk/dports/www/polipo/files/
trunk/dports/www/polipo/files/patch-config.sample.diff
trunk/dports/www/polipo/files/patch-forbidden.c.diff
trunk/dports/www/polipo/files/patch-forbidden.sample.diff
trunk/dports/www/polipo/files/patch-main.c.diff
trunk/dports/www/polipo/files/patch-polipo.man.diff
Modified: trunk/dports/www/polipo/Portfile
===================================================================
--- trunk/dports/www/polipo/Portfile 2008-12-09 00:51:55 UTC (rev 43316)
+++ trunk/dports/www/polipo/Portfile 2008-12-09 03:15:29 UTC (rev 43317)
@@ -4,6 +4,7 @@
name polipo
version 1.0.4
+revision 1
categories www
platforms darwin
maintainers boeyms openmaintainer
@@ -17,6 +18,16 @@
sha1 ba562906d125a6bf72dc36c2d078147d40cf8722 \
rmd160 31739c5a5958c136ad452e877636b9f26343684f
+patchfiles patch-config.sample.diff patch-forbidden.c.diff \
+ patch-forbidden.sample.diff patch-main.c.diff \
+ patch-polipo.man.diff
+
+post-patch {
+ reinplace "s|@@PREFIX@@|${prefix}|g" ${worksrcpath}/config.sample \
+ ${worksrcpath}/forbidden.c ${worksrcpath}/forbidden.sample \
+ ${worksrcpath}/main.c ${worksrcpath}/polipo.man
+}
+
use_configure no
build.args PREFIX=${prefix} \
@@ -33,10 +44,16 @@
destroot.keepdirs ${destroot}${prefix}/var/cache/polipo
post-destroot {
+ xinstall -m 755 -d ${destroot}${prefix}/etc/polipo
xinstall -m 644 ${worksrcpath}/config.sample \
- ${destroot}${prefix}/etc/polipo.conf.sample
+ ${worksrcpath}/forbidden.sample ${destroot}${prefix}/etc/polipo/
}
+startupitem.create yes
+startupitem.netchange yes
+startupitem.executable ${prefix}/bin/polipo
+startupitem.name Polipo
+
livecheck.check regex
livecheck.url ${homepage}CHANGES.text
livecheck.regex Polipo (${version})
Added: trunk/dports/www/polipo/files/patch-config.sample.diff
===================================================================
--- trunk/dports/www/polipo/files/patch-config.sample.diff (rev 0)
+++ trunk/dports/www/polipo/files/patch-config.sample.diff 2008-12-09 03:15:29 UTC (rev 43317)
@@ -0,0 +1,11 @@
+--- config.sample.orig 2008-01-08 05:56:45.000000000 -0700
++++ config.sample 2008-03-10 00:43:10.000000000 -0600
+@@ -2,7 +2,7 @@
+
+ # You should not need to use a configuration file; all configuration
+ # variables have reasonable defaults. If you want to use one, you
+-# can copy this to /etc/polipo/config or to ~/.polipo and modify.
++# can copy this to @@PREFIX@@/etc/polipo/config or to ~/.polipo and modify.
+
+ # This file only contains some of the configuration variables; see the
+ # list given by ``polipo -v'' and the manual for more.
Added: trunk/dports/www/polipo/files/patch-forbidden.c.diff
===================================================================
--- trunk/dports/www/polipo/files/patch-forbidden.c.diff (rev 0)
+++ trunk/dports/www/polipo/files/patch-forbidden.c.diff 2008-12-09 03:15:29 UTC (rev 43317)
@@ -0,0 +1,24 @@
+--- forbidden.c.orig 2008-01-08 05:56:45.000000000 -0700
++++ forbidden.c 2008-03-10 00:44:17.000000000 -0600
+@@ -304,8 +304,8 @@
+ }
+
+ if(forbiddenFile == NULL) {
+- if(access("/etc/polipo/forbidden", F_OK) >= 0)
+- forbiddenFile = internAtom("/etc/polipo/forbidden");
++ if(access("@@PREFIX@@/etc/polipo/forbidden", F_OK) >= 0)
++ forbiddenFile = internAtom("@@PREFIX@@/etc/polipo/forbidden");
+ }
+
+ parseDomainFile(forbiddenFile, &forbiddenDomains, &forbiddenRegex);
+@@ -325,8 +325,8 @@
+ }
+
+ if(uncachableFile == NULL) {
+- if(access("/etc/polipo/uncachable", F_OK) >= 0)
+- uncachableFile = internAtom("/etc/polipo/uncachable");
++ if(access("@@PREFIX@@/etc/polipo/uncachable", F_OK) >= 0)
++ uncachableFile = internAtom("@@PREFIX@@/etc/polipo/uncachable");
+ }
+
+ parseDomainFile(uncachableFile, &uncachableDomains, &uncachableRegex);
Added: trunk/dports/www/polipo/files/patch-forbidden.sample.diff
===================================================================
--- trunk/dports/www/polipo/files/patch-forbidden.sample.diff (rev 0)
+++ trunk/dports/www/polipo/files/patch-forbidden.sample.diff 2008-12-09 03:15:29 UTC (rev 43317)
@@ -0,0 +1,9 @@
+--- forbidden.sample.diff 2008-01-08 05:56:45.000000000 -0700
++++ forbidden.sample 2008-03-10 00:52:20.000000000 -0600
+@@ -1,5 +1,5 @@
+ # Sample forbidden URLs file for polipo. -*-sh-*-
+-# Put this in /etc/polipo/forbidden or in ~/.polipo-forbidden.
++# Put this in @@PREFIX@@/etc/polipo/forbidden or in ~/.polipo-forbidden.
+
+ # Forbid all hosts belonging to a given domain name:
+
Added: trunk/dports/www/polipo/files/patch-main.c.diff
===================================================================
--- trunk/dports/www/polipo/files/patch-main.c.diff (rev 0)
+++ trunk/dports/www/polipo/files/patch-main.c.diff 2008-12-09 03:15:29 UTC (rev 43317)
@@ -0,0 +1,13 @@
+--- main.c.orig 2008-01-08 05:56:45.000000000 -0700
++++ main.c 2008-03-10 00:52:52.000000000 -0600
+@@ -107,8 +107,8 @@
+ }
+
+ if(configFile == NULL) {
+- if(access("/etc/polipo/config", F_OK) >= 0)
+- configFile = internAtom("/etc/polipo/config");
++ if(access("@@PREFIX@@/etc/polipo/config", F_OK) >= 0)
++ configFile = internAtom("@@PREFIX@@/etc/polipo/config");
+ if(configFile && access(configFile->string, F_OK) < 0) {
+ releaseAtom(configFile);
+ configFile = NULL;
Added: trunk/dports/www/polipo/files/patch-polipo.man.diff
===================================================================
--- trunk/dports/www/polipo/files/patch-polipo.man.diff (rev 0)
+++ trunk/dports/www/polipo/files/patch-polipo.man.diff 2008-12-09 03:15:29 UTC (rev 43317)
@@ -0,0 +1,23 @@
+--- polipo.man.orig 2008-01-08 05:56:45.000000000 -0700
++++ polipo.man 2008-03-10 00:53:55.000000000 -0600
+@@ -43,16 +43,16 @@
+ Change the value of a configuration variable.
+ .SH FILES
+ .TP
+-.B /etc/polipo/config
++.B @@PREFIX@@/etc/polipo/config
+ The default location of Polipo's configuration file.
+ .TP
+-.B /etc/polipo/forbidden
++.B @@PREFIX@@/etc/polipo/forbidden
+ The default location of the list of forbidden URLs.
+ .TP
+-.B /var/cache/polipo/
++.B @@PREFIX@@/var/cache/polipo/
+ The default location of the on-disk cache.
+ .TP
+-.B /usr/share/polipo/www/
++.B @@PREFIX@@/share/polipo/www/
+ The default root of the local web space.
+ .SH SIGNALS
+ .TP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20081208/925c80be/attachment-0001.html>
More information about the macports-changes
mailing list