]>
Commit | Line | Data |
---|---|---|
b081b6e4 | 1 | # |
2251678a | 2 | # Conditional build: |
b081b6e4 MM |
3 | %bcond_without numa # disable NUMA support |
4 | # | |
7ca69a96 | 5 | Summary: Balancing of IRQs between multiple CPUs |
d77fb2e0 | 6 | Summary(pl.UTF-8): Rozdzielanie IRQ pomiędzy wiele procesorów |
7ca69a96 | 7 | Name: irqbalance |
aaf6d1c9 | 8 | Version: 1.0.4 |
b081b6e4 | 9 | Release: 2 |
5b194ad8 | 10 | License: GPL v2 |
41c79ca6 | 11 | Group: Daemons |
aaf6d1c9 MM |
12 | Source0: http://irqbalance.googlecode.com/files/%{name}-%{version}.tar.bz2 |
13 | # Source0-md5: f7ca283c46331db73f27e686a643dcfb | |
d763f13c | 14 | Source1: %{name}.init |
67f82f96 PG |
15 | Source2: %{name}.sysconfig |
16 | Source3: %{name}.service | |
19e2b417 | 17 | URL: http://code.google.com/p/irqbalance/ |
5b194ad8 | 18 | BuildRequires: glib2-devel >= 1:2.28 |
edeee08c | 19 | # due to -fpie |
e7790d55 | 20 | BuildRequires: gcc >= 5:3.4 |
19e2b417 | 21 | BuildRequires: libcap-ng-devel |
b081b6e4 | 22 | %{?with_numa:BuildRequires: numactl-devel} |
d8794f4c | 23 | BuildRequires: pkgconfig |
a455a3a6 | 24 | BuildRequires: rpmbuild(macros) >= 1.647 |
bae0186f | 25 | Requires(post,preun): /sbin/chkconfig |
a455a3a6 | 26 | Requires(post,preun,postun): systemd-units >= 38 |
5b194ad8 | 27 | Requires: glib2 >= 1:2.28 |
84afc4b1 | 28 | Requires: rc-scripts |
a455a3a6 | 29 | Requires: systemd-units >= 38 |
7ca69a96 AM |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
23ff0f78 PG |
33 | irqbalance is a daemon that evenly distributes IRQ load across |
34 | multiple CPUs for enhanced performance. | |
7ca69a96 | 35 | |
df4bda38 | 36 | %description -l pl.UTF-8 |
e2fe7524 AM |
37 | Narzędzie do rozdzielania przerwań IRQ pomiędzy wiele procesorów w |
38 | celu zwiększenia wydajności systemu. | |
cf0d64ca | 39 | |
7ca69a96 | 40 | %prep |
a19410e5 | 41 | %setup -q |
7ca69a96 AM |
42 | |
43 | %build | |
19e2b417 | 44 | %configure \ |
b081b6e4 | 45 | %{!?with_numa:--disable-numa} \ |
2251678a | 46 | --with-libcap-ng |
7ca69a96 AM |
47 | |
48 | %install | |
49 | rm -rf $RPM_BUILD_ROOT | |
19e2b417 | 50 | install -d $RPM_BUILD_ROOT%{systemdunitdir} \ |
67f82f96 | 51 | $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
7ca69a96 | 52 | |
19e2b417 AM |
53 | %{__make} install \ |
54 | DESTDIR=$RPM_BUILD_ROOT | |
55 | ||
d763f13c | 56 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
67f82f96 PG |
57 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} |
58 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir} | |
7ca69a96 AM |
59 | |
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
d763f13c AM |
63 | %post |
64 | /sbin/chkconfig --add irqbalance | |
84afc4b1 | 65 | %service irqbalance restart "irqbalance daemon" |
67f82f96 | 66 | %systemd_post irqbalance.service |
d763f13c AM |
67 | |
68 | %preun | |
69 | if [ "$1" = "0" ]; then | |
84afc4b1 ER |
70 | %service irqbalance stop |
71 | /sbin/chkconfig --del irqbalance | |
d763f13c | 72 | fi |
67f82f96 PG |
73 | %systemd_preun irqbalance.service |
74 | ||
75 | %postun | |
76 | %systemd_reload | |
d763f13c | 77 | |
3fef12a7 PG |
78 | %triggerpostun -- irqbalance < 0.55-4 |
79 | %systemd_trigger irqbalance.service | |
80 | ||
7ca69a96 AM |
81 | %files |
82 | %defattr(644,root,root,755) | |
2251678a JB |
83 | %doc AUTHORS |
84 | %attr(755,root,root) %{_sbindir}/irqbalance | |
d763f13c | 85 | %attr(754,root,root) /etc/rc.d/init.d/irqbalance |
67f82f96 PG |
86 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} |
87 | %{systemdunitdir}/irqbalance.service | |
19e2b417 | 88 | %{_mandir}/man1/irqbalance.1* |