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