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