3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: VDE2: Virtual Distributed Ethernet
7 Summary(pl.UTF-8): VDE2: wirtualny rozproszony ethernet
11 License: LGPL v2.1+ (libvdeplug), BSD (slirpvde), GPL v2+ (the rest)
12 Group: Networking/Utilities
13 Source0: http://downloads.sourceforge.net/vde/%{name}-%{version}.tar.bz2
14 # Source0-md5: 46fbc5f97f03dc517aa3b2c9d9ea6628
15 Patch0: %{name}-pathmax.patch
16 Patch1: %{name}-format.patch
17 Patch2: %{name}-openssl-1.1.patch
19 URL: http://sourceforge.net/projects/vde/
20 BuildRequires: autoconf >= 2.59
21 BuildRequires: automake
22 BuildRequires: libpcap-devel
23 BuildRequires: libtool
24 BuildRequires: openssl-devel
25 %{?with_python2:BuildRequires: python-devel >= 1:2.5}
26 %{?with_python3:BuildRequires: python3-devel >= 1:3.2}
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.507
29 Requires: %{name}-libs = %{version}-%{release}
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 # expects "prompt" symbol from user
34 %define skip_post_check_so libvdehist.*
37 VDE2: Virtual Distributed Ethernet. It creates the abstraction of a
38 virtual ethernet: a single vde can be accessed by virtual and real
41 %description -l pl.UTF-8
42 VDE2: wirtualny rozproszony ethernet. Narzędzie to tworzy abstrakcyjny
43 wirtualny ethernet - pojedynczy vde może być dostępny z wirtualnych
44 jak i rzeczywistych komputerów.
47 Summary: VDE2 libraries
48 Summary(pl.UTF-8): Biblioteki VDE2
50 Conflicts: vde2 < 2.3.2
55 %description libs -l pl.UTF-8
59 Summary: Header files for VDE2 libraries
60 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VDE2
61 Group: Development/Libraries
62 Requires: %{name}-libs = %{version}-%{release}
65 Header files for VDE2 libraries.
67 %description devel -l pl.UTF-8
68 Pliki nagłówkowe bibliotek VDE2.
71 Summary: Static VDE2 library
72 Summary(pl.UTF-8): Statyczna biblioteka VDE2
73 Group: Development/Libraries
74 Requires: %{name}-devel = %{version}-%{release}
79 %description static -l pl.UTF-8
80 Statyczna biblioteka VDE2.
82 %package -n python-vde2
83 Summary: Python interface to VDE2
84 Summary(pl.UTF-8): Pythonowy interfejs do VDE2
85 Group: Libraries/Python
86 Requires: %{name}-libs = %{version}-%{release}
88 %description -n python-vde2
89 Python interface to VDE2.
91 %description -n python-vde2 -l pl.UTF-8
92 Pythonowy interfejs do VDE2.
94 %package -n python3-vde2
95 Summary: Python interface to VDE2
96 Summary(pl.UTF-8): Pythonowy interfejs do VDE2
97 Group: Libraries/Python
98 Requires: %{name}-libs = %{version}-%{release}
100 %description -n python3-vde2
101 Python interface to VDE2.
103 %description -n python3-vde2 -l pl.UTF-8
104 Pythonowy interfejs do VDE2.
124 --disable-silent-rules \
125 --enable-kernel-switch
128 pythondir=%{py_sitedir}
136 PYTHON=%{__python3} \
137 --disable-silent-rules \
138 --enable-kernel-switch
141 pythondir=%{py3_sitedir}
146 rm -rf $RPM_BUILD_ROOT
149 %{__make} -C build-py3 install \
150 DESTDIR=$RPM_BUILD_ROOT \
151 pythondir=%{py3_sitedir}
155 %{__make} -C build-py2%{?with_python3:/src/lib/python} install \
156 DESTDIR=$RPM_BUILD_ROOT \
157 pythondir=%{py_sitedir}
161 %{__rm} $RPM_BUILD_ROOT%{_libdir}/vde2/libvdetap.{la,a}
162 %{__rm} $RPM_BUILD_ROOT%{_libdir}/vde2/vde_l3/*.la
164 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/vdeplug_python.la
167 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/vdeplug_python.la
169 # libs .la kept - no Requires/Libs.private
171 cp -p src/slirpvde/README README.slirpvde
174 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
175 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
179 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
180 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
184 rm -rf $RPM_BUILD_ROOT
186 %post libs -p /sbin/ldconfig
187 %postun libs -p /sbin/ldconfig
190 %defattr(644,root,root,755)
191 %doc COPYING.slirpvde Changelog README README.slirpvde
192 %dir %{_sysconfdir}/vde2
193 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/vdecmd
194 %dir %{_sysconfdir}/vde2/libvdemgmt
195 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/libvdemgmt/asyncrecv.rc
196 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/libvdemgmt/closemachine.rc
197 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/libvdemgmt/openmachine.rc
198 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/libvdemgmt/sendcmd.rc
199 %attr(755,root,root) %{_bindir}/dpipe
200 %attr(755,root,root) %{_bindir}/kvde_switch
201 %attr(755,root,root) %{_bindir}/slirpvde
202 %attr(755,root,root) %{_bindir}/unixcmd
203 %attr(755,root,root) %{_bindir}/unixterm
204 %attr(755,root,root) %{_bindir}/vde_autolink
205 %attr(755,root,root) %{_bindir}/vde_cryptcab
206 %attr(755,root,root) %{_bindir}/vde_l3
207 %attr(755,root,root) %{_bindir}/vde_over_ns
208 %attr(755,root,root) %{_bindir}/vde_pcapplug
209 %attr(755,root,root) %{_bindir}/vde_plug
210 %attr(755,root,root) %{_bindir}/vde_plug2tap
211 %attr(755,root,root) %{_bindir}/vde_switch
212 %attr(755,root,root) %{_bindir}/vdecmd
213 %attr(755,root,root) %{_bindir}/vdekvm
214 %attr(755,root,root) %{_bindir}/vdeq
215 %attr(755,root,root) %{_bindir}/vdeqemu
216 %attr(755,root,root) %{_bindir}/vdeterm
217 %attr(755,root,root) %{_bindir}/wirefilter
218 %attr(755,root,root) %{_sbindir}/vde_tunctl
219 %attr(755,root,root) %{_libexecdir}/vdetap
221 %attr(755,root,root) %{_libdir}/vde2/libvdetap.so
222 %dir %{_libdir}/vde2/vde_l3
223 %attr(755,root,root) %{_libdir}/vde2/vde_l3/bfifo.so
224 %attr(755,root,root) %{_libdir}/vde2/vde_l3/pfifo.so
225 %attr(755,root,root) %{_libdir}/vde2/vde_l3/tbf.so
226 %{_mandir}/man1/dpipe.1*
227 %{_mandir}/man1/slirpvde.1*
228 %{_mandir}/man1/unixcmd.1*
229 %{_mandir}/man1/unixterm.1*
230 %{_mandir}/man1/vde_autolink.1*
231 %{_mandir}/man1/vde_cryptcab.1*
232 %{_mandir}/man1/vde_l3.1*
233 %{_mandir}/man1/vde_over_ns.1*
234 %{_mandir}/man1/vde_pcapplug.1*
235 %{_mandir}/man1/vde_plug.1*
236 %{_mandir}/man1/vde_plug2tap.1*
237 %{_mandir}/man1/vde_switch.1*
238 %{_mandir}/man1/vdecmd.1*
239 %{_mandir}/man1/vdekvm.1*
240 %{_mandir}/man1/vdeq.1*
241 %{_mandir}/man1/vdeqemu.1*
242 %{_mandir}/man1/vdetaplib.1*
243 %{_mandir}/man1/vdeterm.1*
244 %{_mandir}/man1/wirefilter.1*
245 %{_mandir}/man8/vde_tunctl.8*
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/libvdehist.so.*.*.*
250 %attr(755,root,root) %ghost %{_libdir}/libvdehist.so.0
251 %attr(755,root,root) %{_libdir}/libvdemgmt.so.*.*.*
252 %attr(755,root,root) %ghost %{_libdir}/libvdemgmt.so.0
253 %attr(755,root,root) %{_libdir}/libvdeplug.so.*.*.*
254 %attr(755,root,root) %ghost %{_libdir}/libvdeplug.so.3
255 %attr(755,root,root) %{_libdir}/libvdesnmp.so.*.*.*
256 %attr(755,root,root) %ghost %{_libdir}/libvdesnmp.so.0
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_libdir}/libvdehist.so
261 %attr(755,root,root) %{_libdir}/libvdemgmt.so
262 %attr(755,root,root) %{_libdir}/libvdeplug.so
263 %attr(755,root,root) %{_libdir}/libvdesnmp.so
264 %{_libdir}/libvdehist.la
265 %{_libdir}/libvdemgmt.la
266 %{_libdir}/libvdeplug.la
267 %{_libdir}/libvdesnmp.la
268 %{_includedir}/libvdehist.h
269 %{_includedir}/libvdemgmt.h
270 %{_includedir}/libvdeplug.h
271 %{_includedir}/libvdeplug_dyn.h
272 %{_includedir}/libvdesnmp.h
273 %{_pkgconfigdir}/vdehist.pc
274 %{_pkgconfigdir}/vdemgmt.pc
275 %{_pkgconfigdir}/vdeplug.pc
276 %{_pkgconfigdir}/vdesnmp.pc
279 %defattr(644,root,root,755)
280 %{_libdir}/libvdehist.a
281 %{_libdir}/libvdemgmt.a
282 %{_libdir}/libvdeplug.a
283 %{_libdir}/libvdesnmp.a
286 %files -n python-vde2
287 %defattr(644,root,root,755)
288 %attr(755,root,root) %{py_sitedir}/vdeplug_python.so
289 %{py_sitedir}/VdePlug.py[co]
293 %files -n python3-vde2
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{py3_sitedir}/vdeplug_python.so
296 %{py3_sitedir}/VdePlug.py
297 %{py3_sitedir}/__pycache__/VdePlug.cpython-*.py[co]