/[packages]/cauldron/privoxy/current/SPECS/privoxy.spec
ViewVC logotype

Contents of /cauldron/privoxy/current/SPECS/privoxy.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2002236 - (show annotations) (download)
Sat Oct 28 05:32:00 2023 UTC (6 months, 4 weeks ago) by daviddavid
File size: 4483 byte(s)
- add debian patches to switch to pcre2

1 %define privoxyconf %{_sysconfdir}/%{name}
2
3 %define reltype stable
4
5 Summary: Privacy enhancing HTTP proxy
6 Name: privoxy
7 Version: 3.0.34
8 Release: %mkrel 2
9 License: GPLv2+
10 Group: Networking/Other
11 URL: https://www.privoxy.org/
12 Source0: https://sourceforge.net/projects/ijbswa/files/Sources/%{version}%20%28stable%29/%{name}-%{version}-%{reltype}-src.tar.gz
13 Source1: https://sourceforge.net/projects/ijbswa/files/Sources/%{version}%20%28stable%29/%{name}-%{version}-%{reltype}-src.tar.gz.asc
14 Source2: privoxy.logrotate
15 Source4: %{name}.service
16 Patch0: privoxy-3.0.21-mga-mdv-missing-user.filter.patch
17 # (cjw) add a "address-family-preference" option that allows disabling IPv6 DNS lookups,
18 # forcing outgoing HTTP requests to be IPv4
19 Patch1: privoxy-3.0.29-mga-address-family-preference.patch
20 # (cjw) from debian: don't translate documentation to locale-dependent 8-bit ascii
21 Patch2: privoxy-3.0.21-mga-deb-8bit_manual.patch
22 # (cjw) documentation and default configuration changes and cleanups for mageia
23 Patch3: privoxy-3.0.21-mga-mageia-specific-config.patch
24 # from debian:
25 Patch10: privoxy-pcre2-support.patch
26 Patch11: privoxy-pcre2-patternfix.patch
27 Requires(post): rpm-helper
28 Requires(preun): rpm-helper
29 Provides: junkbuster = %{version}-%{release}
30 Provides: webproxy
31 BuildRequires: man
32 BuildRequires: pkgconfig(libpcre2-8)
33 BuildRequires: pkgconfig(zlib)
34 # for manual
35 BuildRequires: openjade
36 BuildRequires: docbook-dtds
37 BuildRequires: docbook-style-dsssl
38 BuildRequires: w3m
39
40 %description
41 Privoxy is a web proxy with advanced filtering capabilities for protecting
42 privacy, filtering web page content, managing cookies, controlling access, and
43 removing ads, banners, pop-ups and other obnoxious Internet Junk. Privoxy has a
44 very flexible configuration and can be customized to suit individual needs and
45 tastes. Privoxy has application for both stand-alone systems and multi-user
46 networks.
47
48 Privoxy was previously called Internet Junkbuster.
49
50 To configure privoxy, go to http://config.privoxy.org/
51
52 Privoxy proxy is running on port 8118
53
54 %prep
55
56 %setup -n %{name}-%{version}-%{reltype} -q
57
58 %autopatch -p1
59
60 %build
61 #needed for build
62 autoreconf -fi
63
64 %serverbuild
65 %configure --with-user=daemon --with-group=daemon
66 %make_build
67 make dok
68 make config-file
69
70 #remove backup files
71 rm -f doc/webserver/user-manual/*.bak
72
73 %install
74 mkdir -p %{buildroot}%{_sbindir} \
75 %{buildroot}%{_mandir}/man8 \
76 %{buildroot}/var/log/privoxy \
77 %{buildroot}%{privoxyconf}/templates \
78 %{buildroot}%{_sysconfdir}/logrotate.d
79
80 install -m 755 privoxy %{buildroot}%{_sbindir}/privoxy
81 install -m 644 privoxy.8 %{buildroot}%{_mandir}/man8/privoxy.8
82
83 # Install various config files
84 for i in *.action default.filter trust; do
85 install -m 644 $i %{buildroot}%{privoxyconf}/
86 done
87 for i in templates/*; do
88 install -m 644 $i %{buildroot}%{privoxyconf}/templates/
89 done
90 install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
91 install -d -m 755 %{buildroot}%{_unitdir}
92 install -m 644 %{SOURCE4} %{buildroot}%{_unitdir}/%{name}.service
93
94 # verify all file locations, etc. in the config file
95 # don't start with ^ or commented lines are not replaced
96 sed -e 's!^confdir.*!confdir /etc/privoxy!g' \
97 -e 's!^logdir.*!logdir /var/log/privoxy!g' \
98 < config > %{buildroot}%{privoxyconf}/config
99
100 # create compatibility symlink
101 ln -s match-all.action %{buildroot}/%{privoxyconf}/standard.action
102
103 %triggerin -- msec < 0.17
104 for i in 0 1 2 3 4 5; do
105 permfile="%{_sysconfdir}/security/msec/perm.$i"
106 if grep -q '^/var/log/privoxy' $permfile; then
107 perl -pi -e 's|^/var/log/privoxy\s.*|/var/log/prixovy\t\t\t\tdaemon.daemon\t700|' $permfile
108 else
109 echo -e "/var/log/prixovy\t\t\t\tdaemon.daemon\t700" >> $permfile
110 fi
111 done
112
113
114 %post
115 %_post_service privoxy
116
117 %preun
118 %_preun_service privoxy
119
120 %files
121 %doc AUTHORS ChangeLog README
122 %doc doc/webserver
123 %attr (0700,daemon,daemon) /var/log/privoxy
124 %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
125 %{_sbindir}/*
126 %{_mandir}/man8/*
127
128 %defattr(664,daemon,daemon,755)
129 %dir %{privoxyconf}
130 %config(noreplace) %{privoxyconf}/config
131 %config %{privoxyconf}/default.action
132 %config(noreplace) %{privoxyconf}/default.filter
133 %config(noreplace) %{privoxyconf}/templates
134 %config(noreplace) %{privoxyconf}/match-all.action
135 %config(noreplace) %{privoxyconf}/trust
136 %config(noreplace) %{privoxyconf}/user.action
137 %config(noreplace) %{privoxyconf}/regression-tests.action
138 %{privoxyconf}/standard.action
139 %{_unitdir}/%{name}.service

  ViewVC Help
Powered by ViewVC 1.1.30