give consistent intro. look pretty (ier) ;-).
[privoxy.git] / junkbuster-suse.spec
1 # $Id: junkbuster-suse.spec,v 1.8 2001/09/13 16:22:42 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.8  2001/09/13 16:22:42  swa
30 # man page is legacy. suse rpm now contains html
31 # documentation.
32 #
33 # Revision 1.7  2001/09/10 17:44:22  swa
34 # integrate three pieces of documentation.
35 #
36 # Revision 1.6  2001/09/10 16:29:23  swa
37 # binary contained debug info.
38 # buildroot definition fucks up the build process under suse.
39 # program needs to write in varlogjunkbuster
40 # install all templates
41 # create varlogjunkbuster
42 #
43 # Revision 1.5  2001/06/09 09:13:29  swa
44 # description shorter
45 #
46 # Revision 1.4  2001/06/08 20:53:36  swa
47 # use buildroot, export init to separate file (better manageability)
48 #
49 # Revision 1.3  2001/06/07 17:28:10  swa
50 # cosmetics
51 #
52 # Revision 1.2  2001/06/07 17:18:44  swa
53 # header fixed
54 #
55 #
56 # neededforbuild  -ijb
57 # 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
58
59 Vendor:       http://ijbswa.sourceforge.net
60 Distribution: defineme
61 Name:         junkbuster
62 Packager:     Stefan Waldherr <stefan@waldherr.org>
63
64 Copyright:    GPL
65 # buildroot does not work under f*cking suse :-(
66 #BuildRoot: /tmp/junkbuster-rpmbuild
67 Group:        Networking/Utilities
68 Provides:     ijb
69 Obsoletes:    ijb
70 Autoreqprov:  on
71 Version: 2.9.9
72 Release: 1
73 Summary:      The Internet Junkbuster
74 Source:  http://www.waldherr.org/junkbuster/ijbswa.tar.gz
75
76 #
77 # -----------------------------------------------------------------------------
78 #
79 %description
80 The Internet Junkbuster is an application that provides privacy and
81 security to the user of the world wide web. It controls cookies,
82 removes advertisements or pop-up windows. You can actually modify the
83 content of web pages on-the-fly.
84
85 Authors:
86 --------
87     http://ijbswa.sourceforge.net
88
89 SuSE series: n
90
91 #
92 # -----------------------------------------------------------------------------
93 #
94 %prep
95 %setup -c -n ijbswa
96
97 #
98 # -----------------------------------------------------------------------------
99 #
100 %build
101 ./configure
102 make
103 strip junkbuster
104
105 #
106 # -----------------------------------------------------------------------------
107 #
108 %install
109 rm -rf $RPM_BUILD_ROOT
110 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}}
111
112 # make sure that we can write in the log directory
113 chown nobody.nogroup $RPM_BUILD_ROOT/var/log/junkbuster
114 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT/etc/init.d/junkbuster
115 # next line might require an additional rpm_build_root
116 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
117
118 install -m 755 junkbuster $RPM_BUILD_ROOT/usr/sbin
119 install -d $RPM_BUILD_ROOT/etc/junkbuster
120 install -d $RPM_BUILD_ROOT/etc/junkbuster/templates
121 install -m 644 actionsfile $RPM_BUILD_ROOT/etc/junkbuster
122 install -m 644 re_filterfile $RPM_BUILD_ROOT/etc/junkbuster
123 # verify all file locations, etc. in the config file
124 # don't start with ^ or commented lines are not replaced
125 cat config | \
126     sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
127     sed 's/^actionsfile.*/actionsfile \/etc\/junkbuster\/actionsfile/g' | \
128 #    sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
129 #    sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
130 #    sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
131 #    sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
132 #    sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
133     sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
134     config.tmp
135 cp -f config.tmp config
136 install -m 644 config $RPM_BUILD_ROOT/etc/junkbuster
137 #install -m 644 forward $RPM_BUILD_ROOT/etc/junkbuster
138 install -m 644 trust $RPM_BUILD_ROOT/etc/junkbuster
139 install -m 644 templates/* $RPM_BUILD_ROOT/etc/junkbuster/templates
140 # install -m 644 junkbuster.1 $RPM_BUILD_ROOT/usr/share/man/man1
141 cp -r doc/webserver/user-manual $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
142 cp -r doc/webserver/developer-manual $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
143 cp -r doc/webserver/faq $RPM_BUILD_ROOT/usr/share/doc/packages/junkbuster
144 %{?suse_check}
145
146 #
147 # -----------------------------------------------------------------------------
148 #
149 %post
150 sbin/insserv etc/init.d/junkbuster
151
152 #
153 # -----------------------------------------------------------------------------
154 #
155 %postun
156 sbin/insserv etc/init.d/
157
158 #
159 # -----------------------------------------------------------------------------
160 #
161 %files
162 %doc /usr/share/doc/packages/junkbuster/faq/
163 %doc /usr/share/doc/packages/junkbuster/user-manual/
164 %doc /usr/share/doc/packages/junkbuster/developer-manual/
165 /usr/sbin/junkbuster
166 #/usr/share/man/man1/junkbuster.1.gz
167 %config(noreplace) /etc/junkbuster
168 /etc/init.d/junkbuster
169 /usr/sbin/rcjunkbuster
170 /var/log/junkbuster
171
172 #
173 # -----------------------------------------------------------------------------
174 #
175 %changelog -n junkbuster
176 * Sun Jun  3 2001 Stefan Waldherr <stefan@waldherr.org>
177 - rework of RPM
178 * Wed Feb 14 2001 - uli@suse.de
179 - fixed init script
180 * Wed Dec 06 2000 - bjacke@suse.de
181 - renamed package to junkbuster
182 - fixed copyright tag
183 * Thu Nov 30 2000 - uli@suse.de
184 - moved init script to /etc/init.d
185 * Wed Feb 16 2000 - kukuk@suse.de
186 - Move /usr/man -> /usr/share/man
187 - Mark /etc/ijb as "config(noreplace)"
188 * Mon Sep 20 1999 - uli@suse.de
189 - fixed init script
190 * Mon Sep 13 1999 - bs@suse.de
191 - ran old prepare_spec on spec file to switch to new prepare_spec.
192 * Thu Apr 01 1999 - daniel@suse.de
193 - do not start ijb as root (security)
194 * Tue Mar 30 1999 - daniel@suse.de
195 - donĀ“t use saclfile.ini
196 * Tue Mar 30 1999 - daniel@suse.de
197 - small fix to whitelist-configuration,
198   version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
199   (http://www.waldherr.org/junkbuster/)
200 * Mon Mar 01 1999 - daniel@suse.de
201 - new package: version 2.0