diff options
author | Dan Armak <danarmak@gentoo.org> | 2001-10-20 16:47:13 +0000 |
---|---|---|
committer | Dan Armak <danarmak@gentoo.org> | 2001-10-20 16:47:13 +0000 |
commit | 694487e2277245cb4c6d9b3f69baf172349420dd (patch) | |
tree | 55693465ee401f87acb60e99149d6e369fdfb1a8 /net-www/wwwoffle | |
parent | added rc5/rc6 version splitting for net-www/wwwoffle (diff) | |
download | gentoo-2-694487e2277245cb4c6d9b3f69baf172349420dd.tar.gz gentoo-2-694487e2277245cb4c6d9b3f69baf172349420dd.tar.bz2 gentoo-2-694487e2277245cb4c6d9b3f69baf172349420dd.zip |
rc5/rc6 wwwoffled with initscripts etc.
Diffstat (limited to 'net-www/wwwoffle')
-rw-r--r-- | net-www/wwwoffle/files/digest-wwwoffle-2.6d-r6 | 1 | ||||
-rw-r--r-- | net-www/wwwoffle/files/wwwoffled-online | 18 | ||||
-rw-r--r-- | net-www/wwwoffle/files/wwwoffled.rc5 (renamed from net-www/wwwoffle/files/wwwoffled) | 0 | ||||
-rw-r--r-- | net-www/wwwoffle/files/wwwoffled.rc6 | 21 | ||||
-rw-r--r-- | net-www/wwwoffle/wwwoffle-2.6d-r6.ebuild | 81 | ||||
-rw-r--r-- | net-www/wwwoffle/wwwoffle-2.6d.ebuild | 66 |
6 files changed, 138 insertions, 49 deletions
diff --git a/net-www/wwwoffle/files/digest-wwwoffle-2.6d-r6 b/net-www/wwwoffle/files/digest-wwwoffle-2.6d-r6 new file mode 100644 index 000000000000..f912064dff0f --- /dev/null +++ b/net-www/wwwoffle/files/digest-wwwoffle-2.6d-r6 @@ -0,0 +1 @@ +MD5 2a6de704d05fdc3c19f5dfbcec68d8bd wwwoffle-2.6d.tgz diff --git a/net-www/wwwoffle/files/wwwoffled-online b/net-www/wwwoffle/files/wwwoffled-online new file mode 100644 index 000000000000..480da1948049 --- /dev/null +++ b/net-www/wwwoffle/files/wwwoffled-online @@ -0,0 +1,18 @@ +#!/sbin/runscript + +depend() { + need wwwoffled net +} + +start() { + ebegin "Starting wwwoffled-online" + wwwoffle -online + eend $? "Started wwwoffled-online." "Error starting wwwoffled-online." +} + +stop() { + ebegin "Stopping wwwoffled-online" + wwwoffle -offline + eend $? "Stopped wwwoffled-online." "Error stopping wwwoffled-online." +} + diff --git a/net-www/wwwoffle/files/wwwoffled b/net-www/wwwoffle/files/wwwoffled.rc5 index 81b518f3b663..81b518f3b663 100644 --- a/net-www/wwwoffle/files/wwwoffled +++ b/net-www/wwwoffle/files/wwwoffled.rc5 diff --git a/net-www/wwwoffle/files/wwwoffled.rc6 b/net-www/wwwoffle/files/wwwoffled.rc6 new file mode 100644 index 000000000000..c3bcb0c4c89b --- /dev/null +++ b/net-www/wwwoffle/files/wwwoffled.rc6 @@ -0,0 +1,21 @@ +#!/sbin/runscript + +EXE=`which wwwoffled` +SERVICE='wwwoffled' + +depend() { + need localmount +} + +start() { + ebegin "Starting $SERVICE" + start-stop-daemon --start --quiet --exec $EXE -- -c /var/spool/wwwoffle/wwwoffle.conf + eend $? "Started $SERVICE." "Error starting $SERVICE." +} + +stop() { + ebegin "Stopping $SERVICE" + start-stop-daemon --stop --quiet --exec $EXE + eend $? "Stopped $SERVICE." "Error stopping $SERVICE." +} + diff --git a/net-www/wwwoffle/wwwoffle-2.6d-r6.ebuild b/net-www/wwwoffle/wwwoffle-2.6d-r6.ebuild new file mode 100644 index 000000000000..c7b4ae32188a --- /dev/null +++ b/net-www/wwwoffle/wwwoffle-2.6d-r6.ebuild @@ -0,0 +1,81 @@ +# 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-r6.ebuild,v 1.1 2001/10/20 16:47:13 danarmak Exp $ + +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 + sys-devel/gcc + virtual/glibc" + +src_unpack() { + + unpack ${A} + cd ${S} + + patch -p0 <${FILESDIR}/${P}-gentoo.diff + +# if [ "`use ipv6 `" ]; then +# cp Makefile 2 +# sed -e 's/USE_IPV6=0/USE_IPV6=1/' 2 > Makefile +# rm 2 +# fi + +} + +src_compile() { + + emake all || die + +} + +src_install () { + + # This is necessary to install over an existing installation. + # Don't worry, no (interesting) info is lost. + # 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 + make DESTDIR=${D} install || die + + # Install the wwwoffled init script + insinto /etc/init.d + doins ${FILESDIR}/wwwoffled-online + newins ${FILESDIR}/wwwoffled.rc6 wwwoffled + chmod a+x ${D}/etc/init.d/{wwwoffled,wwwoffled-online} + +} + +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. rc-update add wwwoffled to boot. + 2. rc-update add wwwoffled-online to your 'online' runlevels. + 3. Configure any programs to use localhost:8080 as a proxy + server for HTTP, HTTPS, FTP and finger. + " + +}
\ No newline at end of file diff --git a/net-www/wwwoffle/wwwoffle-2.6d.ebuild b/net-www/wwwoffle/wwwoffle-2.6d.ebuild index ffc725a318c3..73e74fcbd5d1 100644 --- a/net-www/wwwoffle/wwwoffle-2.6d.ebuild +++ b/net-www/wwwoffle/wwwoffle-2.6d.ebuild @@ -1,35 +1,7 @@ # 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. - +# $Header: /var/cvsroot/gentoo-x86/net-www/wwwoffle/wwwoffle-2.6d.ebuild,v 1.2 2001/10/20 16:47:13 danarmak Exp $ S=${WORKDIR}/${P} @@ -41,7 +13,9 @@ SRC_URI="ftp://ftp.demon.co.uk/pub/unix/httpd/${P}.tgz HOMEPAGE="http://www.gedanken.demon.co.uk/" DEPEND="sys-devel/flex - sys-libs/zlib" + sys-libs/zlib + sys-devel/gcc + virtual/glibc" src_unpack() { @@ -49,42 +23,36 @@ src_unpack() { cd ${S} patch -p0 <${FILESDIR}/${P}-gentoo.diff + +# if [ "`use ipv6 `" ]; then +# cp Makefile 2 +# sed -e 's/USE_IPV6=0/USE_IPV6=1/' 2 > Makefile +# rm 2 +# fi } src_compile() { - try emake all + emake all || die } 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. + # 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 + make DESTDIR=${D} install || die # 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 + insinto /etc/rc.d/init.d + newins ${FILESDIR}/wwwoffled.rc5 wwwoffled + chmod a+x ${D}/etc/rc.d/init.d/wwwoffled } @@ -103,7 +71,7 @@ pkg_postinst() { It's well commented and very powerful. To start using wwwoffle: - 1. Run 'rc-update add wwwoffled'. + 1. Run 'rc-update add wwwoffled <runlevels>'. 2. Run 'wwwoffle -online; wwwoffle -fetch' whenever you go online (at boot if you're on a network) and 'wwwoffle -offline' when you disconnect. |