diff options
author | Dan Armak <danarmak@gentoo.org> | 2001-07-17 21:42:50 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2001-07-17 21:42:50 +0000 |
commit | 5efc3c566dbd73e1ff8abf386fba49e960f52015 (patch) | |
tree | b3c5fa4d7e80aee8e0c3ec342f9f90491d23eed4 /net-www/wwwoffle | |
parent | Changed my email address in all places to danarmak@gentoo.org. (diff) | |
download | historical-5efc3c566dbd73e1ff8abf386fba49e960f52015.tar.gz historical-5efc3c566dbd73e1ff8abf386fba49e960f52015.tar.bz2 historical-5efc3c566dbd73e1ff8abf386fba49e960f52015.zip |
wwwoffle: WWW Offline Explorer is a powerful local caching proxy server
Diffstat (limited to 'net-www/wwwoffle')
-rw-r--r-- | net-www/wwwoffle/files/digest-wwwoffle-2.6d | 1 | ||||
-rw-r--r-- | net-www/wwwoffle/files/wwwoffle-2.6d-gentoo.diff | 100 | ||||
-rw-r--r-- | net-www/wwwoffle/files/wwwoffled | 32 | ||||
-rw-r--r-- | net-www/wwwoffle/wwwoffle-2.6d.ebuild | 114 |
4 files changed, 247 insertions, 0 deletions
diff --git a/net-www/wwwoffle/files/digest-wwwoffle-2.6d b/net-www/wwwoffle/files/digest-wwwoffle-2.6d new file mode 100644 index 000000000000..f912064dff0f --- /dev/null +++ b/net-www/wwwoffle/files/digest-wwwoffle-2.6d @@ -0,0 +1 @@ +MD5 2a6de704d05fdc3c19f5dfbcec68d8bd wwwoffle-2.6d.tgz diff --git a/net-www/wwwoffle/files/wwwoffle-2.6d-gentoo.diff b/net-www/wwwoffle/files/wwwoffle-2.6d-gentoo.diff new file mode 100644 index 000000000000..a26930ddac9a --- /dev/null +++ b/net-www/wwwoffle/files/wwwoffle-2.6d-gentoo.diff @@ -0,0 +1,100 @@ +--- Makefile.orig Tue May 29 21:29:03 2001 ++++ Makefile Wed Jul 18 00:17:57 2001 +@@ -18,11 +18,14 @@ + LOCALHOST=localhost:8080 + + # For UNIX. +-INSTDIR=/usr/local +-SPOOLDIR=/var/spool/wwwoffle +-CONFDIR=/var/spool/wwwoffle +-MANDIR=$(INSTDIR)/man +-DOCDIR=$(INSTDIR)/doc/wwwoffle ++INSTDIR=${DESTDIR}/usr ++SPOOLDIR=${DESTDIR}/var/spool/wwwoffle ++CONFDIR=${DESTDIR}/var/spool/wwwoffle ++MANDIR=$(INSTDIR)/share/man ++DOCDIR=$(INSTDIR)/share/doc/wwwoffle ++ ++REALSPOOLDIR=/var/spool/wwwoffle ++REALCONFDIR=/var/spool/wwwoffle + + # For Cygwin (win32). + #INSTDIR=/wwwoffle +@@ -54,7 +57,7 @@ + ######## + + CC=gcc +-CFLAGS=-O2 -Wall -g ++NEWCFLAGS=-O2 -Wall -g ${CFLAGS} + + # This is used in the FreeBSD port (http://www.freebsd.org/ports/). + #CFLAGS=-O2 -Wall +@@ -106,7 +109,7 @@ + # For Solaris you need the following instead. + #LIBRARY=-lnsl -lsocket -lz + +-COMPILE=$(CC) -c $(CFLAGS) ++COMPILE=$(CC) -c $(NEWCFLAGS) + + LINK=$(LD) $(LDFLAGS) + +@@ -340,7 +343,7 @@ + [ -x $(MANDIR)/man1 ] || $(INSTALL) -d -m 755 $(MANDIR)/man1 + $(INSTALL) -c -m 644 wwwoffle.man $(MANDIR)/man1/wwwoffle.1 + [ -x $(MANDIR)/man5 ] || $(INSTALL) -d -m 755 $(MANDIR)/man5 +- sed -e 's%SPOOLDIR%$(SPOOLDIR)%' -e 's%CONFDIR%$(CONFDIR)%' < wwwoffle.conf.man > wwwoffle.conf.man.install ++ sed -e 's%SPOOLDIR%$(TRUESPOOLDIR)%' -e 's%CONFDIR%$(TRUECONFDIR)%' < wwwoffle.conf.man > wwwoffle.conf.man.install + $(INSTALL) -c -m 644 wwwoffle.conf.man.install $(MANDIR)/man5/wwwoffle.conf.5 + [ -x $(MANDIR)/man8 ] || $(INSTALL) -d -m 755 $(MANDIR)/man8 + $(INSTALL) -c -m 644 wwwoffled.man $(MANDIR)/man8/wwwoffled.8 +@@ -356,7 +359,7 @@ + done ) + + install_cache : +- @[ ! -d $(SPOOLDIR) ] || [ ! -d $(SPOOLDIR)/outgoing ] || [ -d $(SPOOLDIR)/prevtime1 ] || \ ++ @[ ! -d $(REALSPOOLDIR) ] || [ ! -d $(REALSPOOLDIR)/outgoing ] || [ -d $(REALSPOOLDIR)/prevtime1 ] || \ + (echo "WWWOFFLE: " ;\ + echo "WWWOFFLE: Your existing cache looks earlier than version 2.2, cannot continue." ;\ + echo "WWWOFFLE: Read the file NEWS for details." ;\ +@@ -373,12 +376,13 @@ + done + + install_html : html +- @[ ! -x $(SPOOLDIR)/html.old ] || \ +- (echo "WWWOFFLE: " ;\ +- echo "WWWOFFLE: There is already a directory $(SPOOLDIR)/html.old." ;\ +- echo "WWWOFFLE: Remove it and re-run make." ;\ +- echo "WWWOFFLE: " ;\ +- exit 1 ) ++ # This is handled in the ebuild to avoid writing out of ${D}. ++ #@[ ! -x $(REALSPOOLDIR)/html.old ] || \ ++ # (echo "WWWOFFLE: " ;\ ++ # echo "WWWOFFLE: There is already a directory $(REALSPOOLDIR)/html.old." ;\ ++ # echo "WWWOFFLE: Remove it and re-run make." ;\ ++ # echo "WWWOFFLE: " ;\ ++ # exit 1 ) + [ ! -x $(SPOOLDIR)/html ] || mv $(SPOOLDIR)/html $(SPOOLDIR)/html.old + [ -x $(SPOOLDIR)/html ] || mkdir $(SPOOLDIR)/html + tar cf $(SPOOLDIR)/html.tar html && cd $(SPOOLDIR) && tar xpf html.tar && rm html.tar +@@ -391,15 +395,15 @@ + -chgrp -R 0 $(SPOOLDIR)/html > /dev/null 2>&1 + + install_config : +- sed -e 's%SPOOLDIR%$(SPOOLDIR)%' -e 's%CONFDIR%$(CONFDIR)%' < wwwoffle.conf > wwwoffle.conf.install ++ sed -e 's%SPOOLDIR%$(REALSPOOLDIR)%' -e 's%CONFDIR%$(REALCONFDIR)%' < wwwoffle.conf > wwwoffle.conf.install + [ -x $(CONFDIR) ] || $(INSTALL) -d -m 750 $(CONFDIR) +- @[ ! -f $(CONFDIR)/wwwoffle.conf ] || \ ++ @[ ! -f $(REALCONFDIR)/wwwoffle.conf ] || \ + (echo "WWWOFFLE: " ;\ +- echo "WWWOFFLE: There is already a config file $(CONFDIR)/wwwoffle.conf." ;\ +- echo "WWWOFFLE: Run 'upgrade-config.pl $(CONFDIR)/wwwoffle.conf' to upgrade it." ;\ ++ echo "WWWOFFLE: There is already a config file $(REALCONFDIR)/wwwoffle.conf." ;\ ++ echo "WWWOFFLE: Run 'upgrade-config.pl $(REALCONFDIR)/wwwoffle.conf' to upgrade it." ;\ + echo "WWWOFFLE: " ) +- [ ! -f $(CONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf.install +- [ -f $(CONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf ++ [ ! -f $(REALCONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf.install ++ [ -f $(REALCONFDIR)/wwwoffle.conf ] || $(INSTALL) -c -m 640 wwwoffle.conf.install $(CONFDIR)/wwwoffle.conf + + install_fixup-win32: + for file in $(DOCDIR)/* ; do \ diff --git a/net-www/wwwoffle/files/wwwoffled b/net-www/wwwoffle/files/wwwoffled new file mode 100644 index 000000000000..e56e1c3e8cd6 --- /dev/null +++ b/net-www/wwwoffle/files/wwwoffled @@ -0,0 +1,32 @@ +#! /bin/bash +#RCUPDATE:2 3 4:95:This line is required for script management +# Let this start as late as possible, but before those services +# which must start last e.g. xdm/kdm +# If it starts too early, it may do so before a working internet +# connection is up + +. /etc/rc.d/config/basic +. /etc/rc.d/config/functions + +opts="start stop restart" + +start() { + ebegin "Starting wwwoffled" + #start-stop-daemon --start --quiet --exe `which wwwoffled` -c /var/spool/wwwoffle/wwwoffle.conf 1>&2 + wwwoffled -c /var/spool/wwwoffle/wwwoffle.conf + eend $? "Error starting wwwoffled, perhaps it's already running?" +} + +stop() { + ebegin "Stopping wwwoffled" + #start-stop-daemon --stop --quiet --exe `which wwwoffled` -c /var/spool/wwwoffle/wwwoffle.conf 1>&2 + wwwoffle -kill + eend $? "Error stopping wwwoffled, perhaps it wasn't running?" +} + +restart() { + stop + start +} + +doservice ${@} diff --git a/net-www/wwwoffle/wwwoffle-2.6d.ebuild b/net-www/wwwoffle/wwwoffle-2.6d.ebuild new file mode 100644 index 000000000000..ffc725a318c3 --- /dev/null +++ b/net-www/wwwoffle/wwwoffle-2.6d.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2001 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Dan Armak <danarmak@gentoo.org> +# $Header: /var/cvsroot/gentoo-x86/net-www/wwwoffle/wwwoffle-2.6d.ebuild,v 1.1 2001/07/17 21:42:50 danarmak Exp $ +# +# TODO: add ipv6 support +# +# Description of accompanying patch +# --------------------------------- +# Unfortunately, wwwoffle doesn't use autoconf etc. It has a Makefile +# which we must change. +# This Makefile has variables like INSTDIR, DOCDIR, BINDIR, CONFDIR etc. +# However it uses them with sed to change its man pages and config file, +# so that they contain the actual location wwwoffle is installed to. +# This means that when we change them to /tmp/portage... ${D} we create +# two additional variables called REALSPOOLDIR and REALCONFDIR which contain +# the real install location (i.e. without ${D}) and insert them in the right +# places instead of SPOOLDIR, CONFDIR. Thus the Makefile reads from the real +# install location, but writes only under ${D}. +# +# There is another problem: the Makefile performs some checks to gracefully +# handle installing over an existing copy or an older version. +# There's one problem with that: during installation, the Makefile backups +# the /var/spool/wwwoffle/html/ directory as html.old/ and overwrites +# the html/ dir. If an html.old/ dir already exists, the Makefile aborts. +# I didn't want to change the Makefile's default behaviour, so for now +# this ebuild forces deletion of html.old and moves the existing html/ +# to html.old/ Most people won't care anyway, since the contents of html/ +# aren't dynamic: they only change between wwwoffle versions. +# +# Another thing that's in the patch is support for env. var. CFLAGS. + + +S=${WORKDIR}/${P} + +DESCRIPTION="wwwoffle = WWW Offline Explorer, an adv. caching proxy suitable for nonpermanent (e.g. DUN) Internet connections" + +SRC_URI="ftp://ftp.demon.co.uk/pub/unix/httpd/${P}.tgz + ftp://metalab.unc.edu/pub/Linux/apps/www/servers/${P}.tgz" + +HOMEPAGE="http://www.gedanken.demon.co.uk/" + +DEPEND="sys-devel/flex + sys-libs/zlib" + +src_unpack() { + + unpack ${A} + cd ${S} + + patch -p0 <${FILESDIR}/${P}-gentoo.diff + +} + +src_compile() { + + try emake all + +} + +src_install () { + + # We make sure the wwwoffled daemon isn't running during installation + echo "Don't mind any error messages in the next secnod or two" + + # This is to restart it later if it is running: + RESTART=no + # wwwoffle returns an error if ther's no wwwoffled daemon to kill + wwwoffle -kill && RESTART=yes + # In any case now the daemon isn't running, we just told it to die. + + # This is necessary to install over an existing installation. + # Don't worry, no (interesting) info is lost. + # I'm almost sure what's deleted is the backup info + # from a previous over-installation. + rm -rf /var/spool/wwwoffle/html.old + mv /var/spool/wwwoffle/html /var/spool/wwwoffle/html.old + + # Install the files + try make DESTDIR=${D} install + + # Install the wwwoffled init script + mkdir -p ${D}/etc/rc.d/init.d + cp ${FILESDIR}/wwwoffled ${D}/etc/rc.d/init.d + + # Restart the daemon if we shut it down before + if [ ${RESTART} == yes ] ; then wwwoffled ; fi + +} + +pkg_postinst() { + + # This simply prints out some useful instructions. + echo " + + ----------- + What's Next + ----------- + + You have successfully installed wwwoffle. + + To configure it, read and edit /var/spool/wwwoffle/wwwoffle.conf. + It's well commented and very powerful. + + To start using wwwoffle: + 1. Run 'rc-update add wwwoffled'. + 2. Run 'wwwoffle -online; wwwoffle -fetch' whenever you go online + (at boot if you're on a network) and 'wwwoffle -offline' + when you disconnect. + 3. Configure any programs to use localhost:8080 as a proxy + server for HTTP, HTTPS, FTP and finger. + " + +}
\ No newline at end of file |