]> git.pld-linux.org Git - packages/libproxy.git/blob - libproxy.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/libproxy.git] / libproxy.spec
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 Summary:        Library for automatic proxy configuration management
16 Summary(pl.UTF-8):      Biblioteka do automatycznego zarządzania konfiguracją proxy
17 Name:           libproxy
18 Version:        0.4.15
19 Release:        6
20 License:        LGPL v2.1+
21 Group:          Libraries
22 #Source0Download: https://github.com/libproxy/libproxy/releases
23 Source0:        https://github.com/libproxy/libproxy/archive/%{version}/%{name}-%{version}.tar.gz
24 # Source0-md5:  21ebe5b4ea2a04f5f468bf5d08c40d2c
25 Patch0:         %{name}-pac-modules.patch
26 URL:            https://libproxy.github.io/libproxy/
27 BuildRequires:  NetworkManager-devel
28 BuildRequires:  cmake >= 2.6
29 BuildRequires:  glib2-devel >= 1:2.26
30 %{?with_webkit:BuildRequires:   gtk-webkit4-devel >= 2.6}
31 %{?with_mozjs:BuildRequires:    mozjs38-devel}
32 BuildRequires:  libmodman-devel >= 2
33 BuildRequires:  libstdc++-devel >= 6:4.7
34 %{?with_mono:BuildRequires:     mono-csharp}
35 BuildRequires:  perl-devel >= 1:5.8.0
36 BuildRequires:  pkgconfig
37 BuildRequires:  python-devel >= 1:2.5
38 BuildRequires:  python-modules >= 1:2.5
39 BuildRequires:  python3-devel >= 1:3.2
40 BuildRequires:  python3-modules >= 1:3.2
41 BuildRequires:  rpm-perlprov >= 4.1-13
42 BuildRequires:  rpm-pythonprov
43 BuildRequires:  rpmbuild(macros) >= 1.714
44 BuildRequires:  rpmbuild(monoautodeps)
45 BuildRequires:  sed >= 4.0
46 BuildRequires:  xorg-lib-libX11-devel
47 BuildRequires:  xorg-lib-libXmu-devel
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}
61 Requires:       libstdc++-devel
62 Obsoletes:      libproxy-static
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
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
85 Group:          Development/Libraries
86 Requires:       dotnet-libproxy-sharp = %{version}-%{release}
87
88 %description -n dotnet-libproxy-sharp-devel
89 Development files for libproxy .NET bindings.
90
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.
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}
112 Requires:       python-libs >= 1:2.5
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
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}
126 Requires:       python3-libs >= 1:3.2
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
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}
139 %if "%{_rpmversion}" >= "5"
140 BuildArch:      noarch
141 %endif
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
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
161 %package gnome
162 Summary:        GNOME plugin for libproxy
163 Summary(pl.UTF-8):      Wtyczka GNOME dla libproxy
164 Group:          Libraries
165 Requires:       %{name} = %{version}-%{release}
166 Requires:       glib2 >= 1:2.26
167
168 %description gnome
169 GNOME (GConf) configuration plugin for libproxy.
170
171 %description gnome -l pl.UTF-8
172 Wtyczka konfiguracji GNOME (GConf) dla libproxy.
173
174 %package kde
175 Summary:        KDE plugin for libproxy
176 Summary(pl.UTF-8):      Wtyczka KDE dla libproxy
177 Group:          Libraries
178 Requires:       %{name} = %{version}-%{release}
179 #Requires:      kreadconfig (KDE4) or kreadconfig5 (KF5)
180
181 %description kde
182 KDE configuration plugin for libproxy.
183
184 %description kde -l pl.UTF-8
185 Wtyczka konfiguracji KDE dla libproxy
186
187 %package mozjs
188 Summary:        MozJS plugin for libproxy
189 Summary(pl.UTF-8):      Wtyczka MozJS dla libproxy
190 Group:          Libraries
191 Requires:       %{name} = %{version}-%{release}
192
193 %description mozjs
194 MozJS (XULrunner/JavaScript) configuration plugin for libproxy.
195
196 %description mozjs -l pl.UTF-8
197 Wtyczka konfiguracji MozJS (XULrunner/JavaScript) dla libproxy.
198
199 %package webkit
200 Summary:        WebKit plugin for libproxy
201 Summary(pl.UTF-8):      Wtyczka WebKit dla libproxy
202 Group:          Libraries
203 Requires:       %{name} = %{version}-%{release}
204 Requires:       gtk-webkit4 >= 2.6
205
206 %description webkit
207 WebKit (JavaScriptCore) configuration plugin for libproxy.
208
209 %description webkit -l pl.UTF-8
210 Wtyczka konfigracji WebKit (JavaScriptCore) dla libproxy.
211
212 %prep
213 %setup -q
214 %patch0 -p1
215
216 %if %{without natus}
217 echo 'set(NATUS_FOUND 0)' > libproxy/cmake/modules/pacrunner_natus.cmk
218 %endif
219
220 %build
221 install -d build
222 cd build
223 CXXFLAGS="%{rpmcxxflags} -std=c++11"
224 %cmake .. \
225         -DLIB_INSTALL_DIR=%{_libdir} \
226         -DLIBEXEC_INSTALL_DIR=%{_libdir}/libproxy \
227         -DFORCE_SYSTEM_LIBMODMAN=ON \
228         -DPERL_VENDORINSTALL=ON \
229         -DPYTHON2_SITEPKG_DIR=%{py_sitescriptdir} \
230         -DPYTHON3_SITEPKG_DIR=%{py3_sitescriptdir} \
231         %{?with_mono:-DWITH_DOTNET=ON -DGMCS_EXECUTABLE=/usr/bin/mcs} \
232         %{!?with_kde:-DWITH_KDE=OFF} \
233         %{!?with_mozjs:-DWITH_MOZJS=OFF} \
234         -DWITH_VALA=ON \
235         %{!?with_webkit:-DWITH_WEBKIT=OFF} \
236         %{?with_webkit:-DWITH_WEBKIT3=ON}
237
238 %{__make}
239
240 %install
241 rm -rf $RPM_BUILD_ROOT
242
243 %{__make} -C build install \
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
250 %py3_comp $RPM_BUILD_ROOT%{py3_sitescriptdir}
251 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitescriptdir}
252
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)
261 %doc AUTHORS ChangeLog NEWS README
262 %attr(755,root,root) %{_bindir}/proxy
263 %attr(755,root,root) %{_libdir}/libproxy.so.*.*.*
264 %attr(755,root,root) %ghost %{_libdir}/libproxy.so.1
265 %dir %{_libdir}/%{name}
266 %dir %{_libdir}/%{name}/%{version}
267 %dir %{_libdir}/%{name}/%{version}/modules
268
269 %files devel
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{_libdir}/libproxy.so
272 %{_includedir}/proxy.h
273 %{_pkgconfigdir}/libproxy-1.0.pc
274 %{_datadir}/cmake/Modules/Findlibproxy.cmake
275
276 %if %{with mono}
277 %files -n dotnet-libproxy-sharp
278 %defattr(644,root,root,755)
279 %{_prefix}/lib/mono/gac/libproxy-sharp
280
281 %files -n dotnet-libproxy-sharp-devel
282 %defattr(644,root,root,755)
283 %{_prefix}/lib/mono/libproxy-sharp
284 %{_pkgconfigdir}/libproxy-sharp-1.0.pc
285 %endif
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
292
293 %files -n python-libproxy
294 %defattr(644,root,root,755)
295 %{py_sitescriptdir}/libproxy.py[co]
296
297 %files -n python3-libproxy
298 %defattr(644,root,root,755)
299 %{py3_sitescriptdir}/libproxy.py
300 %{py3_sitescriptdir}/__pycache__/libproxy.cpython-*.py[co]
301
302 %files -n vala-libproxy
303 %defattr(644,root,root,755)
304 %{_datadir}/vala/vapi/libproxy-1.0.vapi
305
306 %files networkmanager
307 %defattr(644,root,root,755)
308 %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/network_networkmanager.so
309
310 %files gnome
311 %defattr(644,root,root,755)
312 %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/config_gnome3.so
313 %attr(755,root,root) %{_libdir}/%{name}/pxgsettings
314
315 %if %{with kde}
316 %files kde
317 %defattr(644,root,root,755)
318 %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/config_kde.so
319 %endif
320
321 %if %{with mozjs}
322 %files mozjs
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/pacrunner_mozjs.so
325 %endif
326
327 %if %{with webkit}
328 %files webkit
329 %defattr(644,root,root,755)
330 %attr(755,root,root) %{_libdir}/%{name}/%{version}/modules/pacrunner_webkit.so
331 %endif
This page took 0.043793 seconds and 3 git commands to generate.