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