Squid version 2.7.STABLE7 - How to Download and Install on Mac OS X
Friday the 19th of March, 2010

    version 2.7.STABLE7

      View the most recent changes for the squid port at: squid.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for squid.
      The raw portfile for squid 2.7.STABLE7 is located here:
      http://squid.darwinports.com/dports/net/squid/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/squid


      # -*- 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
      The squid Portfile 58052 2009-09-21 10:39:23Z jmr macports.org $

      PortSystem 1.0

      Name: squid
      Version: 2.7.STABLE7
      set branch [join [lrange [split ${version} .] 0 1] .]
      Category: net
      Platform: darwin
      license GPLv2+
      Maintainers: jmr openmaintainer
      Description: advanced proxy caching server for http, https, ftp, gopher
      Long Description: Squid is a high-performance proxy caching server for web clients, supporting FTP, gopher, and HTTP data objects. Unlike traditional caching software, Squid handles all requests in a single, non-blocking, I/O-driven process. Squid keeps meta data and especially hot objects cached in RAM, caches DNS lookups, supports non-blocking DNS lookups, and implements negative caching of failed requests.

      Homepage: http://www.squid-cache.org/
      Master Sites: http://mirrors.24-7-solutions.net/pub/squid/ http://mirror.aarnet.edu.au/pub/squid/squid/ http://www.mirrorservice.org/sites/ftp.squid-cache.org/pub/squid/ http://ftp.ring.gr.jp/archives/net/www/squid/ ftp://ftp.is.co.za/pub/squid/ ftp://ftp1.cl.squid-cache.org/pub/squid/ http://www.squid-cache.org/Versions/v2/${branch}/ ftp://ftp.squid-cache.org/pub/squid/

      Checksums: md5 c18b0371fca813d5e7c7e0baf87baa22 sha1 0729116f309093e4f141e000136cdec39290628a rmd160 a13df321fb0831de963c77f6e33e3f374634d353

      use_bzip2 yes
      Patch Files: patch-cf.data.pre.diff patch-configure.diff

      depends_lib port:openssl port:zlib

      conflicts squid3

      configure.args --with-pthreads --mandir=${prefix}/share/man --sysconfdir=${prefix}/etc/squid --datadir=${prefix}/share/squid --localstatedir=${prefix}/var/squid --with-openssl=${prefix} --enable-delay-pools --enable-removal-policies --enable-storeio=ufs,aufs,diskd,coss,null
      post-configure {
      if {[variant_isset universal]} {
      system "cd ${worksrcpath} && ed - ${worksrcpath}/include/autoconf.h < ${filespath}/include_autoconf.h.ed && touch include/stamp-h1"
      }
      }

      build.args DEFAULT_PID_FILE=${prefix}/var/run/squid/squid.pid
      use_parallel_build yes

      startupitem.create yes
      startupitem.name Squid
      startupitem.start "cd ${prefix}/var/squid" "if \[ ! -d \"${prefix}/var/squid/cache/00\" \]; then" "\tsu -fm root -c \"exec ${prefix}/sbin/squid -s -z\"" "fi" "su -fm root -c \"exec ${prefix}/sbin/squid -s\""
      startupitem.stop "cd ${prefix}/var/squid" "su -fm root -c \"exec ${prefix}/sbin/squid -k shutdown\""

      pre-destroot {
      addgroup squid
      set gid [existsgroup squid]
      adduser squid gid=${gid} realname=Squid\ Proxy home=${prefix}/var/squid
      }
      post-destroot {
      xinstall -o squid -g squid -m 755 -d ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs
      file delete -force ${destroot}${prefix}/etc/squid/squid.conf ${destroot}${prefix}/etc/squid/mime.conf
      move ${destroot}${prefix}/etc/squid/cachemgr.conf ${destroot}${prefix}/etc/squid/cachemgr.conf.default
      }
      destroot.keepdirs ${destroot}${prefix}/var/run/squid ${destroot}${prefix}/var/squid/cache ${destroot}${prefix}/var/squid/logs

      post-activate {
      # Make sure initial conf files are present and setup correctly
      foreach f { squid.conf mime.conf cachemgr.conf } {
      if {![file exists ${prefix}/etc/squid/${f}]} {
      file copy ${prefix}/etc/squid/${f}.default ${prefix}/etc/squid/${f}
      }
      }
      }

      livecheck.type regex
      livecheck.url http://www.squid-cache.org/Versions/v2/${branch}/
      livecheck.regex squid-(${branch}\\.STABLE\[0-9\\.\]+)-RELEASENOTES

    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/squid
      % sudo port install squid
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching squid
      ---> Verifying checksum for squid
      ---> Extracting squid
      ---> Configuring squid
      ---> Building squid with target all
      ---> Staging squid into destroot
      ---> Installing squid
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using squid with these commands:
      %  man squid
      % apropos squid
      % which squid
      % locate squid

     Where to find more information:

    Darwin Ports



    Lightbox this page.