first proposal of a structure.
[privoxy.git] / junkbuster-suse.spec
1 # $Id: junkbuster-suse.spec,v 1.5 2001/06/09 09:13:29 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.5  2001/06/09 09:13:29  swa
30 # description shorter
31 #
32 # Revision 1.4  2001/06/08 20:53:36  swa
33 # use buildroot, export init to separate file (better manageability)
34 #
35 # Revision 1.3  2001/06/07 17:28:10  swa
36 # cosmetics
37 #
38 # Revision 1.2  2001/06/07 17:18:44  swa
39 # header fixed
40 #
41 #
42 # neededforbuild  -ijb
43 # 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
44
45 Vendor:       http://ijbswa.sourceforge.net
46 Distribution: defineme
47 Name:         junkbuster
48 Packager:     Stefan Waldherr <stefan@waldherr.org>
49
50 Copyright:    GPL
51 # buildroot does not work under f*cking suse :-(
52 #BuildRoot: /tmp/junkbuster-rpmbuild
53 Group:        Networking/Utilities
54 Provides:     ijb
55 Obsoletes:    ijb
56 Autoreqprov:  on
57 Version: 2.9.8
58 Release: 1
59 Summary:      The Internet Junkbuster
60 Source:  http://www.waldherr.org/junkbuster/ijbswa.tar.gz
61
62 #
63 # -----------------------------------------------------------------------------
64 #
65 %description
66 The Internet Junkbuster stops your browser from displaying the
67 advertisement images that pervade many commercial web pages.  Since
68 your browser has to download fewer images, surfing the web should be
69 faster.
70
71 Authors:
72 --------
73     http://ijbswa.sourceforge.net
74
75 SuSE series: n
76
77 #
78 # -----------------------------------------------------------------------------
79 #
80 %prep
81 %setup -c -n ijbswa
82
83 #
84 # -----------------------------------------------------------------------------
85 #
86 %build
87 ./configure
88 make
89 strip junkbuster
90
91 #
92 # -----------------------------------------------------------------------------
93 #
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 mkdir -p $RPM_BUILD_ROOT/{var/log/junkbuster,usr/{sbin,share/man/man1},etc/{junkbuster,junkbuster/templates,init.d}}
97
98 # make sure that we can write in the log directory
99 chown nobody.nogroup $RPM_BUILD_ROOT/var/log/junkbuster
100 install -m 755 junkbuster.init.suse $RPM_BUILD_ROOT/etc/init.d/junkbuster
101 ln -sf /etc/init.d/junkbuster $RPM_BUILD_ROOT/usr/sbin/rcjunkbuster
102
103 install -m 755 junkbuster $RPM_BUILD_ROOT/usr/sbin
104 install -d $RPM_BUILD_ROOT/etc/junkbuster
105 install -d $RPM_BUILD_ROOT/etc/junkbuster/templates
106 install -m 644 actionsfile $RPM_BUILD_ROOT/etc/junkbuster
107 install -m 644 re_filterfile $RPM_BUILD_ROOT/etc/junkbuster
108 # verify all file locations, etc. in the config file
109 # don't start with ^ or commented lines are not replaced
110 cat config | \
111     sed 's/^confdir.*/confdir \/etc\/junkbuster/g' | \
112     sed 's/^actionsfile.*/actionsfile \/etc\/junkbuster\/actionsfile/g' | \
113 #    sed 's/^re_filterfile.*/re_filterfile \/etc\/junkbuster\/re_filterfile/g' | \
114 #    sed 's/^logfile.*/logfile \/var\/log\/junkbuster\/logfile/g' | \
115 #    sed 's/^jarfile.*/jarfile \/var\/log\/junkbuster\/jarfile/g' | \
116 #    sed 's/^forward.*/forward \/etc\/junkbuster\/forward/g' | \
117 #    sed 's/^aclfile.*/aclfile \/etc\/junkbuster\/aclfile/g' > \
118     sed 's/^logdir.*/logdir \/var\/log\/junkbuster/g' > \
119     config.tmp
120 cp -f config.tmp config
121 install -m 644 config $RPM_BUILD_ROOT/etc/junkbuster
122 #install -m 644 forward $RPM_BUILD_ROOT/etc/junkbuster
123 install -m 644 trust $RPM_BUILD_ROOT/etc/junkbuster
124 install -m 644 templates/* $RPM_BUILD_ROOT/etc/junkbuster/templates
125 install -m 644 junkbuster.1 $RPM_BUILD_ROOT/usr/share/man/man1
126 %{?suse_check}
127
128 #
129 # -----------------------------------------------------------------------------
130 #
131 %post
132 sbin/insserv etc/init.d/junkbuster
133
134 #
135 # -----------------------------------------------------------------------------
136 #
137 %postun
138 sbin/insserv etc/init.d/
139
140 #
141 # -----------------------------------------------------------------------------
142 #
143 %files
144 #%doc README *.html
145 /usr/sbin/junkbuster
146 /usr/share/man/man1/junkbuster.1.gz
147 %config(noreplace) /etc/junkbuster
148 /etc/init.d/junkbuster
149 /usr/sbin/rcjunkbuster
150 /var/log/junkbuster
151
152 #
153 # -----------------------------------------------------------------------------
154 #
155 %changelog -n junkbuster
156 * Sun Jun  3 2001 Stefan Waldherr <stefan@waldherr.org>
157 - rework of RPM
158 * Wed Feb 14 2001 - uli@suse.de
159 - fixed init script
160 * Wed Dec 06 2000 - bjacke@suse.de
161 - renamed package to junkbuster
162 - fixed copyright tag
163 * Thu Nov 30 2000 - uli@suse.de
164 - moved init script to /etc/init.d
165 * Wed Feb 16 2000 - kukuk@suse.de
166 - Move /usr/man -> /usr/share/man
167 - Mark /etc/ijb as "config(noreplace)"
168 * Mon Sep 20 1999 - uli@suse.de
169 - fixed init script
170 * Mon Sep 13 1999 - bs@suse.de
171 - ran old prepare_spec on spec file to switch to new prepare_spec.
172 * Thu Apr 01 1999 - daniel@suse.de
173 - do not start ijb as root (security)
174 * Tue Mar 30 1999 - daniel@suse.de
175 - donĀ“t use saclfile.ini
176 * Tue Mar 30 1999 - daniel@suse.de
177 - small fix to whitelist-configuration,
178   version is and was 2.0.2 WITHOUT Stefan Waldherr's patches
179   (http://www.waldherr.org/junkbuster/)
180 * Mon Mar 01 1999 - daniel@suse.de
181 - new package: version 2.0