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