%define version 2.8e %define release %mkrel 1 %define name wwwoffle Summary: WWW Offline Explorer - Caching Web Proxy Server Name: %{name} Version: %{version} Release: %{release} License: GPL Group: Networking/Other Source0: ftp://ftp.ibiblio.org/pub/Linux/apps/www/servers/%name-%version.tar.bz2 Source1: %{name}-initfile.bz2 URL: http://www.gedanken.demon.co.uk/wwwoffle/ Buildrequires: flex BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot Requires: htdig %description A proxy HTTP/FTP server for computers with dial-up internet access. - Caching of pages viewed while connected for review later. - Browsing of cached pages while not connected, with the ability to follow links and mark other pages for download. - Downloading of specified pages non-interactively. - Multiple indices of pages stored in cache for easy selection. - Interactive or command line option to select pages for fetching individually or recursively. - All options controlled using a simple configuration file with a web page to edit it. %prep %setup -q %build %configure %make all \ CFLAGS="$RPM_OPT_FLAGS" INSTDIR=/usr \ SPOOLDIR=/var/spool/wwwoffle \ CONFDIR=%{_sysconfdir} \ MANDIR=%{_mandir} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/var/spool/ mkdir -p $RPM_BUILD_ROOT%{_initrddir} mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.{daily,weekly} mkdir -p $RPM_BUILD_ROOT%{_mandir}/man[158] %{makeinstall_std} \ INSTDIR=$RPM_BUILD_ROOT%{_prefix} \ SPOOLDIR=$RPM_BUILD_ROOT/var/spool/wwwoffle \ CONFDIR=$RPM_BUILD_ROOT%{_sysconfdir} \ MANDIR=$RPM_BUILD_ROOT%{_mandir} #install -m 755 upgrade* $RPM_BUILD_ROOT/usr/sbin/ bzcat %{SOURCE1} > $RPM_BUILD_ROOT%{_initrddir}/wwwoffled cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name} <<EOF #!/bin/sh %{_bindir}/wwwoffle -purge EOF cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF #!/bin/sh /var/spool/wwwoffle/html/search/htdig/scripts/wwwoffle-htdig-full EOF perl -pi -e 's|'$RPM_BUILD_ROOT'||g' \ $RPM_BUILD_ROOT%{_sysconfdir}/wwwoffle.conf \ $RPM_BUILD_ROOT%{_mandir}/man5/wwwoffle.conf.5 \ $RPM_BUILD_ROOT/var/spool/wwwoffle/html/search/htdig/conf/*.conf \ $RPM_BUILD_ROOT/var/spool/wwwoffle/html/search/htdig/scripts/* # remove unwanted filde rm -rf $RPM_BUILD_ROOT/usr/doc rm -rf $RPM_BUILD_ROOT/var/spool/wwwoffle/outgoing/* %post /sbin/chkconfig --add wwwoffled if [ $1 = 0 ]; then %{_initrddir}/wwwoffled start fi %preun %{_initrddir}/wwwoffled status | grep running && %{_initrddir}/wwwoffled stop if [ $1 = 0 ]; then # execute this only if we are NOT doing an upgrade /sbin/chkconfig --del wwwoffled fi %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir /var/spool/wwwoffle %dir /var/spool/wwwoffle/html %doc /var/spool/wwwoffle/html/* %dir /var/spool/wwwoffle/http %dir /var/spool/wwwoffle/lasttime %dir /var/spool/wwwoffle/monitor %dir /var/spool/wwwoffle/outgoing /var/spool/wwwoffle/search %doc doc/README* doc/CONVERT doc/FAQ doc/INSTALL doc/NEWS ChangeLog doc/CHANGES.CONF %doc src/convert-cache src/uncompress-cache conf/upgrade-config* %attr(644,root,root) %config(noreplace) %{_sysconfdir}/wwwoffle.conf %attr(755,root,root) %config(noreplace) %{_initrddir}/wwwoffled %attr(755,root,root) %config(missingok,noreplace) %{_sysconfdir}/cron.daily/%{name} %attr(755,root,root) %config(missingok,noreplace) %{_sysconfdir}/cron.weekly/%{name} %{_bindir}/* %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man5/* %{_mandir}/man8/* %changelog * Wed Mar 01 2006 Nicolas Lécureuil <neoclust@mandriva.org> 2.8e-1mdk - 2.8e - Make rpmbuildupdate happy - use mkrel * Fri Jan 14 2005 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 2.8d-1mdk - 2.8d - use %%configure macro - fix conffile-without-noreplace-flag * Wed Jul 28 2004 Per Øyvind Karlsen <peroyvind@linux-mandrake.com> 2.8c-1mdk - 2.8c * Sat Dec 13 2003 Per Ãyvind Karlsen <peroyvind@linux-mandrake.com> 2.8a-1mdk - 2.8a - don't rm -rf $RPM_BUILD_ROOT in %%prep - cosmetics - quiet setup * Tue May 06 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.7h-2mdk - buildrequires * Mon Jan 13 2003 Lenny Cartier <lenny@mandrakesoft.com> 2.7h-1mdk - 2.7h * Sun Dec 08 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.7g-1mdk - 2.7g * Fri Oct 11 2002 Lenny Cartier <lenny@mandrakesoft.com> 2.7f-1mdk - 2.7f * Tue Aug 28 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.6d-1mdk - 2.6d * Thu Jun 14 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.6c-3mdk - updated by Laurent Grawet <laurent.grawet@ibelgique.com> : - Updated to 2.6c. * Tue Apr 24 2001 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.6a-2mdk - fixed changed path for htdig scripts. * Wed Feb 14 2001 Lenny Cartier <lenny@mandrakesoft.com> 2.6a-1mdk - updated to 2.6a. * Sun Sep 24 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.5e-5mdk - more macros. * Sat Sep 23 2000 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.5e-4mdk - noreplace for %%config. - fixed path for files into /var/spool/wwwoffle. - use of perl instead of sed for path fixing. - added CFLAGS. - pure in cron-weekly. - added cron for htdig. - added contrib to %doc. * Sat Aug 26 2000 Ronan-Yann Lorin <ryl@linuxmandrake.com> 2.5e-3mdk - cron task added * Tue Aug 01 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.5e-2mdk - bm - macros * Thu Jul 27 2000 Ronan-Yann Lorin <ryl@free.fr> 2.5e-1mdk - fix config file - updated to 2.5e * Thu May 04 2000 Lenny Cartier <lenny@mandrakesoft.com> 2.4-2mdk - fix group * Fri Jul 16 1999 Pablo Saratxaga <pablo@mandrakesoft.com> - uploaded to 2.4 - * Mon Jul 12 1999 Pablo Saratxaga <pablo@mandrakesoft.com> - adapted to mandrake the rpm package of Gianpaolo Macario <gianpi@geocities.com>