[12559] | 1 | %bcond_with systemd |
---|
| 2 | |
---|
[12362] | 3 | Summary: Daemon to balance irq's across multiple CPUs/Cores. |
---|
| 4 | Summary(ja): 複数の CPU 間で IRQ をバランスさせるためのデーモン |
---|
| 5 | Name: irqbalance |
---|
[12559] | 6 | Version: 1.7.0 |
---|
| 7 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
| 8 | Group: system |
---|
[12362] | 9 | Vendor: Project Vine |
---|
| 10 | Distribution: Vine Linux |
---|
| 11 | |
---|
[7619] | 12 | License: GPLv3 |
---|
[12559] | 13 | URL: https://irqbalance.github.io/irqbalance/ |
---|
| 14 | Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz |
---|
[521] | 15 | Source1: %{name}.init |
---|
| 16 | Source2: %{name}.sysconfig |
---|
[12559] | 17 | Source100: %{name}.sysconfig.systemd |
---|
[521] | 18 | |
---|
[12559] | 19 | Patch1: %{name}-1.7.0-env-file-path.patch |
---|
[7619] | 20 | |
---|
[521] | 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[11536] | 22 | BuildRequires: autoconf automake libtool |
---|
| 23 | BuildRequires: glib2-devel pkgconfig libcap-ng-devel |
---|
| 24 | BuildRequires: ncurses-devel |
---|
[12559] | 25 | %if %{with systemd} |
---|
| 26 | %{?systemd_requires} |
---|
| 27 | %else |
---|
| 28 | Requires(post): chkconfig initscripts |
---|
| 29 | Requires(preun): chkconfig initscripts |
---|
| 30 | Requires(postun): initscripts |
---|
| 31 | %endif |
---|
[521] | 32 | |
---|
| 33 | %description |
---|
[11536] | 34 | irqbalance is a daemon that evenly distributes IRQ load across |
---|
| 35 | multiple CPUs for enhanced performance. |
---|
[521] | 36 | |
---|
[12559] | 37 | |
---|
| 38 | %debug_package |
---|
| 39 | |
---|
| 40 | |
---|
[521] | 41 | %prep |
---|
| 42 | %setup -q |
---|
[7619] | 43 | %patch1 -p1 |
---|
[521] | 44 | |
---|
[12559] | 45 | |
---|
[521] | 46 | %build |
---|
[9256] | 47 | ./autogen.sh |
---|
[7619] | 48 | %configure |
---|
[11536] | 49 | CFLAGS="%{optflags}" %__make %{?_smp_mflags} |
---|
[521] | 50 | |
---|
[12559] | 51 | |
---|
[521] | 52 | %install |
---|
[12362] | 53 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
| 54 | mkdir -p %{buildroot}%{_sbindir} |
---|
| 55 | install irqbalance %{buildroot}%{_sbindir} |
---|
| 56 | mkdir -p %{buildroot}%{_mandir}/man1 |
---|
[521] | 57 | install irqbalance.1 %{buildroot}%{_mandir}/man1/ |
---|
| 58 | |
---|
[12559] | 59 | %if %{with systemd} |
---|
| 60 | install -Dpm0644 ./misc/irqbalance.service %{buildroot}/%{_unitdir}/irqbalance.service |
---|
| 61 | install -Dpm644 %{SOURCE100} %{buildroot}%{_sysconfdir}/sysconfig/irqbalance |
---|
| 62 | %else |
---|
| 63 | install -Dpm755 %{SOURCE1} $RPM_BUILD_ROOT%{_initdir}/irqbalance |
---|
| 64 | install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/irqbalance |
---|
| 65 | %endif |
---|
[12362] | 66 | |
---|
| 67 | |
---|
[521] | 68 | %clean |
---|
[12362] | 69 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
[521] | 70 | |
---|
| 71 | |
---|
| 72 | %post |
---|
[12559] | 73 | %if %{with systemd} |
---|
| 74 | %systemd_post irqbalance.service |
---|
| 75 | %else |
---|
| 76 | if [ $1 = 1 ]; then |
---|
| 77 | /sbin/chkconfig --add irqbalance |
---|
| 78 | fi |
---|
| 79 | %endif |
---|
[521] | 80 | |
---|
| 81 | %preun |
---|
[12559] | 82 | %if %{with systemd} |
---|
| 83 | %systemd_preun irqbalance.service |
---|
| 84 | %else |
---|
| 85 | if [ $1 = 0 -o -x /bin/systemctl ]; then |
---|
[521] | 86 | /sbin/service irqbalance stop > /dev/null 2>&1 |
---|
| 87 | /sbin/chkconfig --del irqbalance |
---|
| 88 | fi |
---|
[12559] | 89 | %endif |
---|
[521] | 90 | |
---|
[12559] | 91 | %postun |
---|
| 92 | %if %{with systemd} |
---|
| 93 | %systemd_postun_with_restart irqbalance.service |
---|
| 94 | %else |
---|
| 95 | if [ $1 -ge 1 ]; then |
---|
| 96 | /sbin/service irqbalance condrestart > /dev/null 2>&1 ||: |
---|
| 97 | fi |
---|
| 98 | %endif |
---|
[521] | 99 | |
---|
[12559] | 100 | |
---|
[521] | 101 | %files |
---|
| 102 | %defattr(-,root,root) |
---|
[12362] | 103 | %license COPYING |
---|
| 104 | %doc AUTHORS |
---|
[521] | 105 | %config(noreplace) %{_sysconfdir}/sysconfig/* |
---|
| 106 | %{_sbindir}/* |
---|
| 107 | %{_mandir}/*/* |
---|
[12559] | 108 | %if %{with systemd} |
---|
[12362] | 109 | %{_unitdir}/irqbalance.service |
---|
[12559] | 110 | %else |
---|
| 111 | %config(noreplace) %{_sysconfdir}/rc.d/init.d/* |
---|
| 112 | %endif |
---|
[521] | 113 | |
---|
[12362] | 114 | %changelog |
---|
[12559] | 115 | * Mon Mar 01 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.0-1 |
---|
| 116 | - updated to 1.7.0. |
---|
| 117 | - updated Patch1. |
---|
| 118 | - add systemd support (disabled as default). |
---|
| 119 | |
---|
[12362] | 120 | * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.0-1 |
---|
| 121 | - updated to 1.4.0. |
---|
[521] | 122 | |
---|
[11536] | 123 | * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.0-1 |
---|
| 124 | - updated to 1.3.0. |
---|
| 125 | |
---|
[9256] | 126 | * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1 |
---|
| 127 | - update to 1.0.8 |
---|
| 128 | |
---|
[7619] | 129 | * Fri Mar 22 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.5-1 |
---|
| 130 | - update to 1.0.5 |
---|
| 131 | |
---|
[3571] | 132 | * Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.55-3 |
---|
| 133 | - add missing BuildRequires: imake |
---|
| 134 | |
---|
[3526] | 135 | * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 0.55-2 |
---|
| 136 | - rebuilt with rpm-4.8.1-3 |
---|
| 137 | |
---|
[521] | 138 | * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.55-1vl5 |
---|
| 139 | - applied new versioning policy, spec in utf-8 |
---|
| 140 | |
---|
[7619] | 141 | * Sat Dec 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.55-0vl1 |
---|
[521] | 142 | - update to irqbalance 0.55 from www.irqbalance.org |
---|
| 143 | - add patch0 from svn trunk(rev.19) |
---|
| 144 | |
---|
[7619] | 145 | * Fri Dec 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13-0vl2 |
---|
[521] | 146 | - update irqbalance.init |
---|
| 147 | - do not start irqbalance on non-SMP system. |
---|
| 148 | - do not "killproc" if irqbalance is not running. |
---|
| 149 | |
---|
| 150 | * Thu Nov 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13-0vl1 |
---|
| 151 | - new upstream release |
---|
| 152 | - change Group to System Environment/Base |
---|
| 153 | - add manpage |
---|
| 154 | |
---|
| 155 | * Mon Jan 17 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.12-0vl1 |
---|
| 156 | - new upstream release |
---|
| 157 | |
---|
| 158 | * Sun Aug 29 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.09-0vl1 |
---|
| 159 | - initial build for Vine Linux |
---|
| 160 | |
---|
| 161 | * Tue Jun 01 2004 Marcel Pol <mpol@mandrake.org> 0.09-1mdk |
---|
| 162 | - 0.09 |
---|
| 163 | |
---|
| 164 | * Tue Sep 09 2003 Marcel Pol <mpol@gmx.net> 0.06-1mdk |
---|
| 165 | - initial mandrake contrib |
---|
| 166 | Patch2: irqbalance-norebalance-zeroints.patch |
---|
| 167 | Patch3: irqbalance-classes.patch |
---|
| 168 | Patch4: irqbalance-oneshot.patch |
---|