irqbalance/irqbalance.spec

106 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package irqbalance
#
# Copyright (c) 2011 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 http://bugs.opensuse.org/
#
# norootforbuild
Name: irqbalance
License: GPLv2+
Group: System/Daemons
AutoReqProv: on
PreReq: %insserv_prereq
Version: 0.56_svn201010021305
Release: 7
Summary: Balance IRQs on SMP Machines
Source: %{name}-%{version}.tar.bz2
Source1: irqbalance.pod
Source2: irq_balancer
Source3: sysconfig.irqbalance
Source4: irqbalance.service
Url: http://www.irqbalance.org
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
%endif
Patch0: irqbalance-fix-Makefile
Patch1: irqbalance-0.55-as-needed.patch
%description
irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
being used for all IRQs.
Authors:
--------
Arjan van de Ven <arjan@linux.intel.com>
%prep
%setup -q
%patch0 -p1
%patch1
%build
./autogen.sh
%configure
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
%install
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/
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/
install -D -p -m 0644 %{SOURCE4} $RPM_BUILD_ROOT/lib/systemd/system/
%clean
rm -rf $RPM_BUILD_ROOT
%preun
%stop_on_removal irq_balancer
%post
%insserv_force_if_yast irq_balancer
%{fillup_only}
%postun
%restart_on_update irq_balancer
%insserv_cleanup
%files
%defattr(-,root,root,-)
%{_sbindir}/irqbalance
/etc/init.d/irq_balancer
/lib/systemd/system/irqbalance.service
%{_sbindir}/rcirq_balancer
%{_mandir}/man1/irqbalance.1.gz
/var/adm/fillup-templates/sysconfig.irqbalance
%changelog