]> git.pld-linux.org Git - packages/vde2.git/blame - vde2.spec
- support building both python modules
[packages/vde2.git] / vde2.spec
CommitLineData
52147d4d
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
f7fdb76e 6Summary: VDE2: Virtual Distributed Ethernet
7Summary(pl.UTF-8): VDE2: wirtualny rozproszony ethernet
8Name: vde2
5312b291 9Version: 2.3.2
d32f71a6 10Release: 7
5312b291 11License: LGPL v2.1+ (libvdeplug), BSD (slirpvde), GPL v2+ (the rest)
f7fdb76e 12Group: Networking/Utilities
5312b291
JB
13Source0: http://downloads.sourceforge.net/vde/%{name}-%{version}.tar.bz2
14# Source0-md5: 46fbc5f97f03dc517aa3b2c9d9ea6628
491a8be5 15Patch0: %{name}-pathmax.patch
ebb249ef 16Patch1: %{name}-format.patch
d1657b48 17Patch2: %{name}-openssl-1.1.patch
d32f71a6 18Patch3: python3.patch
f7fdb76e 19URL: http://sourceforge.net/projects/vde/
5312b291 20BuildRequires: autoconf >= 2.59
f7fdb76e 21BuildRequires: automake
5312b291 22BuildRequires: libpcap-devel
f7fdb76e 23BuildRequires: libtool
5312b291 24BuildRequires: openssl-devel
52147d4d
JB
25%{?with_python2:BuildRequires: python-devel >= 1:2.5}
26%{?with_python3:BuildRequires: python3-devel >= 1:3.2}
5312b291 27BuildRequires: rpm-pythonprov
52147d4d 28BuildRequires: rpmbuild(macros) >= 1.507
5312b291
JB
29Requires: %{name}-libs = %{version}-%{release}
30Obsoletes: vde < 2
f7fdb76e 31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
5312b291
JB
33# expects "prompt" symbol from user
34%define skip_post_check_so libvdehist.*
35
f7fdb76e 36%description
37VDE2: Virtual Distributed Ethernet. It creates the abstraction of a
38virtual ethernet: a single vde can be accessed by virtual and real
39computers.
40
41%description -l pl.UTF-8
42VDE2: wirtualny rozproszony ethernet. Narzędzie to tworzy abstrakcyjny
43wirtualny ethernet - pojedynczy vde może być dostępny z wirtualnych
44jak i rzeczywistych komputerów.
45
5312b291
JB
46%package libs
47Summary: VDE2 libraries
48Summary(pl.UTF-8): Biblioteki VDE2
49Group: Libraries
50Conflicts: vde2 < 2.3.2
51
52%description libs
53VDE2 libraries.
54
55%description libs -l pl.UTF-8
56Biblioteki VDE2.
57
f7fdb76e 58%package devel
5312b291
JB
59Summary: Header files for VDE2 libraries
60Summary(pl.UTF-8): Pliki nagłówkowe bibliotek VDE2
f7fdb76e 61Group: Development/Libraries
5312b291 62Requires: %{name}-libs = %{version}-%{release}
f7fdb76e 63
64%description devel
5312b291 65Header files for VDE2 libraries.
f7fdb76e 66
67%description devel -l pl.UTF-8
5312b291 68Pliki nagłówkowe bibliotek VDE2.
f7fdb76e 69
70%package static
71Summary: Static VDE2 library
72Summary(pl.UTF-8): Statyczna biblioteka VDE2
73Group: Development/Libraries
74Requires: %{name}-devel = %{version}-%{release}
75
76%description static
77Static VDE2 library.
78
79%description static -l pl.UTF-8
80Statyczna biblioteka VDE2.
81
52147d4d
JB
82%package -n python-vde2
83Summary: Python interface to VDE2
84Summary(pl.UTF-8): Pythonowy interfejs do VDE2
85Group: Libraries/Python
86Requires: %{name}-libs = %{version}-%{release}
87
88%description -n python-vde2
89Python interface to VDE2.
90
91%description -n python-vde2 -l pl.UTF-8
92Pythonowy interfejs do VDE2.
93
36fcd358 94%package -n python3-vde2
5312b291
JB
95Summary: Python interface to VDE2
96Summary(pl.UTF-8): Pythonowy interfejs do VDE2
97Group: Libraries/Python
98Requires: %{name}-libs = %{version}-%{release}
99
36fcd358 100%description -n python3-vde2
5312b291
JB
101Python interface to VDE2.
102
36fcd358 103%description -n python3-vde2 -l pl.UTF-8
5312b291
JB
104Pythonowy interfejs do VDE2.
105
f7fdb76e 106%prep
107%setup -q
491a8be5 108%patch0 -p1
ebb249ef 109%patch1 -p1
d1657b48 110%patch2 -p1
d32f71a6 111%patch3 -p1
f7fdb76e 112
113%build
114%{__libtoolize}
115%{__aclocal}
116%{__autoconf}
5312b291 117%{__autoheader}
f7fdb76e 118%{__automake}
52147d4d
JB
119%if %{with python2}
120install -d build-py2
121cd build-py2
122../%configure \
123 PYTHON=%{__python} \
124 --disable-silent-rules \
125 --enable-kernel-switch
126
127%{__make} -j1 \
128 pythondir=%{py_sitedir}
129cd ..
130%endif
131
132%if %{with python3}
133install -d build-py3
134cd build-py3
135../%configure \
136 PYTHON=%{__python3} \
5312b291
JB
137 --disable-silent-rules \
138 --enable-kernel-switch
f7fdb76e 139
ebb249ef 140%{__make} -j1 \
d32f71a6 141 pythondir=%{py3_sitedir}
52147d4d
JB
142cd ..
143%endif
f7fdb76e 144
145%install
146rm -rf $RPM_BUILD_ROOT
147
52147d4d
JB
148%if %{with python3}
149%{__make} -C build-py3 install \
5312b291 150 DESTDIR=$RPM_BUILD_ROOT \
d32f71a6 151 pythondir=%{py3_sitedir}
52147d4d
JB
152%endif
153
154%if %{with python2}
155%{__make} -C build-py2%{?with_python3:/src/lib/python} install \
156 DESTDIR=$RPM_BUILD_ROOT \
157 pythondir=%{py_sitedir}
158%endif
f7fdb76e 159
5312b291
JB
160# loadable modules
161%{__rm} $RPM_BUILD_ROOT%{_libdir}/vde2/libvdetap.{la,a}
162%{__rm} $RPM_BUILD_ROOT%{_libdir}/vde2/vde_l3/*.la
52147d4d
JB
163%if %{with python2}
164%{__rm} $RPM_BUILD_ROOT%{py_sitedir}/vdeplug_python.la
165%endif
166%if %{with python3}
d32f71a6 167%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/vdeplug_python.la
52147d4d 168%endif
5312b291 169# libs .la kept - no Requires/Libs.private
f7fdb76e 170
5312b291
JB
171cp -p src/slirpvde/README README.slirpvde
172
52147d4d
JB
173%if %{with python2}
174%py_comp $RPM_BUILD_ROOT%{py_sitedir}
175%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
176%py_postclean
177%endif
178%if %{with python3}
d32f71a6
MK
179%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
180%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
52147d4d 181%endif
b738e09c 182
f7fdb76e 183%clean
184rm -rf $RPM_BUILD_ROOT
185
5312b291
JB
186%post libs -p /sbin/ldconfig
187%postun libs -p /sbin/ldconfig
f7fdb76e 188
189%files
190%defattr(644,root,root,755)
5312b291 191%doc COPYING.slirpvde Changelog README README.slirpvde
e8a4594f 192%dir %{_sysconfdir}/vde2
e8a4594f 193%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/vde2/vdecmd
5312b291 194%dir %{_sysconfdir}/vde2/libvdemgmt
e8a4594f 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
5312b291
JB
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
d1657b48 219%attr(755,root,root) %{_libexecdir}/vdetap
45dacef7 220%dir %{_libdir}/vde2
f7fdb76e 221%attr(755,root,root) %{_libdir}/vde2/libvdetap.so
5312b291
JB
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*
246
247%files libs
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
f7fdb76e 257
258%files devel
259%defattr(644,root,root,755)
5312b291
JB
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
f7fdb76e 277
278%files static
279%defattr(644,root,root,755)
5312b291
JB
280%{_libdir}/libvdehist.a
281%{_libdir}/libvdemgmt.a
282%{_libdir}/libvdeplug.a
283%{_libdir}/libvdesnmp.a
284
52147d4d
JB
285%if %{with python2}
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]
290%endif
291
292%if %{with python3}
36fcd358 293%files -n python3-vde2
5312b291 294%defattr(644,root,root,755)
d32f71a6
MK
295%attr(755,root,root) %{py3_sitedir}/vdeplug_python.so
296%{py3_sitedir}/VdePlug.py
297%{py3_sitedir}/__pycache__/VdePlug.cpython-*.py[co]
52147d4d 298%endif
This page took 0.163911 seconds and 4 git commands to generate.