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