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