Summary: OpenAVB
Name: openavb
-Version: 20130418
+Version: 20130814
Release: 1
-License: Other
-Group: System Environment/Daemons
+License: Intel and GPL-2.0
+Group: Base/Utilities
URL: https://github.com/intel-ethernet/Open-AVB
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: pkgconfig(zlib)
%package kmod-igb
-Summary: OpenAVB kernel module for Intel ethernet cards.
-Group: System Environment/Kernel
-Requires: %{kernel}-%{kernel_release}
+Summary: kernel module for Intel ethernet cards
+Group: System/Kernel
+Requires: %{kernel} = %{kernel_release}
%package libigb
-Summary: igb runtime library from the OpenAVB distribution.
-Group: System Environment/Libraries
+Summary: IGB runtime library
+Group: System/Libraries
%package examples
-Summary: Example clients from the OpenAVB distribution.
-Group: Applications/Communications
+Summary: Example clients
+Group: Applications/System
Requires: openavb-libigb = %{version}
%package devel
-Summary: Headers and libraries from the OpenAVB distribution.
+Summary: Headers and libraries
Group: Development/Libraries
+Requires: %{name} = %{version}
%package doc
-Summary: Documentation from theOpenAVB distribution.
-Group: Documentation
+Summary: Documentation
+Group: Development/Tools
%description
This package contains the basic OpenAVB userspace daemons.
%setup -q
%build
-%if %{?_with_debug:1}%{!?_with_debug:0}
+# For now, always compile for debugging...
+#%if %{?_with_debug:1}%{!?_with_debug:0}
export CFLAGS="-O0 -g3"
export CXXFLAGS="-O0 -g3"
-%endif
+#%endif
NUM_CPUS="`cat /proc/cpuinfo | tr -s '\t' ' ' | \
grep '^processor *:' | wc -l`"
rm -f $RPM_BUILD_ROOT%{_libdir}/libigb.la
+# Install systemd and sample 'configuration' files.
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig \
+ $RPM_BUILD_ROOT/lib/systemd/system
+/usr/bin/install -m 644 packaging/openavb.env \
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/openavb
+/usr/bin/install -m 644 -t $RPM_BUILD_ROOT/lib/systemd/system \
+ packaging/mrpd.service packaging/gptp.service
+
%clean
rm -rf $RPM_BUILD_ROOT
%post libigb
ldconfig
+%postun libigb
+ldconfig
+
%post kmod-igb
depmod -a %{kernel_moddir}
%{_sbindir}/daemon_cl
%{_sbindir}/mrpd
%{_bindir}/mrpctl
+%{_sysconfdir}/sysconfig/openavb
+/lib/systemd/system/mrpd.service
+/lib/systemd/system/gptp.service
%files kmod-igb
%defattr(-,root,root,-)
%files doc
%defattr(-,root,root,-)
-%doc README.rst documents examples
-
-%changelog
-* Tue Nov 27 2012 Krisztian Litkey <krisztian.litkey@intel.com> -
-- Initial build for 2.0alpha.
+%doc README.rst documents
+%license examples/LICENSE
+%doc examples/mrp_client examples/simple_listener examples/simple_talker