summaryrefslogtreecommitdiff
path: root/libproxy.spec.in
blob: 550a855cfbac770f2428be39b3e9330ead64d5dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
#
# spec file for package libproxy (Version 0.4.0)
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%define         build_core_not_modules 1
%if 0%{suse_version} > 1120
%define xulrunner_ver 192
%else
%if 0%{suse_version} > 1110
%define xulrunner_ver 191
%else
%if 0%{suse_version} >= 1100
%define xulrunner_ver 190
%else
%define xulrunner_ver 181
%endif
%endif
%endif
Url:            http://code.google.com/p/libproxy/
%define _name   libproxy

Name:           libproxy
Group:          System/Libraries
Summary:        Libproxy provides consistent proxy configuration to applications
Version:        @VERSION@
Release:        4
Source:         http://libproxy.googlecode.com/files/%{_name}-%{version}.tar.bz2
Source99:       baselibs.conf
License:        LGPLv2.1+
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  pkg-config
BuildRequires:  zlib-devel
%if !%build_core_not_modules
BuildRequires:  dbus-1-devel
BuildRequires:  gconf2-devel
# For directory ownership, but also because we want to rebuild the modules if
# the library changed
BuildRequires:  libproxy1
BuildRequires:  libwebkit-devel
BuildRequires:  mozilla-xulrunner%{xulrunner_ver}-devel
BuildRequires:  NetworkManager-devel
BuildRequires:  libkde4-devel
BuildRequires:  libqt4-devel
%else
BuildRequires:  python-devel
%endif

%if %suse_version <= 1110
%define python_sitelib %{py_sitedir}
%endif

%description
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios


%if %build_core_not_modules

%package tools
License:        GPLv2+ ; LGPLv2.1+
Summary:        A simple application using libproxy
Group:          System/Libraries
Requires:       libproxy1 = %{version}

%description tools
A simple application that will use libproxy to give the results you can
expect from other applications. It can be used to debug what would
happen in various cases.


%package devel
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy provides consistent proxy configuration to applications - Development Files
Group:          Development/Libraries/C and C++
Requires:       libproxy1 = %{version}

%description devel
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios


%package -n libproxy1
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy provides consistent proxy configuration to applications
Group:          System/Libraries

%description -n libproxy1
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios

%package -n libmodman0_0_0
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy's Module Management Library
Group:          System/Libraries

%description -n libmodman0_0_0
A module management library taking care of loading / unload modules
including heuristics in detecting which bindings might already
be used by an application and favouring this one.


%package -n python-libproxy
License:        GPLv2+ ; LGPLv2.1+
Summary:        Python bindings for libproxy
Group:          System/Libraries
BuildArch:      noarch
Requires:       libproxy1 = %{version}
%py_requires

%description -n python-libproxy
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios


%package -n perl-Net-Libproxy
License:        GPLv2+ ; LGPLv2.1+
Summary:        Perl bindings for libproxy
Group:          Development/Libraries/Perl
Requires:       libproxy1 = %{version}
Requires:       perl = %{perl_version}%py_requires

%description -n perl-Net-Libproxy
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios


%package -n libproxy-sharp
License:        GPLv2+ ; LGPLv2.1+
Summary:        .Net bindings for libproxy
Group:          Development/Languages/Mono
Requires:       libproxy1 = %{version}

%description -n libproxy-sharp
libproxy offers the following features: * extremely small core
   footprint (< 35K)

* no external dependencies within libproxy core (libproxy modules
   may have dependencies)

* only 3 functions in the stable external API

* dynamic adjustment to changing network topology

* a standard way of dealing with proxy settings across all scenarios


%else

%package -n libproxy1-config-gnome
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy module for GNOME configuration
Group:          System/Libraries
Requires:       libproxy1 = %{version}
Recommends:     libproxy1-pacrunner = %{version}
Recommends:     libproxy1-wpad-dns = %{version}
Supplements:    packageand(libproxy1:gconf2)
Provides:       libproxy-gnome = %{version}
Obsoletes:      libproxy-gnome < %{version}

%description -n libproxy1-config-gnome
A module to extend libproxy with capabilities to query GNOME about
proxy settings.


%package -n libproxy1-config-kde4
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy module for KDE configuration
Group:          System/Libraries
Requires:       libproxy1 = %{version}
Recommends:     libproxy1-pacrunner = %{version}
Recommends:     libproxy1-wpad-dns = %{version}
Supplements:    packageand(libproxy1:libkde4)
Provides:       libproxy-kde = %{version}
Obsoletes:      libproxy-kde < %{version}

%description -n libproxy1-config-kde4
A module to extend libproxy with capabilities to query KDE4 about proxy
settings.


%package -n libproxy1-pacrunner-mozjs
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy module to support wpad/pac parsing via Mozilla JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
Supplements:    packageand(libproxy1:mozilla-xulrunner%{xulrunner_ver})
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}

%description -n libproxy1-pacrunner-mozjs
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.


%package -n libproxy1-pacrunner-webkit
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy module to support WPAD/PAC parsing via WebKit JavaScript Engine
Group:          System/Libraries
Requires:       libproxy1 = %{version}
Supplements:    packageand(libproxy1:libwebkit-1)
# A virtual symbol to identify that this is a pacrunner.
Provides:       libproxy1-pacrunner = %{version}

%description -n libproxy1-pacrunner-webkit
A module to extend libproxy with capabilities to pass addresses to a
WPAD/PAC script and have it find the correct proxy.


%package -n libproxy1-networkmanager
License:        GPLv2+ ; LGPLv2.1+
Summary:        Libproxy module for NetworkManager configuration
Group:          System/Libraries
Requires:       libproxy1 = %{version}
Supplements:    packageand(libproxy1:NetworkManager)

%description -n libproxy1-networkmanager
A module to extend libproxy with capabilities to query NetworkManager
about network configuration changes.

%endif

%prep
%setup -q -n %{_name}-%{version}
mkdir build

%build
cd build
cmake \
  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
  -Dlibdir=%{_libdir} \
  -Dlibexecdir=%{_libexecdir}/libproxy \
  -Ddatadir=%{_datadir} \
  -Dmoduledir=%{_libdir}/libproxy/%{version}/modules \
  -DWITH_VALA=yes \
  -DPERL_VENDORINSTALL=yes \
..
%{__make} %{?jobs:-j%jobs} VERBOSE=1

%install
cd build
%makeinstall
%if %build_core_not_modules
# Build the basic directory structure for the modules so we can
# own the directories in the main library package
install -d %{buildroot}%{_libexecdir}/libproxy
install -d %{buildroot}%{_libdir}/%{name}/%{version}/modules
%else
# remove files that are part of the core
rm %{buildroot}%{_includedir}/*.h
# Delete all files that exist in the base libproxy package
rm %{buildroot}%{_bindir}/proxy
rm %{buildroot}%{_libdir}/libproxy.so*
rm %{buildroot}%{_libdir}/libmodman.so*
rm %{buildroot}%{python_sitelib}/*.py
rm %{buildroot}%{_libdir}/pkgconfig/libproxy-1.0.pc
rm %{buildroot}%{_datadir}/cmake/Modules/Findlibproxy.cmake
rm %{buildroot}%{_datadir}/vala/vapi/libproxy-1.0.vapi
rm %{buildroot}%{perl_vendorarch}/Net/Libproxy.pm
rm %{buildroot}%{perl_vendorarch}/auto/Net/Libproxy/Libproxy.so
%endif
%if %build_core_not_modules

%post -n libproxy1 -p /sbin/ldconfig

%post -n libmodman0_0_0 -p /sbin/ldconfig

%postun -n libproxy1 -p /sbin/ldconfig

%postun -n libmodman0_0_0 -p /sbin/ldconfig

%files tools
%defattr(-, root, root)
%{_bindir}/proxy

%files -n libproxy1
%defattr(-, root, root)
%{_libdir}/libproxy.so.*
%dir %{_libexecdir}/libproxy
%dir %{_libdir}/libproxy
%dir %{_libdir}/libproxy/%{version}
%dir %{_libdir}/libproxy/%{version}/modules
#%{_libdir}/libproxy/%{version}/modules/config_envvar.so
#%{_libdir}/libproxy/%{version}/modules/config_file.so
#%{_libdir}/libproxy/%{version}/modules/config_direct.so
#%{_libdir}/libproxy/%{version}/modules/ignore_*.so

%files -n libmodman0_0_0
%defattr(-, root, root)
%{_libdir}/libmodman.so.*

%files devel
%defattr(-, root, root)
%{_includedir}/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/libproxy-1.0.pc
%{_datadir}/cmake/Modules/Findlibproxy.cmake
%dir %{_datadir}/vala
%dir %{_datadir}/vala/vapi
%{_datadir}/vala/vapi/libproxy-1.0.vapi

%files -n python-libproxy
%defattr(-, root, root)
%{python_sitelib}/*.py

%files -n perl-Net-Libproxy
%defattr(-,root,root)
%dir %{perl_vendorarch}/Net
%dir %{perl_vendorarch}/auto/Net
%dir %{perl_vendorarch}/auto/Net/Libproxy
%{perl_vendorarch}/Net/Libproxy.pm
%{perl_vendorarch}/auto/Net/Libproxy/Libproxy.so
%else

%files -n libproxy1-config-kde4
%defattr(-, root, root)
%{_libdir}/libproxy/%{version}/modules/config_kde4.so

%files -n libproxy1-config-gnome
%defattr(-, root, root)
%{_libdir}/libproxy/%{version}/modules/config_gnome.so
%{_libexecdir}/libproxy/pxgconf

%files -n libproxy1-networkmanager
%defattr(-, root, root)
%{_libdir}/libproxy/%{version}/modules/network_networkmanager.so

%files -n libproxy1-pacrunner-webkit
%defattr(-, root, root)
%{_libdir}/libproxy/%{version}/modules/pacrunner_webkit.so

%files -n libproxy1-pacrunner-mozjs
%defattr(-, root, root)
%{_libdir}/libproxy/%{version}/modules/pacrunner_mozjs.so
%endif

%changelog