1 # $Id: junkbuster-suse.spec,v 1.19 2002/03/11 22:59:05 hal9 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.
29 # do not set to %{name}
30 %define ijbconf %{_sysconfdir}/junkbuster
32 Summary: The Internet Junkbuster
33 Vendor: http://ijbswa.sourceforge.net
35 Distribution: defineme
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>
43 Group: Networking/Utilities
44 URL: http://ijbswa.sourceforge.net/
48 BuildRequires: perl gzip docbktls libtool
51 # -----------------------------------------------------------------------------
54 Internet Junkbuster is a web proxy with advanced filtering
55 capabilities for protecting privacy, filtering web page content,
56 managing cookies, controlling access, and removing ads, banners,
57 pop-ups and other obnoxious Internet Junk. Junkbuster has a very
58 flexible configuration and can be customized to suit individual needs
59 and tastes. Internet Junkbuster has application for both stand-alone
60 systems and multi-user networks.
64 http://ijbswa.sourceforge.net
69 # -----------------------------------------------------------------------------
75 # -----------------------------------------------------------------------------
84 ## Explicitily stripping is not recomended.
85 ## This is handled altomaticaly by RPM, and can couse troubles if
86 ## anyone wants to build an unstriped version - morcego
90 # -----------------------------------------------------------------------------
93 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
94 mkdir -p ${RPM_BUILD_ROOT}%{_sbindir} \
95 ${RPM_BUILD_ROOT}%{_mandir}/man8 \
96 ${RPM_BUILD_ROOT}/var/log/junkbuster \
97 ${RPM_BUILD_ROOT}%{ijbconf}/templates \
98 ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d \
99 ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d
100 gzip README AUTHORS ChangeLog junkbuster.1 || /bin/true
101 install -s -m 744 junkbuster $RPM_BUILD_ROOT%{_sbindir}/junkbuster
102 cp -f junkbuster.1.gz $RPM_BUILD_ROOT%{_mandir}/man8/junkbuster.8.gz
103 cp -f *.action $RPM_BUILD_ROOT%{ijbconf}/
104 cp -f re_filterfile $RPM_BUILD_ROOT%{ijbconf}/re_filterfile
105 cp -f trust $RPM_BUILD_ROOT%{ijbconf}/trust
106 cp -f templates/* $RPM_BUILD_ROOT%{ijbconf}/templates/
107 cp -f junkbuster.logrotate $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/junkbuster
108 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT%{_sysconfdir}/init.d/junkbuster
109 install -m 711 -d $RPM_BUILD_ROOT/var/log/junkbuster
110 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
112 # verify all file locations, etc. in the config file
113 # don't start with ^ or commented lines are not replaced
115 sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
116 # sed 's/^permissionsfile.*/permissionsfile \/etc\/junkbuster\/permissionsfile/g' | \
117 # sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
118 # sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
119 # sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
120 # sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
121 # sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
122 sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
123 $RPM_BUILD_ROOT%{ijbconf}/config
126 # -----------------------------------------------------------------------------
129 # We check to see if the user junkbuster exists.
130 # If it does, we do nothing
131 # If we don't, we check to see if the user junkbust exist and, in case it
132 # does, we change it do junkbuster. If it also does not exist, we create the
133 # junkbuster user -- morcego
134 id junkbuster > /dev/null 2>&1
135 if [ $? -eq 1 ]; then
136 id junkbust > /dev/null 2>&1
137 if [ $? -eq 0 ]; then
138 /usr/sbin/usermod -l junkbuster -d %{_sysconfdir}/junkbuster -s "" junkbust > /dev/null 2>&1
140 # -r does not work on suse.
141 /usr/sbin/groupadd junkbuster
142 /usr/sbin/useradd -d %{_sysconfdir}/junkbuster -g junkbuster -s "" junkbuster > /dev/null 2>&1
147 # -----------------------------------------------------------------------------
150 [ -f /var/log/junkbuster/junkbuster ] &&\
151 mv -f /var/log/junkbuster/junkbuster /var/log/junkbuster/logfile || /bin/true
152 chown -R junkbuster:junkbuster /var/log/junkbuster 2>/dev/null
153 chown -R junkbuster:junkbuster /etc/junkbuster 2>/dev/null
154 # not available on suse
155 #if [ "$1" = "1" ]; then
156 # /sbin/chkconfig --add junkbuster
157 # /sbin/service junkbuster condrestart > /dev/null 2>&1
159 # 01/09/02 HB, getting rid of any user=junkbust
160 # Changed by morcego to use the id command.
161 id junkbust > /dev/null 2>&1 && /usr/sbin/userdel junkbust || /bin/true
162 sbin/insserv etc/init.d/junkbuster
165 # -----------------------------------------------------------------------------
168 # need to stop the service on suse. swa.
169 #if [ "$1" = "0" ]; then
170 # /sbin/service junkbuster stop > /dev/null 2>&1 ||:
174 # -----------------------------------------------------------------------------
177 sbin/insserv etc/init.d/
178 # dont forget to remove user and group junkbuster
179 id junkbuster > /dev/null 2>&1 && /usr/sbin/userdel junkbuster || /bin/true
182 # -----------------------------------------------------------------------------
185 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
188 # -----------------------------------------------------------------------------
191 %defattr(-,root,root)
192 %doc README.gz AUTHORS.gz ChangeLog.gz
193 %doc doc/webserver/developer-manual doc/webserver/user-manual
194 %doc doc/webserver/user-manual
195 #%doc junkbuster.weekly junkbuster.monthly AUTHORS
198 %attr(0744,junkbuster,junkbuster) %dir /var/log/junkbuster
199 %config %{_sysconfdir}/logrotate.d/junkbuster
200 %attr(0755,root,root)/usr/sbin/junkbuster
202 %config %{_sysconfdir}/init.d/junkbuster
203 /usr/sbin/rcjunkbuster
206 # -----------------------------------------------------------------------------
209 * Mon Mar 11 2002 Hal Burgiss <hal@foobox.net>
210 - Remove --enable-no-gifs from configure.
212 * Sun Mar 03 2002 Hal Burgiss <hal@foobox.net>
213 - /bin/false for shell causes init script to fail. Reverting.
215 * Wed Jan 09 2002 Hal Burgiss <hal@foobox.net>
216 - Removed UID 73. Included user-manual and developer-manual in docs.
217 Include other actions files. Default shell is now /bin/false.
218 Userdel user=junkbust. ChangeLog was not zipped. Removed
219 RPM_OPT_FLAGS kludge.
221 * Fri Dec 28 2001 Thomas Steudten <thomas@steudten.ch>
222 - add paranoia check for 'rm -rf $RPM_BUILD_ROOT'
223 - add gzip to 'BuildRequires'
225 * Sat Dec 1 2001 Hal Burgiss <hal@foobox.net>
226 - actionsfile is now ijb.action.
228 * Tue Nov 6 2001 Thomas Steudten <thomas@steudten.ch>
230 - Add more documents for installation
231 - Add version string to name and source
233 * Wed Oct 24 2001 Hal Burigss <hal@foobox.net>
234 - Back to user 'junkbuster' and fix configure macro.
236 * Wed Oct 10 2001 Hal Burigss <hal@foobox.net>
237 - More changes for user 'junkbust'. Init script had 'junkbuster'.
239 * Sun Sep 23 2001 Hal Burgiss <hal@foobox.net>
240 - Change of $RPM_OPT_FLAGS handling. Added new HTML doc files.
241 - Changed owner of /etc/junkbuster to shut up PAM/xauth log noise.
243 * Thu Sep 13 2001 Hal Burgiss <hal@foobox.net>
244 - Added $RPM_OPT_FLAGS support, renaming of old logfile, and
245 - made sure no default shell exists for user junkbust.
247 * Sun Jun 3 2001 Stefan Waldherr <stefan@waldherr.org>
249 * Wed Feb 14 2001 - uli@suse.de
251 * Wed Dec 06 2000 - bjacke@suse.de
252 - renamed package to junkbuster
253 - fixed copyright tag
254 * Thu Nov 30 2000 - uli@suse.de
255 - moved init script to /etc/init.d
256 * Wed Feb 16 2000 - kukuk@suse.de
257 - Move /usr/man -> /usr/share/man
258 - Mark /etc/ijb as "config(noreplace)"
259 * Mon Sep 20 1999 - uli@suse.de
261 * Mon Sep 13 1999 - bs@suse.de
262 - ran old prepare_spec on spec file to switch to new prepare_spec.
263 * Thu Apr 01 1999 - daniel@suse.de
264 - do not start ijb as root (security)
265 * Tue Mar 30 1999 - daniel@suse.de
266 - donĀ“t use saclfile.ini
267 * Tue Mar 30 1999 - daniel@suse.de
268 - small fix to whitelist-configuration,
269 version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
270 (http://www.waldherr.org/junkbuster/)
271 * Mon Mar 01 1999 - daniel@suse.de
272 - new package: version 2.0
274 # $Log: junkbuster-suse.spec,v $
275 # Revision 1.19 2002/03/11 22:59:05 hal9
276 # Remove --enable-no-gifs
278 # Revision 1.18 2002/03/11 12:30:31 swa
279 # be consistent with rh spec file
281 # Revision 1.17 2002/03/08 19:30:23 swa
282 # remove user junkbuster after de-installation.
283 # synced suse with rh-specfile. installation
284 # and de-installation seem to work.
286 # Revision 1.16 2002/03/08 18:40:44 swa
287 # build requires tools. useradd and del works
290 # Revision 1.15 2002/03/07 19:23:50 swa
291 # i hate to scroll. suse: wrong configdir.
293 # Revision 1.14 2002/03/07 19:10:21 swa
294 # builds cleanly. thanks to kukuk@suse.de
297 # Revision 1.13 2002/03/07 18:25:56 swa
298 # synced redhat and suse build process
300 # Revision 1.12 2002/03/02 15:50:04 swa
301 # 2.9.11 version. more input for docs.
303 # Revision 1.11 2001/12/02 10:29:26 swa
304 # New version made these changes necessary.
306 # Revision 1.10 2001/10/31 19:27:27 swa
307 # consistent description. new name for suse since
308 # we had troubles with rpms of identical names
311 # Revision 1.9 2001/10/26 18:17:23 swa
314 # Revision 1.8 2001/09/13 16:22:42 swa
315 # man page is legacy. suse rpm now contains html
318 # Revision 1.7 2001/09/10 17:44:22 swa
319 # integrate three pieces of documentation.
321 # Revision 1.6 2001/09/10 16:29:23 swa
322 # binary contained debug info.
323 # buildroot definition fucks up the build process under suse.
324 # program needs to write in varlogjunkbuster
325 # install all templates
326 # create varlogjunkbuster
328 # Revision 1.5 2001/06/09 09:13:29 swa
329 # description shorter
331 # Revision 1.4 2001/06/08 20:53:36 swa
332 # use buildroot, export init to separate file (better manageability)
334 # Revision 1.3 2001/06/07 17:28:10 swa
337 # Revision 1.2 2001/06/07 17:18:44 swa