]> git.pld-linux.org Git - packages/irqbalance.git/blame - irqbalance.spec
- added systemd bcond
[packages/irqbalance.git] / irqbalance.spec
CommitLineData
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 6Summary: Balancing of IRQs between multiple CPUs
d77fb2e0 7Summary(pl.UTF-8): Rozdzielanie IRQ pomiędzy wiele procesorów
7ca69a96 8Name: irqbalance
17214427 9Version: 1.0.9
ac147422 10Release: 1
5b194ad8 11License: GPL v2
41c79ca6 12Group: Daemons
17214427
AM
13Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz
14# Source0-md5: 30174d3941c5452a1e4ecee394a76ff8
d763f13c 15Source1: %{name}.init
67f82f96
PG
16Source2: %{name}.sysconfig
17Source3: %{name}.service
17214427 18URL: https://github.com/Irqbalance/irqbalance
bfc0a2d1 19BuildRequires: autoconf >= 2.50
17214427 20BuildRequires: automake
5b194ad8 21BuildRequires: glib2-devel >= 1:2.28
17214427 22BuildRequires: libtool
edeee08c 23# due to -fpie
e7790d55 24BuildRequires: gcc >= 5:3.4
19e2b417 25BuildRequires: libcap-ng-devel
b081b6e4 26%{?with_numa:BuildRequires: numactl-devel}
d8794f4c 27BuildRequires: pkgconfig
a455a3a6 28BuildRequires: rpmbuild(macros) >= 1.647
bfc0a2d1 29%{?with_systemd:BuildRequires: systemd-devel}
bae0186f 30Requires(post,preun): /sbin/chkconfig
a455a3a6 31Requires(post,preun,postun): systemd-units >= 38
5b194ad8 32Requires: glib2 >= 1:2.28
84afc4b1 33Requires: rc-scripts
a455a3a6 34Requires: systemd-units >= 38
7ca69a96
AM
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
23ff0f78
PG
38irqbalance is a daemon that evenly distributes IRQ load across
39multiple CPUs for enhanced performance.
7ca69a96 40
df4bda38 41%description -l pl.UTF-8
e2fe7524
AM
42Narzędzie do rozdzielania przerwań IRQ pomiędzy wiele procesorów w
43celu 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
60rm -rf $RPM_BUILD_ROOT
19e2b417 61install -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
67cp -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
68cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
69cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}
7ca69a96
AM
70
71%clean
72rm -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
80if [ "$1" = "0" ]; then
84afc4b1
ER
81 %service irqbalance stop
82 /sbin/chkconfig --del irqbalance
d763f13c 83fi
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*
This page took 0.383559 seconds and 4 git commands to generate.