]> git.pld-linux.org Git - packages/privoxy.git/blob - privoxy.spec
- massive attack: source-md5
[packages/privoxy.git] / privoxy.spec
1
2 %define veryoldname junkbust
3 %define oldname junkbuster
4 %define privoxyconf %{_sysconfdir}/%{name}
5 # TODO: resolve conflict
6 %define privoxy_uid 73
7 %define privoxy_gid 73
8
9 Summary:        Privoxy - privacy enhancing proxy
10 Summary(pl):    Privoxy - proxy rozszerzaj±ce prywatno¶æ
11 Name:           privoxy
12 Version:        3.0.0
13 Release:        1
14 License:        GPL
15 Source0:        http://www.waldherr.org/%{name}/%{name}-%{version}.tar.gz
16 # Source0-md5:  152e21d4fb57b79da33559ba6dd1dd74
17 Group:          Networking/Daemons
18 URL:            http://www.privoxy.org/
19 BuildRequires:  autoconf
20 BuildRequires:  libtool
21 BuildRequires:  lynx
22 BuildRequires:  perl
23 PreReq:         rc-scripts
24 Requires(pre):  /usr/bin/getgid
25 Requires(pre):  /bin/id
26 Requires(pre):  /usr/sbin/groupadd
27 Requires(pre):  /usr/sbin/useradd
28 Requires(post): fileutils
29 Requires(post,preun):   /sbin/chkconfig
30 Requires(postun):       /usr/sbin/userdel
31 Requires(postun):       /usr/sbin/groupdel
32 Obsoletes:      junkbuster
33 Obsoletes:      junkbuster-blank
34 Obsoletes:      junkbuster-raw
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 Privoxy is a web proxy with advanced filtering capabilities for
39 protecting privacy, filtering web page content, managing cookies,
40 controlling access, and removing ads, banners, pop-ups and other
41 obnoxious Internet junk. Privoxy has a very flexible configuration and
42 can be customized to suit individual needs and tastes. Privoxy has
43 application for both stand-alone systems and multi-user networks.
44
45 Privoxy is based on the Internet Junkbuster.
46
47 %description -l pl
48 Privoxy to proxy WWW z rozszerzonymi mo¿liwo¶ciami filtrowania
49 s³u¿±cymi do zabezpieczenia prywatno¶ci, filtrowania zawarto¶ci stron
50 WWW, zarz±dzania ciasteczkami, kontroli dostêpu, usuwania bannerów,
51 wyskakuj±cych okienek i innych wstrêtrnych internetowych ¶mieci.
52 Privoxy ma bardzo elastyczn± konfiguracjê i mo¿e byæ dopasowywane do
53 indywidualnych potrzeb i gustów. Privoxy ma aplikacjê dla systemów
54 samodzielnych i serwerów sieciowych dla wielu u¿ytkowników.
55
56 Privoxy jest oparte na Internet Junkbusterze.
57
58 %prep
59 %setup -q -c
60
61 %build
62 %{__autoheader}
63 %{__autoconf}
64 %configure --disable-dynamic-pcre
65
66 %{__make}
67
68 %install
69 rm -rf $RPM_BUILD_ROOT
70
71 install -d $RPM_BUILD_ROOT%{_sbindir} \
72          $RPM_BUILD_ROOT%{_mandir}/man1 \
73          $RPM_BUILD_ROOT/var/log/%{name} \
74          $RPM_BUILD_ROOT%{privoxyconf}/templates \
75          $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d}
76
77 install -m 744 %{name} $RPM_BUILD_ROOT%{_sbindir}/%{name}
78
79 # Using sed to "convert" from DOS format to UNIX
80 # This is important behaviour, and should not be removed without some
81 # other assurance that these files don't get packed in the the
82 # wrong format
83 for i in `ls *.action`
84 do
85        cat $i | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/$i
86 done
87 cat default.filter | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/default.filter
88 cat trust | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/trust
89 (
90 cd templates
91 for i in `ls`
92 do
93         cat $i | sed -e 's/[[:cntrl:]]*$//' > $RPM_BUILD_ROOT%{privoxyconf}/templates/$i
94 done
95 )
96
97 cp -f %{name}.1 $RPM_BUILD_ROOT%{_mandir}/man1/%{name}.1
98 cp -f %{name}.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
99 install -m 755 %{name}.init $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
100 install -m 711 -d $RPM_BUILD_ROOT/var/log/%{name}
101
102 # verify all file locations, etc. in the config file
103 # don't start with ^ or commented lines are not replaced
104 ## Changing the sed paramter delimiter to @, so we don't have to
105 ## escape the slashes
106 cat config | \
107     sed 's@^confdir.*@confdir %{privoxyconf}@g' | \
108 #    sed 's/^permissionsfile.*/permissionsfile \/etc\/%{name}\/permissionsfile/g' | \
109 #    sed 's/^filterfile.*/default.filter \/etc\/%{name}\/default.filter/g' | \
110 #    sed 's/^logfile.*/logfile \/var\/log\/%{name}\/logfile/g' | \
111 #    sed 's/^jarfile.*/jarfile \/var\/log\/%{name}\/jarfile/g' | \
112 #    sed 's/^forward.*/forward \/etc\/%{name}\/forward/g' | \
113 #    sed 's/^aclfile.*/aclfile \/etc\/%{name}\/aclfile/g' > \
114     sed 's@^logdir.*@logdir %{_localstatedir}/log/%{name}@g' | \
115     sed -e 's/[[:cntrl:]]*$//' > \
116     $RPM_BUILD_ROOT%{privoxyconf}/config
117 perl -pe 's/{-no-cookies}/{-no-cookies}\n\.redhat.com/' default.action >\
118     $RPM_BUILD_ROOT%{privoxyconf}/default.action
119
120
121 ## Macros are expanded even on commentaries. So, we have to use %%
122 ## -- morcego
123 #%%makeinstall
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %pre
129 if [ -n "`getgid %{name}`" ]; then
130         if [ "`getgid %{name}`" != "%{privoxy_gid}" ]; then
131                 echo "Error: group %{name} doesn't have gid=%{privoxy_gid}. Correct this before installing %{name}." 1>&2
132                 exit 1
133         fi
134 else
135         /usr/sbin/groupadd -g %{privoxy_gid} -r -f %{name}
136 fi
137 if [ -n "`id -u %{name} 2>/dev/null`" ]; then
138         if [ "`id -u %{name}`" != "%{privoxy_uid}" ]; then
139                 echo "Error: user %{name} doesn't have uid=%{privoxy_uid}. Correct this before installing %{name}." 1>&2
140                 exit 1
141         fi
142 else
143         /usr/sbin/useradd -u %{privoxy_uid} -r -d %{privoxyconf} -s /bin/false -c "%{name} user" -g %{name} %{name} 1>&2
144 fi
145
146 %post
147 # for upgrade from 2.0.x
148 [ -f /var/log/%{oldname}/logfile ] && {
149         mv -f /var/log/%{oldname}/logfile /var/log/%{name}/logfile ||: ;
150         chown -R %{name}:%{name} /var/log/%{name} 2>/dev/null ||: ;
151 }
152 [ -f /var/log/%{name}/%{name} ] && {
153         mv -f /var/log/%{name}/%{name} /var/log/%{name}/logfile ||: ;
154         chown -R %{name}:%{name} %{privoxyconf} 2>/dev/null ||: ;
155 }
156 /sbin/chkconfig --add privoxy
157 if [ -f /var/lock/subsys/%{name} ]; then
158         /etc/rc.d/init.d/%{name} restart
159 fi
160 #if [ "$1" = "1" ]; then
161 #       /sbin/service %{name} condrestart > /dev/null 2>&1 ||:
162 #fi
163
164 %preun
165 if [ "$1" = "0" ]; then
166         if [ -f /var/lock/subsys/%{name} ]; then
167                 /etc/rc.d/init.d/%{name} stop 1>&2
168         fi
169 #       /sbin/service %{name} stop > /dev/null 2>&1 ||:
170         /sbin/chkconfig --del privoxy
171 fi
172
173 %postun
174 if [ "$1" = "0" ]; then
175         /usr/sbin/userdel %{name} || :
176         /usr/sbin/groupdel %{name} || :
177 fi
178
179 %files
180 %defattr(644,root,root,755)
181 %doc README AUTHORS ChangeLog LICENSE
182 %doc doc/text/developer-manual.txt doc/text/user-manual.txt doc/text/faq.txt
183 %doc doc/webserver/developer-manual
184 %doc doc/webserver/user-manual
185 %doc doc/webserver/faq
186 %doc doc/webserver/p_doc.css doc/webserver/p_web.css doc/webserver/privoxy-index.html
187 %doc doc/webserver/images
188 %doc doc/webserver/man-page
189
190 %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
191 %attr(754,root,root) /etc/rc.d/init.d/%{name}
192 %attr(755,root,root) %{_sbindir}/%{name}
193 %{_mandir}/man1/%{name}.*
194
195 # ATTENTION FOR defattr change here !
196 %defattr(644,%{name},%{name},755)
197
198 %dir %{privoxyconf}
199 %dir %{privoxyconf}/templates
200 %dir /var/log/%{name}
201
202 # WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
203 # We should not use wildchars here. This could mask missing files problems
204 # -- morcego
205 # WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING ! WARNING !
206 %config(noreplace) %verify(not size mtime md5) %{privoxyconf}/config
207 %config %{privoxyconf}/standard.action
208 %config(noreplace) %verify(not size mtime md5) %{privoxyconf}/user.action
209 %config %{privoxyconf}/default.action
210 %config %{privoxyconf}/default.filter
211 %config %{privoxyconf}/trust
212
213 # Please keep these alphabetized so its easier to find one that
214 # is not included.
215 %config %{privoxyconf}/templates/blocked
216 %config %{privoxyconf}/templates/cgi-error-404
217 %config %{privoxyconf}/templates/cgi-error-bad-param
218 %config %{privoxyconf}/templates/cgi-error-disabled
219 %config %{privoxyconf}/templates/cgi-error-file
220 %config %{privoxyconf}/templates/cgi-error-file-read-only
221 %config %{privoxyconf}/templates/cgi-error-modified
222 %config %{privoxyconf}/templates/cgi-error-parse
223 %config %{privoxyconf}/templates/cgi-style.css
224 %config %{privoxyconf}/templates/connect-failed
225 %config %{privoxyconf}/templates/default
226 %config %{privoxyconf}/templates/edit-actions-add-url-form
227 %config %{privoxyconf}/templates/edit-actions-for-url
228 %config %{privoxyconf}/templates/edit-actions-for-url-filter
229 %config %{privoxyconf}/templates/edit-actions-list
230 %config %{privoxyconf}/templates/edit-actions-list-button
231 %config %{privoxyconf}/templates/edit-actions-list-section
232 %config %{privoxyconf}/templates/edit-actions-list-url
233 %config %{privoxyconf}/templates/edit-actions-remove-url-form
234 %config %{privoxyconf}/templates/edit-actions-url-form
235 %config %{privoxyconf}/templates/mod-local-help
236 %config %{privoxyconf}/templates/mod-support-and-service
237 %config %{privoxyconf}/templates/mod-title
238 %config %{privoxyconf}/templates/mod-unstable-warning
239 %config %{privoxyconf}/templates/no-such-domain
240 %config %{privoxyconf}/templates/show-request
241 %config %{privoxyconf}/templates/show-status
242 %config %{privoxyconf}/templates/show-status-file
243 %config %{privoxyconf}/templates/show-url-info
244 %config %{privoxyconf}/templates/show-version
245 %config %{privoxyconf}/templates/toggle
246 %config %{privoxyconf}/templates/toggle-mini
247 %config %{privoxyconf}/templates/untrusted
This page took 0.08089 seconds and 4 git commands to generate.