rhel: Include pkgconfig and update header install in Fedora/RHEL spec.
authorThomas Graf <tgraf@noironetworks.com>
Thu, 13 Nov 2014 11:28:45 +0000 (12:28 +0100)
committerBen Pfaff <blp@nicira.com>
Thu, 13 Nov 2014 16:03:59 +0000 (08:03 -0800)
As headers are installed by 'make install' now, the explicit install
instructions can be be removed from the spec file.

The spec file has been including <config.h> plus all headers in lib/ so
far which is dangerous:

 * config.h is a description of the capabilities of the build machine
   where the package was built. Although it may hint on what is
   included in the library, the defines do not necessarily hold true on
   another build machine.

 * Some headers in lib/ do not contain proper prefixes and pollute the
   global header name space. Do not include them anymore. Properly
   cleaned up headers will be exposed in openvswitch/ and openflow/

For the RHEL spec, both pkgconfig and headers are omitted as no -devel
package exists yet.

Cc: Flavio Leitner <fbl@redhat.com>
Suggested-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Flavio Leitner <fbl@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
rhel/openvswitch-fedora.spec.in
rhel/openvswitch.spec.in

index fb4b1b7..5a3af4a 100644 (file)
@@ -127,20 +127,6 @@ rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/
 
 install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch
 
-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
-
 touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db
 touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf
 
@@ -208,6 +194,7 @@ rm -rf $RPM_BUILD_ROOT
 %files devel
 %{_libdir}/*.a
 %{_libdir}/*.la
+%{_libdir}/pkgconfig/*.pc
 %{_includedir}/openvswitch/*
 %{_includedir}/openflow/*
 
index 3948411..56603cc 100644 (file)
@@ -69,6 +69,7 @@ rm \
     $RPM_BUILD_ROOT/usr/sbin/ovs-vlan-bug-workaround \
     $RPM_BUILD_ROOT/usr/share/man/man8/ovs-vlan-bug-workaround.8
 (cd "$RPM_BUILD_ROOT" && rm -rf usr/lib)
+(cd "$RPM_BUILD_ROOT" && rm -rf usr/include)
 
 install -d -m 755 $RPM_BUILD_ROOT/var/lib/openvswitch