# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: #S=${WORKDIR}/${P} DESCRIPTION="wwwoffle = WWW Offline Explorer, an adv. caching proxy especially suitable for nonpermanent (e.g. dialup) Internet connections" SRC_URI="ftp://ftp.demon.co.uk/pub/unix/httpd/${P}.tgz ftp://ftp.ibiblio.org/pub/Linux/apps/www/servers/${P}.tgz" HOMEPAGE="http://www.gedanken.demon.co.uk/" KEYWORDS="~x86" SLOT="0" LICENSE="GPL-2" IUSE="ipv6" DEPEND="sys-devel/flex sys-libs/zlib sys-devel/gcc virtual/glibc" inherit eutils src_unpack() { unpack ${A} cd ${S} epatch ${FILESDIR}/2.8a-cachelink.diff || die "epatch died" } src_compile() { local myconf myconf="`use_with ipv6`" econf --with-confdir=/etc ${myconf} || die emake || die } src_install() { make DESTDIR=${D} install || die # Install the wwwoffled init script exeinto /etc/init.d doexe ${FILESDIR}/{wwwoffled-online,wwwoffled} } pkg_preinst() { source ${ROOT}/etc/init.d/functions.sh if [ -L ${svcdir}/started/wwwoffled-online ]; then einfo "The wwwoffled-online init script is running. I'll stop it, merge the new files and restart the script." ${ROOT}/etc/init.d/wwwoffled-online stop touch ${T}/restart_online fi if [ -L ${svcdir}/started/wwwoffled ]; then einfo "The wwwoffled init script is running. I'll stop it, merge the new files and restart the script." ${ROOT}/etc/init.d/wwwoffled stop touch ${T}/restart fi } pkg_postinst() { if [ -f "${T}/restart" ]; then einfo "Starting the wwwoffled initscript again..." ${ROOT}/etc/init.d/wwwoffled start rm ${T}/restart if [ -f "${T}/restart_online" ]; then einfo "Starting the wwwoffled-online initscript again..." ${ROOT}/etc/init.d/wwwoffled-online start rm ${T}/restart_online fi fi }