File irqd.spec of Package irqd

#
# spec file for package irqd
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           irqd
Version:        0.7.2
Release:        0
Summary:        Multiqueue and RPS-aware IRQ affinity balancer
License:        GPL-2.0
Group:          System/Daemons
Url:            http://github.com/vaesoo/irqd

#Git-Clone:	git://github.com/vaesoo/irqd
Source:         %name-%version.tar.xz
Source3:        irqd.service
Patch1:         irqd-uninitialized.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  libtool
BuildRequires:  systemd-rpm-macros
BuildRequires:  xz
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(libnl-route-3.0) >= 3.2

%description
irqd is an alternative IRQ balancer for Linux kernels. It balances
the IRQs more or less evenly across the CPUs you have in your system.

It currently relies on the Receive Packet Steering (RPS)
implementation of newer Linux kernels, it is of less use currently if
RPS is not available.

%prep
%setup -qn %name
%patch -P 1 -p1

%build
if [ ! -e configure ]; then
	./autogen.sh;
fi
%configure
make %{?_smp_mflags}

%install
b="%buildroot";
make install DESTDIR="$b";
mkdir -p "$b/%_unitdir" "$b/%_sbindir"
install -pm0644 "%{S:3}" "$b/%_unitdir/irqd.service";
ln -s service "$b/%_sbindir/rcirqd"

%pre
%service_add_pre irqd.service

%post
%service_add_post irqd.service

%preun
%service_del_preun irqd.service

%postun
%service_del_postun irqd.service

%files
%defattr(-,root,root)
%_unitdir/*
%_sbindir/irqd
%_sbindir/rcirqd
%doc DESIGN README

%changelog
openSUSE Build Service is sponsored by