Adding code to handle +no-cookies-keep
[privoxy.git] / junkbuster-suse.spec
1 # $Id: junkbuster-suse.spec,v 1.9 2001/10/26 18:17:23 swa Exp $
2 #
3 # Written by and Copyright (C) 2001 the SourceForge
4 # IJBSWA team.  http://ijbswa.sourceforge.net
5 #
6 # Based on the Internet Junkbuster originally written
7 # by and Copyright (C) 1997 Anonymous Coders and 
8 # Junkbusters Corporation.  http://www.junkbusters.com
9 #
10 # This program is free software; you can redistribute it 
11 # and/or modify it under the terms of the GNU General
12 # Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at
14 # your option) any later version.
15 #
16 # This program is distributed in the hope that it will
17 # be useful, but WITHOUT ANY WARRANTY; without even the
18 # implied warranty of MERCHANTABILITY or FITNESS FOR A
19 # PARTICULAR PURPOSE.  See the GNU General Public
20 # License for more details.
21 #
22 # The GNU General Public License should be included with
23 # this file.  If not, you can view it at
24 # http://www.gnu.org/copyleft/gpl.html
25 # or write to the Free Software Foundation, Inc., 59
26 # Temple Place - Suite 330, Boston, MA  02111-1307, USA.
27 #
28 # $Log: junkbuster-suse.spec,v $
29 # Revision 1.9  2001/10/26 18:17:23  swa
30 # new version string
31 #
32 # Revision 1.8  2001/09/13 16:22:42  swa
33 # man page is legacy. suse rpm now contains html
34 # documentation.
35 #
36 # Revision 1.7  2001/09/10 17:44:22  swa
37 # integrate three pieces of documentation.
38 #
39 # Revision 1.6  2001/09/10 16:29:23  swa
40 # binary contained debug info.
41 # buildroot definition fucks up the build process under suse.
42 # program needs to write in varlogjunkbuster
43 # install all templates
44 # create varlogjunkbuster
45 #
46 # Revision 1.5  2001/06/09 09:13:29  swa
47 # description shorter
48 #
49 # Revision 1.4  2001/06/08 20:53:36  swa
50 # use buildroot, export init to separate file (better manageability)
51 #
52 # Revision 1.3  2001/06/07 17:28:10  swa
53 # cosmetics
54 #
55 # Revision 1.2  2001/06/07 17:18:44  swa
56 # header fixed
57 #
58 #
59 # neededforbuild  -ijb
60 # usedforbuild    -ijb aaa_base aaa_dir autoconf automake base bash bindutil binutils bison bzip compress cpio cracklib db devs diffutils e2fsprogs file fileutils findutils flex gawk gcc gdbm gdbm-devel gettext glibc glibc-devel gpm gppshare groff gzip kbd less libtool libz lx_suse make mktemp modutils ncurses ncurses-devel net-tools netcfg nkitb pam pam-devel patch perl pgp ps rcs rpm sendmail sh-utils shadow strace syslogd sysvinit texinfo textutils timezone unzip util-linux vim xdevel xf86 xshared
61
62 Vendor:       http://ijbswa.sourceforge.net
63 Distribution: defineme
64 Name:         junkbuster-suse
65 Packager:     Stefan Waldherr <stefan@waldherr.org>
66
67 Copyright:    GPL
68 # buildroot does not work under f*cking suse :-(
69 #BuildRoot: /tmp/junkbuster-rpmbuild
70 Group:        Networking/Utilities
71 Provides:     ijb
72 Obsoletes:    ijb
73 Autoreqprov:  on
74 Version: 2.9.9
75 Release: 1
76 Summary:      The Internet Junkbuster
77 Source:  http://www.waldherr.org/junkbuster/ijbswa.tar.gz
78
79 #
80 # -----------------------------------------------------------------------------
81 #
82 %description
83 Internet Junkbuster is a web proxy with advanced filtering
84 capabilities for protecting privacy, filtering web page content,
85 managing cookies, controlling access, and removing ads, banners,
86 pop-ups and other obnoxious Internet Junk. Junkbuster has a very
87 flexible configuration and can be customized to suit individual needs
88 and tastes. Internet Junkbuster has application for both stand-alone
89 systems and multi-user networks.
90
91 Authors:
92 --------
93     http://ijbswa.sourceforge.net
94
95 SuSE series: n
96
97 #
98 # -----------------------------------------------------------------------------
99 #
100 %prep
101 %setup -c -n ijbswa
102
103 #
104 # -----------------------------------------------------------------------------
105 #
106 %build
107 ./configure
108 make
109 strip junkbuster
110
111 #
112 # -----------------------------------------------------------------------------
113 #
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 mkdir -p $RPM_BUILD_ROOT/{var/log/junkbuster,usr/{sbin,share/man/man1,share/doc/packages/junkbuster,share/doc/packages/junkbuster/user-manual,share/doc/packages/junkbuster/developer-manual,share/doc/packages/junkbuster/faq},etc/{junkbuster,junkbuster/templates,init.d}}
117
118 # make sure that we can write in the log directory
119 chown nobody.nogroup $RPM_BUILD_ROOT/var/log/junkbuster
120 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT/etc/init.d/junkbuster
121 # next line might require an additional rpm_build_root
122 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
123
124 install -m 755 junkbuster $RPM_BUILD_ROOT/usr/sbin
125 install -d $RPM_BUILD_ROOT/etc/junkbuster
126 install -d $RPM_BUILD_ROOT/etc/junkbuster/templates
127 install -m 644 actionsfile $RPM_BUILD_ROOT/etc/junkbuster
128 install -m 644 re_filterfile $RPM_BUILD_ROOT/etc/junkbuster
129 # verify all file locations, etc. in the config file
130 # don't start with ^ or commented lines are not replaced
131 cat config | \
132     sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
133     sed 's/^actionsfile.*/actionsfile \/etc\/junkbuster\/actionsfile/g' | \
134 #    sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
135 #    sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
136 #    sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
137 #    sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
138 #    sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
139     sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
140     config.tmp
141 cp -f config.tmp config
142 install -m 644 config $RPM_BUILD_ROOT/etc/junkbuster
143 #install -m 644 forward $RPM_BUILD_ROOT/etc/junkbuster
144 install -m 644 trust $RPM_BUILD_ROOT/etc/junkbuster
145 install -m 644 templates/* $RPM_BUILD_ROOT/etc/junkbuster/templates
146 # install -m 644 junkbuster.1 $RPM_BUILD_ROOT/usr/share/man/man1
147 cp -r doc/webserver/user-manual $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
148 cp -r doc/webserver/developer-manual $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
149 cp -r doc/webserver/faq $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
150 %{?suse_check}
151
152 #
153 # -----------------------------------------------------------------------------
154 #
155 %post
156 sbin/insserv etc/init.d/junkbuster
157
158 #
159 # -----------------------------------------------------------------------------
160 #
161 %postun
162 sbin/insserv etc/init.d/
163
164 #
165 # -----------------------------------------------------------------------------
166 #
167 %files
168 %doc /usr/share/doc/packages/junkbuster/faq/
169 %doc /usr/share/doc/packages/junkbuster/user-manual/
170 %doc /usr/share/doc/packages/junkbuster/developer-manual/
171 /usr/sbin/junkbuster
172 #/usr/share/man/man1/junkbuster.1.gz
173 %config(noreplace) /etc/junkbuster
174 /etc/init.d/junkbuster
175 /usr/sbin/rcjunkbuster
176 /var/log/junkbuster
177
178 #
179 # -----------------------------------------------------------------------------
180 #
181 %changelog -n junkbuster
182 * Sun Jun  3 2001 Stefan Waldherr <stefan@waldherr.org>
183 - rework of RPM
184 * Wed Feb 14 2001 - uli@suse.de
185 - fixed init script
186 * Wed Dec 06 2000 - bjacke@suse.de
187 - renamed package to junkbuster
188 - fixed copyright tag
189 * Thu Nov 30 2000 - uli@suse.de
190 - moved init script to /etc/init.d
191 * Wed Feb 16 2000 - kukuk@suse.de
192 - Move /usr/man -> /usr/share/man
193 - Mark /etc/ijb as "config(noreplace)"
194 * Mon Sep 20 1999 - uli@suse.de
195 - fixed init script
196 * Mon Sep 13 1999 - bs@suse.de
197 - ran old prepare_spec on spec file to switch to new prepare_spec.
198 * Thu Apr 01 1999 - daniel@suse.de
199 - do not start ijb as root (security)
200 * Tue Mar 30 1999 - daniel@suse.de
201 - donĀ“t use saclfile.ini
202 * Tue Mar 30 1999 - daniel@suse.de
203 - small fix to whitelist-configuration,
204   version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
205   (http://www.waldherr.org/junkbuster/)
206 * Mon Mar 01 1999 - daniel@suse.de
207 - new package: version 2.0