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