1 # $Id: junkbuster-suse.spec,v 1.13 2002/03/07 18:25:56 swa Exp $
3 # Written by and Copyright (C) 2001 the SourceForge
4 # IJBSWA team. http://ijbswa.sourceforge.net
6 # Based on the Internet Junkbuster originally written
7 # by and Copyright (C) 1997 Anonymous Coders and
8 # Junkbusters Corporation. http://www.junkbusters.com
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.
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.
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.
28 # $Log: junkbuster-suse.spec,v $
29 # Revision 1.13 2002/03/07 18:25:56 swa
30 # synced redhat and suse build process
32 # Revision 1.12 2002/03/02 15:50:04 swa
33 # 2.9.11 version. more input for docs.
35 # Revision 1.11 2001/12/02 10:29:26 swa
36 # New version made these changes necessary.
38 # Revision 1.10 2001/10/31 19:27:27 swa
39 # consistent description. new name for suse since
40 # we had troubles with rpms of identical names
43 # Revision 1.9 2001/10/26 18:17:23 swa
46 # Revision 1.8 2001/09/13 16:22:42 swa
47 # man page is legacy. suse rpm now contains html
50 # Revision 1.7 2001/09/10 17:44:22 swa
51 # integrate three pieces of documentation.
53 # Revision 1.6 2001/09/10 16:29:23 swa
54 # binary contained debug info.
55 # buildroot definition fucks up the build process under suse.
56 # program needs to write in varlogjunkbuster
57 # install all templates
58 # create varlogjunkbuster
60 # Revision 1.5 2001/06/09 09:13:29 swa
63 # Revision 1.4 2001/06/08 20:53:36 swa
64 # use buildroot, export init to separate file (better manageability)
66 # Revision 1.3 2001/06/07 17:28:10 swa
69 # Revision 1.2 2001/06/07 17:18:44 swa
74 %define ijbconf %{_sysconfdir}/%{name}
76 Summary: The Internet Junkbuster
77 Vendor: http://ijbswa.sourceforge.net
79 Distribution: defineme
82 Source: http://www.waldherr.org/%{name}/ijbswa-%{version}.tar.gz
83 # not sure if this works
84 BuildRoot: %{_tmppath}/%{name}-%{version}-root
85 Packager: Stefan Waldherr <stefan@waldherr.org>
87 Group: Networking/Utilities
88 URL: http://ijbswa.sourceforge.net/
94 # -----------------------------------------------------------------------------
97 Internet Junkbuster is a web proxy with advanced filtering
98 capabilities for protecting privacy, filtering web page content,
99 managing cookies, controlling access, and removing ads, banners,
100 pop-ups and other obnoxious Internet Junk. Junkbuster has a very
101 flexible configuration and can be customized to suit individual needs
102 and tastes. Internet Junkbuster has application for both stand-alone
103 systems and multi-user networks.
107 http://ijbswa.sourceforge.net
112 # -----------------------------------------------------------------------------
118 # -----------------------------------------------------------------------------
129 # -----------------------------------------------------------------------------
130 # hint by kukuk@suse.de
132 usr/sbin/groupadd -r junkbuster
133 usr/sbin/useradd -g junkbuster -d /etc/junkbuster -r junkbuster -s "/bin/false" > /dev/null 2>&1 || /bin/true
136 # -----------------------------------------------------------------------------
139 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
140 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
141 ${RPM_BUILD_ROOT}%{_mandir}/man8 \
142 ${RPM_BUILD_ROOT}/var/log/junkbuster \
143 ${RPM_BUILD_ROOT}%{ijbconf}/templates \
144 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
145 ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d
146 gzip README AUTHORS ChangeLog junkbuster.1 || /bin/true
147 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
148 cp -f junkbuster.1.gz $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8.gz
149 cp -f *.action $RPM_BUILD_ROOT%{ijbconf}/
150 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
151 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
152 cp -f templates/* $RPM_BUILD_ROOT%{ijbconf}/templates/
153 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
154 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT%{_sysconfdir}/init.d/junkbuster
155 install -m 711 -d $RPM_BUILD_ROOT/var/log/junkbuster
156 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
158 # verify all file locations, etc. in the config file
159 # don't start with ^ or commented lines are not replaced
161 sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
162 # sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
163 # sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
164 # sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
165 # sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
166 # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
167 # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
168 sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
169 $RPM_BUILD_ROOT%{ijbconf}/config
172 # -----------------------------------------------------------------------------
175 # for upgrade from 2.0.x
176 if [ -f /var/log/junkbuster/junkbuster ]; then
177 mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile
178 chown -R junkbuster:junkbuster /var/log/junkbuster 2>/dev/null
179 chown -R junkbuster:junkbuster /etc/junkbuster 2>/dev/null
181 sbin/insserv etc/init.d/junkbuster
184 # -----------------------------------------------------------------------------
187 sbin/insserv etc/init.d/
190 # -----------------------------------------------------------------------------
193 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
196 # -----------------------------------------------------------------------------
199 %defattr(-,root,root)
200 %doc README.gz AUTHORS.gz ChangeLog.gz
201 %doc doc/webserver/developer-manual doc/webserver/user-manual
202 %doc doc/webserver/user-manual
203 #%doc junkbuster.weekly junkbuster.monthly AUTHORS
206 %attr(0744,junkbuster,junkbuster) %dir /var/log/junkbuster
207 %config %{_sysconfdir}/logrotate.d/junkbuster
208 %attr(0755,root,root)/usr/sbin/junkbuster
210 %config %{_sysconfdir}/init.d/junkbuster
211 /usr/sbin/rcjunkbuster
214 # -----------------------------------------------------------------------------
217 * Thu Mar 7 2002 Stefan Waldherr <stefan@waldherr.org>
218 - major rework of rpm, help by kukuk@suse.de
220 * Sun Mar 03 2002 Hal Burgiss <hal@foobox.net>
221 - /bin/false for shell causes init script to fail. Reverting.
223 * Wed Jan 09 2002 Hal Burgiss <hal@foobox.net>
224 - Removed UID 73. Included user-manual and developer-manual in docs.
225 Include other actions files. Default shell is now /bin/false.
226 Userdel user=junkbust. ChangeLog was not zipped. Removed
227 RPM_OPT_FLAGS kludge.
229 * Fri Dec 28 2001 Thomas Steudten <thomas@steudten.ch>
230 - add paranoia check for 'rm -rf $RPM_BUILD_ROOT'
231 - add gzip to 'BuildRequires'
233 * Sat Dec 1 2001 Hal Burgiss <hal@foobox.net>
234 - actionsfile is now ijb.action.
236 * Tue Nov 6 2001 Thomas Steudten <thomas@steudten.ch>
238 - Add more documents for installation
239 - Add version string to name and source
241 * Wed Oct 24 2001 Hal Burigss <hal@foobox.net>
242 - Back to user 'junkbuster' and fix configure macro.
244 * Wed Oct 10 2001 Hal Burigss <hal@foobox.net>
245 - More changes for user 'junkbust'. Init script had 'junkbuster'.
247 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
248 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
249 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
251 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
252 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
253 - made sure no default shell exists for user junkbust.
255 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
257 * Wed Feb 14 2001 - uli@suse.de
259 * Wed Dec 06 2000 - bjacke@suse.de
260 - renamed package to junkbuster
261 - fixed copyright tag
262 * Thu Nov 30 2000 - uli@suse.de
263 - moved init script to /etc/init.d
264 * Wed Feb 16 2000 - kukuk@suse.de
265 - Move /usr/man -> /usr/share/man
266 - Mark /etc/ijb as "config(noreplace)"
267 * Mon Sep 20 1999 - uli@suse.de
269 * Mon Sep 13 1999 - bs@suse.de
270 - ran old prepare_spec on spec file to switch to new prepare_spec.
271 * Thu Apr 01 1999 - daniel@suse.de
272 - do not start ijb as root (security)
273 * Tue Mar 30 1999 - daniel@suse.de
274 - donĀ“t use saclfile.ini
275 * Tue Mar 30 1999 - daniel@suse.de
276 - small fix to whitelist-configuration,
277 version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
278 (http://www.waldherr.org/junkbuster/)
279 * Mon Mar 01 1999 - daniel@suse.de
280 - new package: version 2.0