From 3519fa08011d4afeac3bf5152b8a1dbfd1704662 Mon Sep 17 00:00:00 2001 From: Flavio Leitner Date: Thu, 6 Nov 2014 16:45:30 -0200 Subject: [PATCH] fedora-spec: add openvswitch-devel subpackage This provides static library, libopenswitch.a and the openvswitch header files needed to build an external application in a separate RPM package. Signed-off-by: Flavio Leitner Signed-off-by: Ben Pfaff --- rhel/openvswitch-fedora.spec.in | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/rhel/openvswitch-fedora.spec.in b/rhel/openvswitch-fedora.spec.in index 5fd2d5589..9dc607c2c 100644 --- a/rhel/openvswitch-fedora.spec.in +++ b/rhel/openvswitch-fedora.spec.in @@ -68,6 +68,16 @@ Requires: python python-twisted-core python-twisted-web Utilities that are useful to diagnose performance and connectivity issues in Open vSwitch setup. +%package devel +Summary: Open vSwitch OpenFlow development package (library, headers) +License: ASL 2.0 +Provides: openvswitch-static = %{version}-%{release} + +%description devel +This provides static library, libopenswitch.a and the openvswitch header +files needed to build an external application. + + %prep %setup -q -n openvswitch-%{version} @@ -109,8 +119,18 @@ rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch -# Get rid of stuff we don't want to make RPM happy. -(cd "$RPM_BUILD_ROOT" && rm -f usr/lib/lib*) +install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch +install -p -D -m 0644 include/openvswitch/*.h \ + -t $RPM_BUILD_ROOT%{_includedir}/openvswitch +install -p -D -m 0644 config.h -t $RPM_BUILD_ROOT%{_includedir}/openvswitch + +install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib +install -p -D -m 0644 lib/*.h \ + -t $RPM_BUILD_ROOT%{_includedir}/openvswitch/lib + +install -d -m 0755 $RPM_BUILD_ROOT%{_includedir}/openflow +install -p -D -m 0644 include/openflow/*.h \ + -t $RPM_BUILD_ROOT%{_includedir}/openflow %check %if %{with check} @@ -162,6 +182,12 @@ systemctl start openvswitch.service %{_mandir}/man8/ovs-l3ping.8* %{python_sitelib}/ovstest +%files devel +%{_libdir}/*.a +%{_libdir}/*.la +%{_includedir}/openvswitch/* +%{_includedir}/openflow/* + %files %defattr(-,root,root) %config /etc/sysconfig/openvswitch -- 2.20.1