File wwwoffle.spec of Package wwwoffle
#
# spec file for package wwwoffle (Version 2.9f)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
Name: wwwoffle
BuildRequires: flex gnutls-devel htdig-devel zlib-devel
License: GPLv2+
Group: Productivity/Networking/Web/Proxy
AutoReqProv: on
Summary: World Wide Web Offline Proxy
Url: http://gedanken.demon.co.uk/wwwoffle/
Version: 2.9f
Release: 1
Source0: http://gedanken.demon.co.uk/download-wwwoffle/%{name}-%{version}.tar.bz2
Source1: rc.%name
Source3: ip-up.%name
Source4: ip-down.%name
Source5: %name.cron
Patch0: %name-2.8d-IndexProtocol.diff
Patch1: %name-2.9e-implicit.patch
Patch2: %name-2.9e-res_init.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq
Requires: cron
%description
A proxy HTTP 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.
- Non-interactive downloading of specified pages.
- 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.
Authors:
--------
Andreas Dietrich <quasi@baccus.franken.de>
Andrew M. Bishop <amb@gedanken.demon.co.uk>
Axel Rasmus Wienberg <2wienbe@informatik.uni-hamburg.de>
Tilman Bohn <tb@bohn.isdn.uni-heidelberg.de>
Ullrich von Bassewitz <uz@wuschel.ibb.schwaben.com>
Walter Pfannenmller <Walter.Pfannenmueller@t-online.de>
Yannick Versley <sa6z225@public.uni-hamburg.de>
%prep
%setup -q
%patch0 -b _orig
%patch1 -p1
%patch2 -p1
# easier to delete them now and include whole doc directory later
rm -f doc/README.win32 doc/*/README.win32
%build
export LC_ALL=C
%configure \
--with-confdir=%{_sysconfdir}/%{name} \
--with-docdir=%_defaultdocdir/%{name} \
--with-gnutls=%{_usr}
make
%install
export LC_ALL=C
mkdir -p $RPM_BUILD_ROOT/etc/init.d
mkdir -p $RPM_BUILD_ROOT/%_sysconfdir/cron.{daily,weekly}
make DESTDIR=$RPM_BUILD_ROOT install
install -m 755 %SOURCE3 $RPM_BUILD_DIR
sed "s@/etc/wwwoffle\\.conf@/etc/wwwoffle/wwwoffle.conf@g" < doc/wwwoffled.man \
> $RPM_BUILD_ROOT%_mandir/man8/wwwoffled.8
install -m 755 %SOURCE1 $RPM_BUILD_ROOT/etc/init.d/wwwoffle
ln -fs ../../etc/init.d/wwwoffle $RPM_BUILD_ROOT/usr/sbin/rcwwwoffle
install -d -m 755 $RPM_BUILD_ROOT/var/adm/fillup-templates
install -d -m 755 $RPM_BUILD_ROOT/etc/ppp/ip-{up,down}.d
install -m 755 %SOURCE3 $RPM_BUILD_ROOT/%_sysconfdir/ppp/ip-up.d/%name
install -m 755 %SOURCE4 $RPM_BUILD_ROOT/%_sysconfdir/ppp/ip-down.d/%name
install -m 644 %SOURCE5 $RPM_BUILD_ROOT/%_sysconfdir/cron.weekly/%name
# run as wwwrun:www by default
pushd $RPM_BUILD_ROOT%_sysconfdir/wwwoffle
sed "s/^#run-uid.*/ run-uid = wwwrun/
s/^#run-gid.*/ run-gid = www/" < wwwoffle.conf > wwwoffle.conf.t
mv wwwoffle.conf.t wwwoffle.conf
popd
rm -rf $RPM_BUILD_ROOT/usr/doc/wwwoffle
rm -rf $RPM_BUILD_ROOT/var/spool/wwwoffle/outgoing/*
rm -f doc/ANNOUNCE~
%post
%fillup_and_insserv wwwoffle
%preun
%stop_on_removal wwwoffle
%postun
%restart_on_update wwwoffle
%insserv_cleanup
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
# docs
%doc ChangeLog* LSM contrib doc/*
%_mandir/man1/*
%_mandir/man5/*
%_mandir/man8/*
# wwwoffle configs
%config /etc/init.d/wwwoffle
%config(missingok,noreplace) %attr(755,root,root) %_sysconfdir/cron.weekly/%name
%dir %attr(750, wwwrun, root) /etc/wwwoffle
%config %attr(640, wwwrun, root) /etc/wwwoffle/wwwoffle.conf
%dir /var/spool/wwwoffle/search/
# search configs for htdig
%dir /var/spool/wwwoffle/search/htdig
%dir /var/spool/wwwoffle/search/htdig/conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htfuzzy.conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htsearch.conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htdig-full.conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htdig-lasttime.conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htdig-incr.conf
%config(noreplace) /var/spool/wwwoffle/search/htdig/conf/htmerge.conf
# search configs for mnogosearch
%dir /var/spool/wwwoffle/search/mnogosearch
%dir /var/spool/wwwoffle/search/mnogosearch/conf
%config(noreplace) /var/spool/wwwoffle/search/mnogosearch/conf/indexer-full.old.conf
%config(noreplace) /var/spool/wwwoffle/search/mnogosearch/conf/result.html
%config(noreplace) /var/spool/wwwoffle/search/mnogosearch/conf/indexer-incr.old.conf
%config(noreplace) /var/spool/wwwoffle/search/mnogosearch/conf/indexer-full.conf
%config(noreplace) /var/spool/wwwoffle/search/mnogosearch/conf/indexer-incr.conf
# search configs for namazu
%dir /var/spool/wwwoffle/search/namazu
%dir /var/spool/wwwoffle/search/namazu/conf/
%config(noreplace) /var/spool/wwwoffle/search/namazu/conf/mknmzrc
%config(noreplace) /var/spool/wwwoffle/search/namazu/conf/namazurc
%dir %attr(750, wwwrun, root) /var/spool/wwwoffle
%dir /var/spool/wwwoffle/html
%doc /var/spool/wwwoffle/html/*
%dir %attr(-, wwwrun, root) /var/spool/wwwoffle/http
%dir %attr(-, wwwrun, root) /var/spool/wwwoffle/lasttime
%dir %attr(-, wwwrun, root) /var/spool/wwwoffle/monitor
%dir %attr(-, wwwrun, root) /var/spool/wwwoffle/outgoing
%dir %attr(-, wwwrun, root) /var/spool/wwwoffle/prevtime1
# rest of htdig
/var/spool/wwwoffle/search/htdig/db
/var/spool/wwwoffle/search/htdig/tmp
/var/spool/wwwoffle/search/htdig/scripts
/var/spool/wwwoffle/search/htdig/db-lasttime
# rest of mnogosearch
/var/spool/wwwoffle/search/mnogosearch/db
/var/spool/wwwoffle/search/mnogosearch/scripts
/var/spool/wwwoffle/search/udmsearch
# rest of namazu
/var/spool/wwwoffle/search/namazu/db
/var/spool/wwwoffle/search/namazu/scripts
# hyperestraier
/var/spool/wwwoffle/search/hyperestraier
%config(noreplace) /var/spool/wwwoffle/search/hyperestraier/conf/estseek.conf
%_bindir/*
%_sbindir/*
/etc/ppp/ip-up.d/%name
/etc/ppp/ip-down.d/%name
%changelog