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