Skip to content

Commit

Permalink
fedora-spec: add openvswitch-devel subpackage
Browse files Browse the repository at this point in the history
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 <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
  • Loading branch information
fleitner authored and blp committed Nov 6, 2014
1 parent f305420 commit 3519fa0
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions rhel/openvswitch-fedora.spec.in
Expand Up @@ -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}

Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3519fa0

Please sign in to comment.