2007-01-15 23:17:54 +00:00
|
|
|
#
|
2011-07-07 13:08:03 +00:00
|
|
|
# spec file for package irqbalance
|
2007-01-15 23:17:54 +00:00
|
|
|
#
|
2012-05-09 15:29:34 +00:00
|
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2007-01-15 23:17:54 +00:00
|
|
|
#
|
2008-08-15 21:56:56 +00:00
|
|
|
# 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.
|
|
|
|
|
2007-01-15 23:17:54 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-05-09 15:29:34 +00:00
|
|
|
|
2007-01-15 23:17:54 +00:00
|
|
|
Name: irqbalance
|
2012-09-06 11:10:09 +00:00
|
|
|
Version: 1.0.4
|
2011-12-01 17:11:30 +00:00
|
|
|
Release: 0
|
2007-01-15 23:17:54 +00:00
|
|
|
Summary: Balance IRQs on SMP Machines
|
2012-06-25 15:03:01 +00:00
|
|
|
License: GPL-2.0+
|
2011-08-16 17:08:20 +00:00
|
|
|
Group: System/Daemons
|
2012-06-25 15:03:01 +00:00
|
|
|
Url: http://code.google.com/p/irqbalance
|
2007-04-12 21:30:06 +00:00
|
|
|
Source: %{name}-%{version}.tar.bz2
|
2007-01-15 23:17:54 +00:00
|
|
|
Source2: irq_balancer
|
2007-12-12 17:12:55 +00:00
|
|
|
Source3: sysconfig.irqbalance
|
2011-10-17 14:03:00 +00:00
|
|
|
BuildRequires: libnuma-devel
|
2011-10-15 18:44:40 +00:00
|
|
|
BuildRequires: libtool
|
2011-12-01 17:11:30 +00:00
|
|
|
BuildRequires: pkgconfig(glib-2.0)
|
2012-05-09 15:29:34 +00:00
|
|
|
Requires(pre): coreutils
|
|
|
|
Requires(pre): fillup
|
2011-08-16 17:08:20 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2012-05-09 15:29:34 +00:00
|
|
|
ExclusiveArch: ia64 x86_64 ppc64 ppc %sparc
|
2011-08-16 17:08:20 +00:00
|
|
|
%if 0%{?suse_version} >= 1130
|
2010-10-03 20:41:57 +00:00
|
|
|
BuildRequires: libcap-ng-devel
|
2011-08-16 17:08:20 +00:00
|
|
|
%endif
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?suse_version} > 1140
|
|
|
|
BuildRequires: systemd
|
|
|
|
%{?systemd_requires}
|
|
|
|
%define has_systemd 1
|
|
|
|
%endif
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
irqbalance dynamically switches the CPUs for IRQs to prevent cpu0 from
|
|
|
|
being used for all IRQs.
|
|
|
|
|
|
|
|
%prep
|
2010-10-03 20:41:57 +00:00
|
|
|
%setup -q
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%build
|
2010-10-03 20:41:57 +00:00
|
|
|
./autogen.sh
|
|
|
|
%configure
|
2011-08-16 17:08:20 +00:00
|
|
|
make LDFLAGS="-Wl,-z,relro,-z,now" CFLAGS="%{optflags} -fPIE -pie"
|
2007-12-12 17:12:55 +00:00
|
|
|
cp %{SOURCE3} .
|
2007-04-16 07:05:38 +00:00
|
|
|
gzip irqbalance.1
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%install
|
2011-08-16 17:08:20 +00:00
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
|
|
|
install -m 0755 irqbalance %{buildroot}%{_sbindir}
|
|
|
|
install -m 0755 $RPM_SOURCE_DIR/irq_balancer %{buildroot}%{_sysconfdir}/init.d
|
|
|
|
ln -s /etc/init.d/irq_balancer %{buildroot}%{_sbindir}/rcirq_balancer
|
|
|
|
mkdir -p %{buildroot}%{_mandir}/man1
|
|
|
|
install -m 0644 irqbalance.1.gz %{buildroot}%{_mandir}/man1
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates/
|
|
|
|
install -m 0644 sysconfig.irqbalance %{buildroot}%{_localstatedir}/adm/fillup-templates/
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?has_systemd}
|
2012-11-24 21:08:29 +00:00
|
|
|
sed -ie "s|EnvironmentFile=.*|EnvironmentFile=/etc/sysconfig/irqbalance|g" misc/irqbalance.service
|
2011-11-30 08:32:10 +00:00
|
|
|
install -D -m 0644 misc/irqbalance.service %{buildroot}%{_unitdir}/irqbalance.service
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_pre irqbalance.service
|
|
|
|
%endif
|
2007-01-15 23:17:54 +00:00
|
|
|
|
2011-08-16 17:08:20 +00:00
|
|
|
%post
|
|
|
|
%fillup_only
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_add_post irqbalance.service
|
|
|
|
%endif
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%preun
|
|
|
|
%stop_on_removal irq_balancer
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_preun irqbalance.service
|
|
|
|
%endif
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%restart_on_update irq_balancer
|
|
|
|
%insserv_cleanup
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%service_del_postun irqbalance.service
|
|
|
|
%endif
|
2007-01-15 23:17:54 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2007-04-12 21:30:06 +00:00
|
|
|
%{_sbindir}/irqbalance
|
2011-08-16 17:08:20 +00:00
|
|
|
%{_sysconfdir}/init.d/irq_balancer
|
2011-11-30 08:32:10 +00:00
|
|
|
%if 0%{?has_systemd}
|
|
|
|
%{_unitdir}/irqbalance.service
|
|
|
|
%endif
|
2007-04-12 21:30:06 +00:00
|
|
|
%{_sbindir}/rcirq_balancer
|
2007-04-16 07:05:38 +00:00
|
|
|
%{_mandir}/man1/irqbalance.1.gz
|
2011-08-16 17:08:20 +00:00
|
|
|
%{_localstatedir}/adm/fillup-templates/sysconfig.irqbalance
|
2007-01-15 23:17:54 +00:00
|
|
|
|
2007-04-03 19:31:37 +00:00
|
|
|
%changelog
|