[90384] trunk/dports/www/privoxy/Portfile
ryandesign at macports.org
ryandesign at macports.org
Sat Mar 3 17:52:22 PST 2012
Revision: 90384
http://trac.macports.org/changeset/90384
Author: ryandesign at macports.org
Date: 2012-03-03 17:52:20 -0800 (Sat, 03 Mar 2012)
Log Message:
-----------
privoxy: add modeline; adjust whitespace
Modified Paths:
--------------
trunk/dports/www/privoxy/Portfile
Modified: trunk/dports/www/privoxy/Portfile
===================================================================
--- trunk/dports/www/privoxy/Portfile 2012-03-04 01:47:50 UTC (rev 90383)
+++ trunk/dports/www/privoxy/Portfile 2012-03-04 01:52:20 UTC (rev 90384)
@@ -1,160 +1,165 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id$
-PortSystem 1.0
-name privoxy
-version 3.0.17
-revision 0
-categories www security net
-license GPL-2
-maintainers nomaintainer
-description Advanced filtering web proxy
-long_description \
- Privoxy is a web proxy with advanced filtering capabilities for \
- protecting privacy, modifying web page content, managing cookies, \
- controlling access, and removing ads, banners, pop-ups and other \
- obnoxious Internet junk. Privoxy has a very flexible configuration and \
- can be customized to suit individual needs and tastes. Privoxy has \
- application for both stand-alone systems and multi-user networks.
+PortSystem 1.0
-platforms darwin
+name privoxy
+version 3.0.17
+revision 0
+categories www security net
+platforms darwin
+license GPL-2
+maintainers nomaintainer
-homepage http://www.privoxy.org/
-master_sites sourceforge:ijbswa
-distname ${name}-${version}-stable-src
+description Advanced filtering web proxy
+long_description Privoxy is a web proxy with advanced filtering \
+ capabilities for protecting privacy, modifying web page \
+ content, managing cookies, controlling access, and \
+ removing ads, banners, pop-ups and other obnoxious \
+ Internet junk. Privoxy has a very flexible configuration \
+ and can be customized to suit individual needs and tastes. \
+ Privoxy has application for both stand-alone systems and \
+ multi-user networks.
+
+homepage http://www.privoxy.org/
+master_sites sourceforge:ijbswa
+distname ${name}-${version}-stable-src
+
checksums md5 9d363d738a3f3d73e774d6dfeafdb15f \
sha1 cadef2eb8ec182278e092322d3d56f225cb69c93 \
rmd160 8e4acc60ca7e7be20a92e1aece92eecedd4d1997
-worksrcdir ${name}-${version}-stable
+worksrcdir ${name}-${version}-stable
-depends_lib port:pcre port:zlib
+depends_lib port:pcre \
+ port:zlib
-set privoxyGroup privoxy
-set privoxyUser privoxy
+set privoxyGroup privoxy
+set privoxyUser privoxy
if {[tbool portarchivemode]} {
pre-unarchive {
- addgroup ${privoxyGroup}
- adduser ${privoxyUser} gid=[existsgroup ${privoxyGroup}]
+ addgroup ${privoxyGroup}
+ adduser ${privoxyUser} gid=[existsgroup ${privoxyGroup}]
}
}
pre-configure {
if {![tbool portarchivemode]} {
- addgroup ${privoxyGroup}
- adduser ${privoxyUser} gid=[existsgroup ${privoxyGroup}]
+ addgroup ${privoxyGroup}
+ adduser ${privoxyUser} gid=[existsgroup ${privoxyGroup}]
}
if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
- configure.args-append --with-user=${privoxyUser} \
- --with-group=${privoxyGroup}
+ configure.args-append --with-user=${privoxyUser} \
+ --with-group=${privoxyGroup}
}
system "cd ${worksrcpath} && autoheader"
}
-use_autoconf yes
-configure.args --sysconfdir=${prefix}/etc/${name} \
- --mandir=${prefix}/share/man \
- --enable-dynamic-pcre \
- --enable-zlib
+use_autoconf yes
+configure.args --sysconfdir=${prefix}/etc/${name} \
+ --mandir=${prefix}/share/man \
+ --enable-dynamic-pcre \
+ --enable-zlib
# work around bug 30345
post-configure {
file delete ${workpath}/.CC_PRINT_OPTIONS
}
-destroot.keepdirs ${destroot}${prefix}/var/log/privoxy \
- ${destroot}${prefix}/var/run
+destroot.keepdirs ${destroot}${prefix}/var/log/privoxy \
+ ${destroot}${prefix}/var/run
post-destroot {
- xinstall -m 755 -d ${destroot}${prefix}/var/run
- # Install and fixup startup script (if non-Darwin)
- if {${os.platform} != "darwin"} {
- xinstall -m 755 -d ${destroot}${prefix}/etc/rc.d
- xinstall -m 755 -W ${worksrcpath} privoxy-generic.init \
- ${destroot}${prefix}/etc/rc.d/privoxy.sh
-
- system "cd ${destroot}${prefix}/etc/rc.d && patch -p0 < ${filespath}/patch-privoxy.sh.diff"
- reinplace "s|@@PREFIX@@|${prefix}|g" \
- ${destroot}${prefix}/etc/rc.d/privoxy.sh
- if {[existsuser ${privoxyUser}] != 0} {
+ xinstall -m 755 -d ${destroot}${prefix}/var/run
+ # Install and fixup startup script (if non-Darwin)
+ if {${os.platform} != "darwin"} {
+ xinstall -m 755 -d ${destroot}${prefix}/etc/rc.d
+ xinstall -m 755 -W ${worksrcpath} privoxy-generic.init \
+ ${destroot}${prefix}/etc/rc.d/privoxy.sh
+
+ system "cd ${destroot}${prefix}/etc/rc.d && patch -p0 < ${filespath}/patch-privoxy.sh.diff"
+ reinplace "s|@@PREFIX@@|${prefix}|g" \
+ ${destroot}${prefix}/etc/rc.d/privoxy.sh
+ if {[existsuser ${privoxyUser}] != 0} {
reinplace "s|@@PRIVOXY_USER@@|${privoxyUser}|g" \
${destroot}${prefix}/etc/rc.d/privoxy.sh
- } else {
+ } else {
reinplace "s|@@PRIVOXY_USER@@|$env(USER)|g" \
${destroot}${prefix}/etc/rc.d/privoxy.sh
- }
- }
- # Rename these so local modifications are not removed on uninstall.
- # NOTE: Always overwrite default.action and default.filter.
- foreach privoxyConf {config match-all.action trust user.action user.filter} {
+ }
+ }
+ # Rename these so local modifications are not removed on uninstall.
+ # NOTE: Always overwrite default.action and default.filter.
+ foreach privoxyConf {config match-all.action trust user.action user.filter} {
if [file exists ${destroot}${prefix}/etc/privoxy/${privoxyConf}] {
- file rename ${destroot}${prefix}/etc/privoxy/${privoxyConf} \
- ${destroot}${prefix}/etc/privoxy/${privoxyConf}.new
+ file rename ${destroot}${prefix}/etc/privoxy/${privoxyConf} \
+ ${destroot}${prefix}/etc/privoxy/${privoxyConf}.new
}
- # backup config files before fix #23970
+ # backup config files before fix #23970
if {[file exists ${prefix}/etc/privoxy/${privoxyConf}] \
- && ![file exists ${prefix}/etc/privoxy/${privoxyConf}.new]} {
- file copy ${prefix}/etc/privoxy/${privoxyConf} \
- ${destroot}${prefix}/etc/privoxy/${privoxyConf}.mp_backup
+ && ![file exists ${prefix}/etc/privoxy/${privoxyConf}.new]} {
+ file copy ${prefix}/etc/privoxy/${privoxyConf} \
+ ${destroot}${prefix}/etc/privoxy/${privoxyConf}.mp_backup
}
- }
- # Remove the preinstalled log files as, otherwise, a rotation script
- # will fail when trying to rename and compress due to gzip not liking
- # multi-linked files (the one in ${prefix} and the one in
- # ${prefix}/var/db/dports/software/...)
- eval file delete [glob ${destroot}${prefix}/var/log/privoxy/*]
- if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
+ }
+ # Remove the preinstalled log files as, otherwise, a rotation script
+ # will fail when trying to rename and compress due to gzip not liking
+ # multi-linked files (the one in ${prefix} and the one in
+ # ${prefix}/var/db/dports/software/...)
+ eval file delete [glob ${destroot}${prefix}/var/log/privoxy/*]
+ if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
# Make sure log directory owned by privoxy user/group
file attributes ${destroot}${prefix}/var/log/privoxy \
-group ${privoxyGroup} -owner ${privoxyUser}
- }
+ }
}
post-activate {
- # Make sure initial log files are present and setup correctly
- foreach privoxyLog {jarfile logfile} {
- touch ${prefix}/var/log/privoxy/${privoxyLog}
- if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
+ # Make sure initial log files are present and setup correctly
+ foreach privoxyLog {jarfile logfile} {
+ touch ${prefix}/var/log/privoxy/${privoxyLog}
+ if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
file attributes ${prefix}/var/log/privoxy/${privoxyLog} \
-group ${privoxyGroup} -owner ${privoxyUser} \
-permissions 0660
- }
- }
- foreach privoxyConf {config match-all.action trust user.action user.filter} {
- if ![file exists ${prefix}/etc/privoxy/${privoxyConf}] {
- # restore config files before fix #23970
- if [file exists ${prefix}/etc/privoxy/${privoxyConf}.mp_backup] {
- file copy ${prefix}/etc/privoxy/${privoxyConf}.mp_backup \
- ${prefix}/etc/privoxy/${privoxyConf}
- } else {
- file copy ${prefix}/etc/privoxy/${privoxyConf}.new \
- ${prefix}/etc/privoxy/${privoxyConf}
- }
- if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
+ }
+ }
+ foreach privoxyConf {config match-all.action trust user.action user.filter} {
+ if ![file exists ${prefix}/etc/privoxy/${privoxyConf}] {
+ # restore config files before fix #23970
+ if [file exists ${prefix}/etc/privoxy/${privoxyConf}.mp_backup] {
+ file copy ${prefix}/etc/privoxy/${privoxyConf}.mp_backup \
+ ${prefix}/etc/privoxy/${privoxyConf}
+ } else {
+ file copy ${prefix}/etc/privoxy/${privoxyConf}.new \
+ ${prefix}/etc/privoxy/${privoxyConf}
+ }
+ if {[existsuser ${privoxyUser}] != 0 && [existsgroup ${privoxyGroup}] != 0} {
file attributes ${prefix}/etc/privoxy/${privoxyConf} \
-group ${privoxyGroup} -owner ${privoxyUser} \
-permissions 0660
- }
- }
- }
+ }
+ }
+ }
}
platform darwin {
- startupitem.create yes
- startupitem.name Privoxy
- startupitem.start "\[ -f \"${prefix}/etc/privoxy/config\" \] \\"
- startupitem.start-append "\t&& ${prefix}/sbin/privoxy \\"
- startupitem.start-append "\t\t--pidfile ${prefix}/var/run/privoxy.pid \\"
- startupitem.start-append "\t\t--user ${privoxyUser} \\"
- startupitem.start-append "\t\t${prefix}/etc/privoxy/config 2>/dev/null"
- startupitem.stop "if \[ -f \"${prefix}/var/run/privoxy.pid\" \]; then"
- startupitem.stop-append "\tkill `cat ${prefix}/var/run/privoxy.pid` \\"
- startupitem.stop-append "\t\t&& rm -f ${prefix}/var/run/privoxy.pid"
- startupitem.stop-append "else"
- startupitem.stop-append "\t/usr/bin/killall -SIGUSR1 privoxy 2>/dev/null"
- startupitem.stop-append "fi"
+ startupitem.create yes
+ startupitem.name Privoxy
+ startupitem.start "\[ -f \"${prefix}/etc/privoxy/config\" \] \\"
+ startupitem.start-append "\t&& ${prefix}/sbin/privoxy \\"
+ startupitem.start-append "\t\t--pidfile ${prefix}/var/run/privoxy.pid \\"
+ startupitem.start-append "\t\t--user ${privoxyUser} \\"
+ startupitem.start-append "\t\t${prefix}/etc/privoxy/config 2>/dev/null"
+ startupitem.stop "if \[ -f \"${prefix}/var/run/privoxy.pid\" \]; then"
+ startupitem.stop-append "\tkill `cat ${prefix}/var/run/privoxy.pid` \\"
+ startupitem.stop-append "\t\t&& rm -f ${prefix}/var/run/privoxy.pid"
+ startupitem.stop-append "else"
+ startupitem.stop-append "\t/usr/bin/killall -SIGUSR1 privoxy 2>/dev/null"
+ startupitem.stop-append "fi"
}
-livecheck.type regex
-livecheck.url http://www.privoxy.org/announce.txt
-livecheck.regex Announcing Privoxy v.(\[0-9.\]+)
+livecheck.type regex
+livecheck.url http://www.privoxy.org/announce.txt
+livecheck.regex Announcing Privoxy v.(\[0-9.\]+)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120303/f52d81de/attachment.html>
More information about the macports-changes
mailing list