Added FEATURE_NO_GIFS
[privoxy.git] / junkbuster-suse.spec
1 # $Id: junkbuster-suse.spec,v 1.14 2002/03/07 19:10:21 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
29 # do not set to %{name}
30 %define ijbconf %{_sysconfdir}/junkbuster
31
32 Summary:      The Internet Junkbuster
33 Vendor:       http://ijbswa.sourceforge.net
34 Name:         junkbuster-suse
35 Distribution: defineme
36 Version: 2.9.11
37 Release: 1
38 Source: http://www.waldherr.org/%{name}/ijbswa-%{version}.tar.gz
39 # not sure if this works
40 BuildRoot: %{_tmppath}/%{name}-%{version}-root
41 Packager:     Stefan Waldherr <stefan@waldherr.org>
42 Copyright:    GPL
43 Group:        Networking/Utilities
44 URL: http://ijbswa.sourceforge.net/
45 Provides:     ijb
46 Obsoletes:    ijb
47 Autoreqprov:  on
48
49 #
50 # -----------------------------------------------------------------------------
51 #
52 %description
53 Internet Junkbuster is a web proxy with advanced filtering
54 capabilities for protecting privacy, filtering web page content,
55 managing cookies, controlling access, and removing ads, banners,
56 pop-ups and other obnoxious Internet Junk. Junkbuster has a very
57 flexible configuration and can be customized to suit individual needs
58 and tastes. Internet Junkbuster has application for both stand-alone
59 systems and multi-user networks.
60
61 Authors:
62 --------
63     http://ijbswa.sourceforge.net
64
65 SuSE series: n
66
67 #
68 # -----------------------------------------------------------------------------
69 #
70 %prep
71 %setup -c -n ijbswa
72
73 #
74 # -----------------------------------------------------------------------------
75 #
76 %build
77 autoheader
78 autoconf
79 ./configure
80 make
81 make dok
82 strip junkbuster
83
84 #
85 # -----------------------------------------------------------------------------
86 # hint by kukuk@suse.de
87 %pre
88 usr/sbin/groupadd -r junkbuster
89 usr/sbin/useradd -g junkbuster -d /etc/junkbuster -r junkbuster -s "/bin/false" > /dev/null 2>&1 || /bin/true
90
91 #
92 # -----------------------------------------------------------------------------
93 #
94 %install
95 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
96 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
97          ${RPM_BUILD_ROOT}%{_mandir}/man8 \
98          ${RPM_BUILD_ROOT}/var/log/junkbuster \
99          ${RPM_BUILD_ROOT}%{ijbconf}/templates \
100          ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
101          ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d
102 gzip README AUTHORS ChangeLog junkbuster.1 || /bin/true
103 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
104 cp -f junkbuster.1.gz $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8.gz
105 cp -f *.action $RPM_BUILD_ROOT%{ijbconf}/
106 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
107 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
108 cp -f templates/*  $RPM_BUILD_ROOT%{ijbconf}/templates/
109 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
110 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT%{_sysconfdir}/init.d/junkbuster
111 install -m 711 -d $RPM_BUILD_ROOT/var/log/junkbuster
112 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
113
114 # verify all file locations, etc. in the config file
115 # don't start with ^ or commented lines are not replaced
116 cat config | \
117     sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
118 #    sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
119 #    sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
120 #    sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
121 #    sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
122 #    sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
123 #    sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
124     sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
125     $RPM_BUILD_ROOT%{ijbconf}/config
126
127 #
128 # -----------------------------------------------------------------------------
129 #
130 %post
131 # for upgrade from 2.0.x
132 if [ -f /var/log/junkbuster/junkbuster ]; then
133  mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile
134  chown -R junkbuster:junkbuster /var/log/junkbuster 2>/dev/null
135  chown -R junkbuster:junkbuster /etc/junkbuster 2>/dev/null
136 fi
137 sbin/insserv etc/init.d/junkbuster
138
139 #
140 # -----------------------------------------------------------------------------
141 #
142 %postun
143 sbin/insserv etc/init.d/
144
145 #
146 # -----------------------------------------------------------------------------
147 #
148 %clean
149 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
150
151 #
152 # -----------------------------------------------------------------------------
153 #
154 %files
155 %defattr(-,root,root)
156 %doc README.gz AUTHORS.gz ChangeLog.gz
157 %doc doc/webserver/developer-manual doc/webserver/user-manual
158 %doc doc/webserver/user-manual
159 #%doc junkbuster.weekly junkbuster.monthly AUTHORS
160 %dir %{ijbconf}
161 %config %{ijbconf}/*
162 %attr(0744,junkbuster,junkbuster) %dir /var/log/junkbuster
163 %config %{_sysconfdir}/logrotate.d/junkbuster
164 %attr(0755,root,root)/usr/sbin/junkbuster
165 %{_mandir}/man8/*
166 %config %{_sysconfdir}/init.d/junkbuster
167 /usr/sbin/rcjunkbuster
168
169 #
170 # -----------------------------------------------------------------------------
171 #
172 %changelog
173 * Thu Mar  7 2002 Stefan Waldherr <stefan@waldherr.org>
174 - major rework of rpm, help by kukuk@suse.de
175
176 * Sun Mar 03 2002 Hal Burgiss <hal@foobox.net>
177 - /bin/false for shell causes init script to fail. Reverting.
178
179 * Wed Jan 09 2002 Hal Burgiss <hal@foobox.net>
180 - Removed UID 73. Included user-manual and developer-manual in docs.
181   Include other actions files. Default shell is now /bin/false.
182   Userdel user=junkbust. ChangeLog was not zipped. Removed
183   RPM_OPT_FLAGS kludge.
184
185 * Fri Dec 28 2001 Thomas Steudten <thomas@steudten.ch>
186 - add paranoia check for 'rm -rf $RPM_BUILD_ROOT'
187 - add gzip to 'BuildRequires'
188
189 * Sat Dec  1 2001 Hal Burgiss <hal@foobox.net>
190 - actionsfile is now ijb.action.
191
192 * Tue Nov  6 2001 Thomas Steudten <thomas@steudten.ch>
193 - Compress manpage
194 - Add more documents for installation
195 - Add version string to name and source
196
197 * Wed Oct 24 2001 Hal Burigss <hal@foobox.net>
198 - Back to user 'junkbuster' and fix configure macro.
199
200 * Wed Oct 10 2001 Hal Burigss <hal@foobox.net>
201 - More changes for user 'junkbust'. Init script had 'junkbuster'.
202
203 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
204 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
205 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
206
207 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
208 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
209 - made sure no default shell exists for user junkbust.
210
211 * Sun Jun  3 2001 Stefan Waldherr <stefan@waldherr.org>
212 - rework of RPM
213 * Wed Feb 14 2001 - uli@suse.de
214 - fixed init script
215 * Wed Dec 06 2000 - bjacke@suse.de
216 - renamed package to junkbuster
217 - fixed copyright tag
218 * Thu Nov 30 2000 - uli@suse.de
219 - moved init script to /etc/init.d
220 * Wed Feb 16 2000 - kukuk@suse.de
221 - Move /usr/man -> /usr/share/man
222 - Mark /etc/ijb as "config(noreplace)"
223 * Mon Sep 20 1999 - uli@suse.de
224 - fixed init script
225 * Mon Sep 13 1999 - bs@suse.de
226 - ran old prepare_spec on spec file to switch to new prepare_spec.
227 * Thu Apr 01 1999 - daniel@suse.de
228 - do not start ijb as root (security)
229 * Tue Mar 30 1999 - daniel@suse.de
230 - donĀ“t use saclfile.ini
231 * Tue Mar 30 1999 - daniel@suse.de
232 - small fix to whitelist-configuration,
233   version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
234   (http://www.waldherr.org/junkbuster/)
235 * Mon Mar 01 1999 - daniel@suse.de
236 - new package: version 2.0
237
238 # $Log: junkbuster-suse.spec,v $
239 # Revision 1.14  2002/03/07 19:10:21  swa
240 # builds cleanly. thanks to kukuk@suse.de
241 # not yet tested.
242 #
243 # Revision 1.13  2002/03/07 18:25:56  swa
244 # synced redhat and suse build process
245 #
246 # Revision 1.12  2002/03/02 15:50:04  swa
247 # 2.9.11 version. more input for docs.
248 #
249 # Revision 1.11  2001/12/02 10:29:26  swa
250 # New version made these changes necessary.
251 #
252 # Revision 1.10  2001/10/31 19:27:27  swa
253 # consistent description. new name for suse since
254 # we had troubles with rpms of identical names
255 # on the webserver.
256 #
257 # Revision 1.9  2001/10/26 18:17:23  swa
258 # new version string
259 #
260 # Revision 1.8  2001/09/13 16:22:42  swa
261 # man page is legacy. suse rpm now contains html
262 # documentation.
263 #
264 # Revision 1.7  2001/09/10 17:44:22  swa
265 # integrate three pieces of documentation.
266 #
267 # Revision 1.6  2001/09/10 16:29:23  swa
268 # binary contained debug info.
269 # buildroot definition fucks up the build process under suse.
270 # program needs to write in varlogjunkbuster
271 # install all templates
272 # create varlogjunkbuster
273 #
274 # Revision 1.5  2001/06/09 09:13:29  swa
275 # description shorter
276 #
277 # Revision 1.4  2001/06/08 20:53:36  swa
278 # use buildroot, export init to separate file (better manageability)
279 #
280 # Revision 1.3  2001/06/07 17:28:10  swa
281 # cosmetics
282 #
283 # Revision 1.2  2001/06/07 17:18:44  swa
284 # header fixed
285 #
286 #