File irqbalance.spec of Package irqbalance

# spec file for package irqbalance (Version 0.56_svn201010021305)
# Copyright (c) 2010 SUSE LINUX Products 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

# norootforbuild

Name:           irqbalance
License:        GPLv2+
Group:          System/Daemons
AutoReqProv:    on
PreReq:         %insserv_prereq
Version:        0.56_svn201010021305
Release:        2
Summary:        Balance IRQs on SMP Machines
Source:         %{name}-%{version}.tar.bz2
Source1:        irqbalance.pod
Source2:        irq_balancer
Source3:        sysconfig.irqbalance
PreReq:         coreutils fillup
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# xorg-x11-util-devel is for gccmakedep
BuildRequires:  glib2-devel
%if 0%{suse_version} >= 1130
BuildRequires:  libcap-ng-devel
Patch0:         irqbalance-fix-Makefile
Patch1:         irqbalance-0.55-as-needed.patch

irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
being used for all IRQs.

    Arjan van de Ven <>

%setup -q
%patch0 -p1

make LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="$RPM_OPT_FLAGS -fPIE -pie"
cp %{SOURCE1} .
cp %{SOURCE3} .
pod2man --release=0.5.5 --center=irqbalance irqbalance.pod irqbalance.1
gzip irqbalance.1

mkdir -p $RPM_BUILD_ROOT/%{_sbindir}
mkdir -p $RPM_BUILD_ROOT/etc/init.d
install -m 0755 irqbalance $RPM_BUILD_ROOT/%{_sbindir}
install -m 0755 $RPM_SOURCE_DIR/irq_balancer $RPM_BUILD_ROOT/etc/init.d
ln -s /etc/init.d/irq_balancer $RPM_BUILD_ROOT/%{_sbindir}/rcirq_balancer
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1
install -m 0644 irqbalance.1.gz $RPM_BUILD_ROOT/%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates/
install -m 0644 sysconfig.irqbalance $RPM_BUILD_ROOT/var/adm/fillup-templates/


%stop_on_removal irq_balancer

%insserv_force_if_yast irq_balancer

%restart_on_update irq_balancer


openSUSE Build Service is sponsored by