header fixed
[privoxy.git] / junkbuster-suse.spec
1 # $Id: junkbuster-rh.spec,v 1.2 2001/06/04 18:31:58 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-rh.spec,v $
29 #
30 # neededforbuild  -ijb
31 # 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
32
33 Vendor:       http://ijbswa.sourceforge.net
34 Distribution: defineme
35 Name:         junkbuster
36 Packager:     Stefan Waldherr <stefan@waldherr.org>
37
38 Copyright:    GPL
39 Group:        Networking/Utilities
40 Provides:     ijb
41 Obsoletes:    ijb
42 Autoreqprov:  on
43 Version:      2.0
44 Release:      14
45 Summary:      The Internet Junkbuster
46 Source:  http://www.waldherr.org/junkbuster/ijbswa.tar.gz
47 atch:   ijb20.dif
48
49 %description
50 The Internet Junkbuster (TM) blocks unwanted banner ads and protects
51 your privacy from cookies and other threats. It's free under the GPL
52 (no warranty), runs under *NIX and works with almost any browser. You
53 need to clear you browser's cache and specify the proxy-server,
54 described in /usr/doc/junkbuster.  This is a modified version which
55 returns a blank GIF for blocked images by default.  But you can
56 configure this via /etc/junkbuster/config.
57
58 Authors:
59 --------
60     http://ijbswa.sourceforge.net
61
62 SuSE series: n
63
64 %prep
65 %setup -n ijb20
66 %patch
67
68 %build
69 make
70 cat > /etc/init.d/junkbuster << EOT
71 #! /bin/sh
72 # Copyright (c) 1999 SuSE GmbH Nuremberg, Germany.  All rights reserved.
73 #
74 # Author: Daniel Bischof <daniel@suse.de>, 1999
75 #
76 # /sbin/init.d/junkbuster
77 #
78 ### BEGIN INIT INFO
79 # Provides:       junkbuster ijb
80 # Required-Start: $network syslog
81 # Required-Stop:
82 # Default-Start:  3 5
83 # Default-Stop:
84 # Description:    Starts the Internet Junkbuster
85 ### END INIT INFO
86 . /etc/rc.config
87 base=\${0##*/}
88 link=\${base#*[SK][0-9][0-9]}
89 #test \$link = \$base && START_IJB=yes
90 #test "\$START_IJB" = "yes" || exit 0
91 return=\$rc_done
92 case "\$1" in
93     start)
94         echo -n "Starting The Internet Junkbuster"
95         su - nobody -c 'nohup /usr/sbin/junkbuster /etc/ijb/junkbstr.ini < /dev/null > /dev/null &'
96         sleep 1
97         echo -e "\$return"
98         ;;
99     stop)
100         echo -n "Shutting down The Internet Junkbuster"
101         killproc -TERM /usr/sbin/junkbuster || return=\$rc_failed
102         echo -e "\$return"
103         ;;
104     restart|reload)
105         \$0 stop && \$0 start || return=\$rc_failed
106         ;;
107     status)
108         checkproc /usr/sbin/junkbuster && echo OK || echo No process
109         ;;
110     *)
111         echo "Usage: \$0 {start|restart|status|stop}"
112         exit 1
113 esac
114 test "\$return" = "\$rc_done" || exit 1
115 exit 0
116 EOT
117 chmod 755 /etc/init.d/junkbuster
118 ln -sf /etc/init.d/junkbuster /usr/sbin/rcjunkbuster
119
120 %install
121 install -m 755 junkbuster /usr/sbin
122 install -d /etc/ijb
123 install -m 644 *.ini /etc/ijb
124 install -m 644 junkbuster.1 /usr/share/man/man1
125 %{?suse_check}
126
127 %post
128 sbin/insserv etc/init.d/junkbuster
129
130 %postun
131 sbin/insserv etc/init.d/
132
133 %files
134 %doc README *.html
135 /usr/sbin/junkbuster
136 /usr/share/man/man1/junkbuster.1.gz
137 %config(noreplace) /etc/ijb
138 /etc/init.d/junkbuster
139 /usr/sbin/rcjunkbuster
140
141 %changelog -n junkbuster
142 * Wed Feb 14 2001 - uli@suse.de
143 - fixed init script
144 * Wed Dec 06 2000 - bjacke@suse.de
145 - renamed package to junkbuster
146 - fixed copyright tag
147 * Thu Nov 30 2000 - uli@suse.de
148 - moved init script to /etc/init.d
149 * Wed Feb 16 2000 - kukuk@suse.de
150 - Move /usr/man -> /usr/share/man
151 - Mark /etc/ijb as "config(noreplace)"
152 * Mon Sep 20 1999 - uli@suse.de
153 - fixed init script
154 * Mon Sep 13 1999 - bs@suse.de
155 - ran old prepare_spec on spec file to switch to new prepare_spec.
156 * Thu Apr 01 1999 - daniel@suse.de
157 - do not start ijb as root (security)
158 * Tue Mar 30 1999 - daniel@suse.de
159 - donĀ“t use saclfile.ini
160 * Tue Mar 30 1999 - daniel@suse.de
161 - small fix to whitelist-configuration,
162   version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
163   (http://www.waldherr.org/junkbuster/)
164 * Mon Mar 01 1999 - daniel@suse.de
165 - new package: version 2.0