# $Id: Portfile,v 1.2 2004/10/30 03:10:58 blb Exp $ PortSystem 1.0 name privoxy version 3.0.3-2 revision 1 categories www security net maintainers blb@pobox.com 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. platforms darwin homepage http://www.privoxy.org/ master_sites sourceforge:ijbswa distname ${name}-${version}-stable.src checksums md5 d7f6c2fcb926e6110659de6e866b21e4 worksrcdir ${name}-3.0.3-stable depends_lib lib:libpcre:pcre set privoxyGroup privoxy set privoxyUser privoxy patchfiles patch-GNUmakefile.in use_autoconf yes configure.env CPPFLAGS="-I${prefix}/include" LDFLAGS="-L${prefix}/lib" configure.args --disable-dynamic-pcrs --with-user=${privoxyUser} \ --with-group=${privoxyGroup} \ --sysconfdir=${prefix}/etc/${name} \ --mandir=${prefix}/share/man pre-configure { addgroup ${privoxyGroup} adduser ${privoxyUser} gid=[existsgroup ${privoxyGroup}] cd ${worksrcpath} system "autoheader" } post-destroot { xinstall -m 755 -d ${destroot}/${prefix}/etc/rc.d \ ${destroot}/${prefix}/var/run # Install and fixup startup script xinstall -m 755 -W ${worksrcpath} privoxy-generic.init \ ${destroot}/${prefix}/etc/rc.d/privoxy.sh cd ${destroot}/${prefix}/etc/rc.d system "patch -p0 < ${filespath}/patch-privoxy.sh" reinplace "s|@@PREFIX@@|${prefix}|g" \ ${destroot}/${prefix}/etc/rc.d/privoxy.sh reinplace "s|@@PRIVOXY_USER@@|${privoxyUser}|g" \ ${destroot}/${prefix}/etc/rc.d/privoxy.sh # Rename these so local modifications are removed on uninstall foreach privoxyConf {config trust user.action} { file rename ${destroot}/${prefix}/etc/privoxy/${privoxyConf} \ ${destroot}/${prefix}/etc/privoxy/${privoxyConf}-dist \ } # 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/*] # XXX - .turd kludge system "touch ${destroot}/${prefix}/var/log/privoxy/.turd" system "touch ${destroot}/${prefix}/var/run/.turd" } post-activate { # Make sure initial log files are present and setup correctly foreach privoxyLog {jarfile logfile} { system "touch ${prefix}/var/log/privoxy/${privoxyLog}" file attributes ${prefix}/var/log/privoxy/${privoxyLog} \ -group ${privoxyGroup} -owner ${privoxyUser} \ -permissions 0660 } foreach privoxyConf {config trust user.action} { if ![file exists ${prefix}/etc/privoxy/${privoxyConf}] { file copy ${prefix}/etc/privoxy/${privoxyConf}-dist \ ${prefix}/etc/privoxy/${privoxyConf} file attributes ${prefix}/etc/privoxy/${privoxyConf} \ -group ${privoxyGroup} -owner ${privoxyUser} \ -permissions 0660 } } }