freebsd-ports/www/squid/pkg-install
Adrian Chadd 88dd211266 PR: 26059
Update the squid-2.4 port to actually _be_ squid-2.4 . Phew.
This port builds, installs, packages, pkg_delete's cleanly.

I'm going to run it through some more linting and tidying up before
I'm completely done with it.

Differences from squid22/squid23 :

* install-pinger isn't built. I'll tackle this later, possibly by creating
  a squid user/group. I don't like having suid binaries installed,
  even more so when 99% of the users of this port won't even enable
  ICMP pinging.

* I've enabled the lru and heap replacement policies. LRU is used by
  default, the beauty here is that the user can choose one or the other
  without needing a recompile.

* I've enabled ufs (sync), diskd (async) and null (no caching, only proxying).
  This again lets users choose what they want without needing a recompile.
  The default is still a 100mb cache in /usr/local/squid/cache/ running
  ufs. I would change it to diskd but if the user hasn't tweaked their
  sysV shm/msg parameters sufficiently they'll just be puzzled when squid
  gives mysterious sysV errors (and if they load it up enough to have UFS
  become an issue, they'd be better off reading the squid FAQ anyhow..)
2001-03-27 12:28:47 +00:00

46 lines
1.5 KiB
Bash

#!/bin/sh
PKGNAME=$1
case $2 in
PRE-INSTALL)
;;
POST-INSTALL)
echo "==> Post-installation configuration of ${PKGNAME}"
echo ""
echo " o you DO need running nameservice to start and run ${PKGNAME}"
echo ""
echo " o use the ${PKGNAME} proxy and caching WWW Server by"
echo " configuring your WWW Navigator (Netscape, Mosaic,...)"
echo " to use it as a proxy server."
echo ""
echo " o Note that before you can run ${PKGNAME} you will"
echo " need to initialise the cache directory."
echo " You can do this by typing \"squid -z\"."
echo ""
echo "==> Press Enter to edit the ${PKGNAME} config file."
echo " (The defaults are reasonable; and the file is well commented)"
tput md
echo " You'd certainly like to pay attention to the"
echo " ACTUAL locations of cache \"spool\", logfiles, pidfile!"
tput me
if [ -z "${PACKAGE_BUILDING}" ]; then read skip; fi
chown root:wheel ${PREFIX:-/usr/local}/etc/squid/squid.conf*
chmod 644 ${PREFIX:-/usr/local}/etc/squid/squid.conf*
[ -f ${PREFIX:-/usr/local}/etc/squid/squid.conf ] || \
cp -fp ${PREFIX:-/usr/local}/etc/squid/squid.conf.default \
${PREFIX:-/usr/local}/etc/squid/squid.conf
[ -f ${PREFIX:-/usr/local}/etc/squid/mime.conf ] || \
cp -fp ${PREFIX:-/usr/local}/etc/squid/mime.conf.default \
${PREFIX:-/usr/local}/etc/squid/mime.conf
${EDITOR:-vi} ${PREFIX:-/usr/local}/etc/squid/squid.conf \
${PREFIX:-/usr/local}/etc/squid/mime.conf
;;
*)
echo "Unexpected Argument $2!!!"
exit 1
;;
esac
exit 0