]>
Commit | Line | Data |
---|---|---|
9847b4be JB |
1 | # TODO: |
2 | # - natus-based pacrunner (doesn't build with natus 0.2.1) | |
3 | # - ruby binding (not finished as of 0.4.8 - no buildsystem) | |
705e407b JB |
4 | # |
5 | # Conditional build: | |
8b18a49d | 6 | %bcond_without kde # KDE 4/5 config plugin |
9847b4be JB |
7 | %bcond_without mozjs # MozJS pacrunner plugin |
8 | %bcond_with natus # Natus pacrunner plugin [doesn't build with natus 0.2.1] | |
9 | %bcond_without webkit # WebKit pacrunner plugin | |
a05585b3 | 10 | %bcond_without mono # Mono C# bindings |
aead9310 | 11 | |
4de305e6 JR |
12 | %ifarch x32 |
13 | %undefine with_mono | |
14 | %endif | |
128597ac JB |
15 | %include /usr/lib/rpm/macros.perl |
16 | %include /usr/lib/rpm/macros.mono | |
86d2d1bd MB |
17 | Summary: Library for automatic proxy configuration management |
18 | Summary(pl.UTF-8): Biblioteka do automatycznego zarządzania konfiguracją proxy | |
19 | Name: libproxy | |
7ec29927 | 20 | Version: 0.4.13 |
60fc4201 | 21 | Release: 4 |
128597ac | 22 | License: LGPL v2.1+ |
86d2d1bd | 23 | Group: Libraries |
8b18a49d JB |
24 | #Source0Download: https://github.com/libproxy/libproxy/releases |
25 | Source0: https://github.com/libproxy/libproxy/archive/%{version}/%{name}-%{version}.tar.gz | |
7ec29927 | 26 | # Source0-md5: de293bb311f185a2ffa3492700a694c2 |
128597ac | 27 | Patch0: %{name}-pac-modules.patch |
9847b4be | 28 | Patch1: %{name}-mozjs.patch |
8b18a49d | 29 | URL: https://libproxy.github.io/libproxy/ |
86d2d1bd | 30 | BuildRequires: NetworkManager-devel |
128597ac | 31 | BuildRequires: cmake >= 2.6 |
f39b9aec | 32 | BuildRequires: glib2-devel >= 1:2.26 |
7ec29927 | 33 | %{?with_webkit:BuildRequires: gtk-webkit4-devel >= 2.6} |
a05585b3 | 34 | %{?with_mozjs:BuildRequires: js187-devel} |
f39b9aec | 35 | BuildRequires: libmodman-devel >= 2 |
128597ac | 36 | BuildRequires: libstdc++-devel |
a05585b3 | 37 | %{?with_mono:BuildRequires: mono-csharp} |
128597ac | 38 | BuildRequires: perl-devel >= 1:5.8.0 |
86d2d1bd MB |
39 | BuildRequires: pkgconfig |
40 | BuildRequires: python-devel >= 1:2.5 | |
24445d20 | 41 | BuildRequires: python-modules |
128597ac | 42 | BuildRequires: rpm-perlprov >= 4.1-13 |
24445d20 | 43 | BuildRequires: rpm-pythonprov |
128597ac JB |
44 | BuildRequires: rpmbuild(macros) >= 1.268 |
45 | BuildRequires: rpmbuild(monoautodeps) | |
9847b4be | 46 | BuildRequires: sed >= 4.0 |
7333df52 | 47 | BuildRequires: xorg-lib-libX11-devel |
86d2d1bd | 48 | BuildRequires: xorg-lib-libXmu-devel |
86d2d1bd MB |
49 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
50 | ||
51 | %description | |
52 | Library for automatic proxy configuration management. | |
53 | ||
54 | %description -l pl.UTF-8 | |
55 | Biblioteka do automatycznego zarządzania konfiguracją proxy. | |
56 | ||
57 | %package devel | |
58 | Summary: Header files for libproxy library | |
59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libproxy | |
60 | Group: Development/Libraries | |
61 | Requires: %{name} = %{version}-%{release} | |
128597ac JB |
62 | Requires: libstdc++-devel |
63 | Obsoletes: libproxy-static | |
86d2d1bd MB |
64 | |
65 | %description devel | |
66 | Header files for libproxy library. | |
67 | ||
68 | %description devel -l pl.UTF-8 | |
69 | Pliki nagłówkowe biblioteki libproxy. | |
70 | ||
128597ac JB |
71 | %package -n dotnet-libproxy-sharp |
72 | Summary: Libproxy# - libproxy .NET bindings | |
73 | Summary(pl.UTF-8): Libproxy# - wiązania libproxy dla .NET | |
74 | Group: Libraries | |
75 | Requires: %{name} = %{version}-%{release} | |
76 | ||
77 | %description -n dotnet-libproxy-sharp | |
78 | Libproxy# - libproxy .NET bindings. | |
79 | ||
80 | %description -n dotnet-libproxy-sharp -l pl.UTF-8 | |
81 | Libproxy# - wiązania libproxy dla .NET. | |
82 | ||
83 | %package -n dotnet-libproxy-sharp-devel | |
84 | Summary: libproxy .NET bindings - development files | |
85 | Summary(pl.UTF-8): Wiązania libproxy dla .NET - pliki programistyczne | |
86d2d1bd | 86 | Group: Development/Libraries |
128597ac | 87 | Requires: dotnet-libproxy-sharp = %{version}-%{release} |
86d2d1bd | 88 | |
128597ac JB |
89 | %description -n dotnet-libproxy-sharp-devel |
90 | Development files for libproxy .NET bindings. | |
86d2d1bd | 91 | |
128597ac JB |
92 | %description -n dotnet-libproxy-sharp-devel -l pl.UTF-8 |
93 | Pliki programistyczne wiązań libproxy dla .NET. | |
94 | ||
95 | %package -n perl-Net-Libproxy | |
96 | Summary: libproxy Perl bindings | |
97 | Summary(pl.UTF-8): Wiązania libproxy dla Perla | |
98 | Group: Development/Languages/Perl | |
99 | Requires: %{name} = %{version}-%{release} | |
100 | ||
101 | %description -n perl-Net-Libproxy | |
102 | libproxy Perl bindings. | |
103 | ||
104 | %description -n perl-Net-Libproxy -l pl.UTF-8 | |
105 | Wiązania libproxy dla Perla. | |
86d2d1bd MB |
106 | |
107 | %package -n python-libproxy | |
108 | Summary: libproxy Python bindings | |
109 | Summary(pl.UTF-8): Wiązania libproxy dla Pythona | |
110 | Group: Libraries/Python | |
111 | # uses libproxy shared library | |
112 | Requires: %{name} = %{version}-%{release} | |
113 | ||
114 | %description -n python-libproxy | |
115 | libproxy Python bindings. | |
116 | ||
117 | %description -n python-libproxy -l pl.UTF-8 | |
118 | Wiązania libproxy dla Pythona. | |
119 | ||
128597ac JB |
120 | %package -n vala-libproxy |
121 | Summary: Vala bindings for libproxy API | |
122 | Summary(pl.UTF-8): Wiązania API libproxy dla języka Vala | |
123 | Group: Development/Languages | |
124 | Requires: %{name}-devel = %{version}-%{release} | |
aead9310 ER |
125 | %if "%{_rpmversion}" >= "5" |
126 | BuildArch: noarch | |
127 | %endif | |
128597ac JB |
128 | |
129 | %description -n vala-libproxy | |
130 | Vala bindings for libproxy API. | |
131 | ||
132 | %description -n vala-libproxy -l pl.UTF-8 | |
133 | Wiązania API libproxy dla języka Vala. | |
134 | ||
705e407b JB |
135 | %package networkmanager |
136 | Summary: NetworkManager plugin for libproxy | |
137 | Summary(pl.UTF-8): Wtyczka NetworkManager dla libproxy | |
138 | Group: Libraries | |
139 | Requires: %{name} = %{version}-%{release} | |
140 | ||
141 | %description networkmanager | |
142 | NetworkManager configuration plugin for libproxy. | |
143 | ||
144 | %description networkmanager -l pl.UTF-8 | |
145 | Wtyczka konfiguracji NetworkManager dla libproxy. | |
146 | ||
d264af18 | 147 | %package gnome |
7333df52 JB |
148 | Summary: GNOME plugin for libproxy |
149 | Summary(pl.UTF-8): Wtyczka GNOME dla libproxy | |
d264af18 KK |
150 | Group: Libraries |
151 | Requires: %{name} = %{version}-%{release} | |
f39b9aec | 152 | Requires: glib2 >= 1:2.26 |
d264af18 KK |
153 | |
154 | %description gnome | |
7333df52 | 155 | GNOME (GConf) configuration plugin for libproxy. |
d264af18 | 156 | |
7333df52 JB |
157 | %description gnome -l pl.UTF-8 |
158 | Wtyczka konfiguracji GNOME (GConf) dla libproxy. | |
d264af18 KK |
159 | |
160 | %package kde | |
7333df52 JB |
161 | Summary: KDE plugin for libproxy |
162 | Summary(pl.UTF-8): Wtyczka KDE dla libproxy | |
d264af18 KK |
163 | Group: Libraries |
164 | Requires: %{name} = %{version}-%{release} | |
7ec29927 | 165 | #Requires: kreadconfig (KDE4) or kreadconfig5 (KF5) |
d264af18 KK |
166 | |
167 | %description kde | |
7333df52 | 168 | KDE configuration plugin for libproxy. |
d264af18 | 169 | |
7333df52 JB |
170 | %description kde -l pl.UTF-8 |
171 | Wtyczka konfiguracji KDE dla libproxy | |
d264af18 KK |
172 | |
173 | %package mozjs | |
7333df52 JB |
174 | Summary: MozJS plugin for libproxy |
175 | Summary(pl.UTF-8): Wtyczka MozJS dla libproxy | |
d264af18 | 176 | Group: Libraries |
7333df52 | 177 | Requires: %{name} = %{version}-%{release} |
d264af18 KK |
178 | |
179 | %description mozjs | |
7333df52 | 180 | MozJS (XULrunner/JavaScript) configuration plugin for libproxy. |
d264af18 | 181 | |
7333df52 JB |
182 | %description mozjs -l pl.UTF-8 |
183 | Wtyczka konfiguracji MozJS (XULrunner/JavaScript) dla libproxy. | |
d264af18 KK |
184 | |
185 | %package webkit | |
7333df52 JB |
186 | Summary: WebKit plugin for libproxy |
187 | Summary(pl.UTF-8): Wtyczka WebKit dla libproxy | |
d264af18 | 188 | Group: Libraries |
7333df52 | 189 | Requires: %{name} = %{version}-%{release} |
7ec29927 | 190 | Requires: gtk-webkit4 >= 2.6 |
d264af18 KK |
191 | |
192 | %description webkit | |
7333df52 | 193 | WebKit (JavaScriptCore) configuration plugin for libproxy. |
d264af18 | 194 | |
7333df52 JB |
195 | %description webkit -l pl.UTF-8 |
196 | Wtyczka konfigracji WebKit (JavaScriptCore) dla libproxy. | |
d264af18 | 197 | |
86d2d1bd MB |
198 | %prep |
199 | %setup -q | |
200 | %patch0 -p1 | |
9847b4be JB |
201 | %patch1 -p1 |
202 | ||
203 | %if %{without natus} | |
204 | echo 'set(NATUS_FOUND 0)' > libproxy/cmake/modules/pacrunner_natus.cmk | |
205 | %endif | |
86d2d1bd MB |
206 | |
207 | %build | |
128597ac JB |
208 | install -d build |
209 | cd build | |
210 | %cmake .. \ | |
128597ac JB |
211 | -DLIB_INSTALL_DIR=%{_libdir} \ |
212 | -DLIBEXEC_INSTALL_DIR=%{_libdir}/libproxy \ | |
f39b9aec | 213 | -DFORCE_SYSTEM_LIBMODMAN=ON \ |
128597ac | 214 | -DPERL_VENDORINSTALL=ON \ |
4f726d67 | 215 | -DPYTHON_SITEPKG_DIR=%{py_sitescriptdir} \ |
8b18a49d | 216 | %{?with_mono:-DWITH_DOTNET=ON -DGMCS_EXECUTABLE=/usr/bin/mcs} \ |
7ec29927 | 217 | %{!?with_kde:-DWITH_KDE=OFF} \ |
9847b4be | 218 | %{!?with_mozjs:-DWITH_MOZJS=OFF} \ |
128597ac | 219 | -DWITH_VALA=ON \ |
f39b9aec JB |
220 | %{!?with_webkit:-DWITH_WEBKIT=OFF} \ |
221 | %{?with_webkit:-DWITH_WEBKIT3=ON} | |
128597ac | 222 | |
86d2d1bd MB |
223 | %{__make} |
224 | ||
225 | %install | |
226 | rm -rf $RPM_BUILD_ROOT | |
227 | ||
128597ac | 228 | %{__make} -C build install \ |
86d2d1bd MB |
229 | DESTDIR=$RPM_BUILD_ROOT |
230 | ||
231 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
232 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
233 | %py_postclean | |
234 | ||
235 | %clean | |
236 | rm -rf $RPM_BUILD_ROOT | |
237 | ||
238 | %post -p /sbin/ldconfig | |
239 | %postun -p /sbin/ldconfig | |
240 | ||
241 | %files | |
242 | %defattr(644,root,root,755) | |
128597ac | 243 | %doc AUTHORS ChangeLog NEWS README |
86d2d1bd MB |
244 | %attr(755,root,root) %{_bindir}/proxy |
245 | %attr(755,root,root) %{_libdir}/libproxy.so.*.*.* | |
128597ac | 246 | %attr(755,root,root) %ghost %{_libdir}/libproxy.so.1 |
86d2d1bd MB |
247 | %dir %{_libdir}/%{name} |
248 | %dir %{_libdir}/%{name}/%{version} | |
128597ac | 249 | %dir %{_libdir}/%{name}/%{version}/modules |
86d2d1bd MB |
250 | |
251 | %files devel | |
252 | %defattr(644,root,root,755) | |
253 | %attr(755,root,root) %{_libdir}/libproxy.so | |
705e407b | 254 | %{_includedir}/proxy.h |
86d2d1bd | 255 | %{_pkgconfigdir}/libproxy-1.0.pc |
128597ac JB |
256 | %{_datadir}/cmake/Modules/Findlibproxy.cmake |
257 | ||
a05585b3 | 258 | %if %{with mono} |
128597ac JB |
259 | %files -n dotnet-libproxy-sharp |
260 | %defattr(644,root,root,755) | |
261 | %{_prefix}/lib/mono/gac/libproxy-sharp | |
86d2d1bd | 262 | |
128597ac | 263 | %files -n dotnet-libproxy-sharp-devel |
86d2d1bd | 264 | %defattr(644,root,root,755) |
128597ac JB |
265 | %{_prefix}/lib/mono/libproxy-sharp |
266 | %{_pkgconfigdir}/libproxy-sharp-1.0.pc | |
a05585b3 | 267 | %endif |
128597ac JB |
268 | |
269 | %files -n perl-Net-Libproxy | |
270 | %defattr(644,root,root,755) | |
271 | %{perl_vendorarch}/Net/Libproxy.pm | |
272 | %dir %{perl_vendorarch}/auto/Net/Libproxy | |
273 | %attr(755,root,root) %{perl_vendorarch}/auto/Net/Libproxy/Libproxy.so | |
86d2d1bd MB |
274 | |
275 | %files -n python-libproxy | |
276 | %defattr(644,root,root,755) | |
705e407b JB |
277 | %{py_sitescriptdir}/libproxy.py[co] |
278 | ||
128597ac JB |
279 | %files -n vala-libproxy |
280 | %defattr(644,root,root,755) | |
281 | %{_datadir}/vala/vapi/libproxy-1.0.vapi | |
282 | ||
705e407b JB |
283 | %files networkmanager |
284 | %defattr(644,root,root,755) | |
128597ac | 285 | %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/network_networkmanager.so |
d264af18 KK |
286 | |
287 | %files gnome | |
24445d20 | 288 | %defattr(644,root,root,755) |
f39b9aec | 289 | %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/config_gnome3.so |
f7a0d1cc | 290 | %attr(755,root,root) %{_libdir}/%{name}/pxgsettings |
d264af18 | 291 | |
128597ac | 292 | %if %{with kde} |
d264af18 | 293 | %files kde |
24445d20 | 294 | %defattr(644,root,root,755) |
8b18a49d | 295 | %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/config_kde.so |
128597ac | 296 | %endif |
d264af18 | 297 | |
9847b4be | 298 | %if %{with mozjs} |
d264af18 | 299 | %files mozjs |
24445d20 | 300 | %defattr(644,root,root,755) |
128597ac | 301 | %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/pacrunner_mozjs.so |
aa7b5c69 | 302 | %endif |
d264af18 | 303 | |
705e407b | 304 | %if %{with webkit} |
d264af18 | 305 | %files webkit |
24445d20 | 306 | %defattr(644,root,root,755) |
128597ac | 307 | %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so |
705e407b | 308 | %endif |