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