1 | %bcond_with systemd |
---|
2 | |
---|
3 | Summary: Daemon to balance irq's across multiple CPUs/Cores. |
---|
4 | Summary(ja): 複数の CPU 間で IRQ をバランスさせるためのデーモン |
---|
5 | Name: irqbalance |
---|
6 | Version: 1.7.0 |
---|
7 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
8 | Group: system |
---|
9 | Vendor: Project Vine |
---|
10 | Distribution: Vine Linux |
---|
11 | |
---|
12 | License: GPLv3 |
---|
13 | URL: https://irqbalance.github.io/irqbalance/ |
---|
14 | Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz |
---|
15 | Source1: %{name}.init |
---|
16 | Source2: %{name}.sysconfig |
---|
17 | Source100: %{name}.sysconfig.systemd |
---|
18 | |
---|
19 | Patch1: %{name}-1.7.0-env-file-path.patch |
---|
20 | |
---|
21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
22 | BuildRequires: autoconf automake libtool |
---|
23 | BuildRequires: glib2-devel pkgconfig libcap-ng-devel |
---|
24 | BuildRequires: ncurses-devel |
---|
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 |
---|
32 | |
---|
33 | %description |
---|
34 | irqbalance is a daemon that evenly distributes IRQ load across |
---|
35 | multiple CPUs for enhanced performance. |
---|
36 | |
---|
37 | |
---|
38 | %debug_package |
---|
39 | |
---|
40 | |
---|
41 | %prep |
---|
42 | %setup -q |
---|
43 | %patch1 -p1 |
---|
44 | |
---|
45 | |
---|
46 | %build |
---|
47 | ./autogen.sh |
---|
48 | %configure |
---|
49 | CFLAGS="%{optflags}" %__make %{?_smp_mflags} |
---|
50 | |
---|
51 | |
---|
52 | %install |
---|
53 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
54 | mkdir -p %{buildroot}%{_sbindir} |
---|
55 | install irqbalance %{buildroot}%{_sbindir} |
---|
56 | mkdir -p %{buildroot}%{_mandir}/man1 |
---|
57 | install irqbalance.1 %{buildroot}%{_mandir}/man1/ |
---|
58 | |
---|
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 |
---|
66 | |
---|
67 | |
---|
68 | %clean |
---|
69 | [ "%{buildroot}" != "/" ] && rm -rf %{buildroot} |
---|
70 | |
---|
71 | |
---|
72 | %post |
---|
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 |
---|
80 | |
---|
81 | %preun |
---|
82 | %if %{with systemd} |
---|
83 | %systemd_preun irqbalance.service |
---|
84 | %else |
---|
85 | if [ $1 = 0 -o -x /bin/systemctl ]; then |
---|
86 | /sbin/service irqbalance stop > /dev/null 2>&1 |
---|
87 | /sbin/chkconfig --del irqbalance |
---|
88 | fi |
---|
89 | %endif |
---|
90 | |
---|
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 |
---|
99 | |
---|
100 | |
---|
101 | %files |
---|
102 | %defattr(-,root,root) |
---|
103 | %license COPYING |
---|
104 | %doc AUTHORS |
---|
105 | %config(noreplace) %{_sysconfdir}/sysconfig/* |
---|
106 | %{_sbindir}/* |
---|
107 | %{_mandir}/*/* |
---|
108 | %if %{with systemd} |
---|
109 | %{_unitdir}/irqbalance.service |
---|
110 | %else |
---|
111 | %config(noreplace) %{_sysconfdir}/rc.d/init.d/* |
---|
112 | %endif |
---|
113 | |
---|
114 | %changelog |
---|
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 | |
---|
120 | * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.0-1 |
---|
121 | - updated to 1.4.0. |
---|
122 | |
---|
123 | * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.0-1 |
---|
124 | - updated to 1.3.0. |
---|
125 | |
---|
126 | * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1 |
---|
127 | - update to 1.0.8 |
---|
128 | |
---|
129 | * Fri Mar 22 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.5-1 |
---|
130 | - update to 1.0.5 |
---|
131 | |
---|
132 | * Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.55-3 |
---|
133 | - add missing BuildRequires: imake |
---|
134 | |
---|
135 | * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 0.55-2 |
---|
136 | - rebuilt with rpm-4.8.1-3 |
---|
137 | |
---|
138 | * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.55-1vl5 |
---|
139 | - applied new versioning policy, spec in utf-8 |
---|
140 | |
---|
141 | * Sat Dec 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.55-0vl1 |
---|
142 | - update to irqbalance 0.55 from www.irqbalance.org |
---|
143 | - add patch0 from svn trunk(rev.19) |
---|
144 | |
---|
145 | * Fri Dec 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13-0vl2 |
---|
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 |
---|