irqbalance-vl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. %bcond_with systemd
  2. Summary: Daemon to balance irq's across multiple CPUs/Cores.
  3. Summary(ja): 複数の CPU 間で IRQ をバランスさせるためのデーモン
  4. Name: irqbalance
  5. Version: 1.7.0
  6. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: GPLv3
  11. URL: https://irqbalance.github.io/irqbalance/
  12. Source0: https://github.com/Irqbalance/irqbalance/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
  13. Source1: %{name}.init
  14. Source2: %{name}.sysconfig
  15. Source100: %{name}.sysconfig.systemd
  16. Patch1: %{name}-1.7.0-env-file-path.patch
  17. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  18. BuildRequires: autoconf automake libtool
  19. BuildRequires: glib2-devel pkgconfig libcap-ng-devel
  20. BuildRequires: ncurses-devel
  21. %if %{with systemd}
  22. %{?systemd_requires}
  23. %else
  24. Requires(post): chkconfig initscripts
  25. Requires(preun): chkconfig initscripts
  26. Requires(postun): initscripts
  27. %endif
  28. %description
  29. irqbalance is a daemon that evenly distributes IRQ load across
  30. multiple CPUs for enhanced performance.
  31. %debug_package
  32. %prep
  33. %setup -q
  34. %patch1 -p1
  35. %build
  36. ./autogen.sh
  37. %configure
  38. CFLAGS="%{optflags}" %__make %{?_smp_mflags}
  39. %install
  40. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  41. mkdir -p %{buildroot}%{_sbindir}
  42. install irqbalance %{buildroot}%{_sbindir}
  43. mkdir -p %{buildroot}%{_mandir}/man1
  44. install irqbalance.1 %{buildroot}%{_mandir}/man1/
  45. %if %{with systemd}
  46. install -Dpm0644 ./misc/irqbalance.service %{buildroot}/%{_unitdir}/irqbalance.service
  47. install -Dpm644 %{SOURCE100} %{buildroot}%{_sysconfdir}/sysconfig/irqbalance
  48. %else
  49. install -Dpm755 %{SOURCE1} $RPM_BUILD_ROOT%{_initdir}/irqbalance
  50. install -Dpm644 %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/irqbalance
  51. %endif
  52. %clean
  53. [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
  54. %post
  55. %if %{with systemd}
  56. %systemd_post irqbalance.service
  57. %else
  58. if [ $1 = 1 ]; then
  59. /sbin/chkconfig --add irqbalance
  60. fi
  61. %endif
  62. %preun
  63. %if %{with systemd}
  64. %systemd_preun irqbalance.service
  65. %else
  66. if [ $1 = 0 -o -x /bin/systemctl ]; then
  67. /sbin/service irqbalance stop > /dev/null 2>&1
  68. /sbin/chkconfig --del irqbalance
  69. fi
  70. %endif
  71. %postun
  72. %if %{with systemd}
  73. %systemd_postun_with_restart irqbalance.service
  74. %else
  75. if [ $1 -ge 1 ]; then
  76. /sbin/service irqbalance condrestart > /dev/null 2>&1 ||:
  77. fi
  78. %endif
  79. %files
  80. %defattr(-,root,root)
  81. %license COPYING
  82. %doc AUTHORS
  83. %config(noreplace) %{_sysconfdir}/sysconfig/*
  84. %{_sbindir}/*
  85. %{_mandir}/*/*
  86. %if %{with systemd}
  87. %{_unitdir}/irqbalance.service
  88. %else
  89. %config(noreplace) %{_sysconfdir}/rc.d/init.d/*
  90. %endif
  91. %changelog
  92. * Mon Mar 01 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.0-1
  93. - updated to 1.7.0.
  94. - updated Patch1.
  95. - add systemd support (disabled as default).
  96. * Mon Mar 30 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.4.0-1
  97. - updated to 1.4.0.
  98. * Sat Feb 24 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.3.0-1
  99. - updated to 1.3.0.
  100. * Mon Jan 12 2015 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.0.8-1
  101. - update to 1.0.8
  102. * Fri Mar 22 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.0.5-1
  103. - update to 1.0.5
  104. * Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.55-3
  105. - add missing BuildRequires: imake
  106. * Sun Apr 17 2011 Shu KONNO <owa@bg.wakwak.com> 0.55-2
  107. - rebuilt with rpm-4.8.1-3
  108. * Fri Aug 15 2008 Shu KONNO <owa@bg.wakwak.com> 0.55-1vl5
  109. - applied new versioning policy, spec in utf-8
  110. * Sat Dec 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.55-0vl1
  111. - update to irqbalance 0.55 from www.irqbalance.org
  112. - add patch0 from svn trunk(rev.19)
  113. * Fri Dec 15 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13-0vl2
  114. - update irqbalance.init
  115. - do not start irqbalance on non-SMP system.
  116. - do not "killproc" if irqbalance is not running.
  117. * Thu Nov 16 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 0.13-0vl1
  118. - new upstream release
  119. - change Group to System Environment/Base
  120. - add manpage
  121. * Mon Jan 17 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 0.12-0vl1
  122. - new upstream release
  123. * Sun Aug 29 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 0.09-0vl1
  124. - initial build for Vine Linux
  125. * Tue Jun 01 2004 Marcel Pol <mpol@mandrake.org> 0.09-1mdk
  126. - 0.09
  127. * Tue Sep 09 2003 Marcel Pol <mpol@gmx.net> 0.06-1mdk
  128. - initial mandrake contrib
  129. Patch2: irqbalance-norebalance-zeroints.patch
  130. Patch3: irqbalance-classes.patch
  131. Patch4: irqbalance-oneshot.patch