%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_ver: %define python_ver %(%{__python} -c "import sys ; print sys.version[:3]")} Name: tuna Version: 0.13.1 Release: 7 Summary: Application tuning GUI & command line utility License: GPLv2 URL: https://rt.wiki.kernel.org/index.php/Tuna Source: https://www.kernel.org/pub/software/utils/%{name}/%{name}-%{version}.tar.xz BuildArch: noarch BuildRequires: python2-devel gettext Requires: python2-ethtool python2-linux-procfs >= 0.4.5 python2-schedutils >= 0.2 %description Provides interface to change the scheduler and IRQ tunables across the CPU and below per thread/IRQ level. Allows the CPU to be isolated for specific applications and drag and drop threads and interrupts to the CPU. You can complete the operation on the CPU socket to understand the CPU topology. Can be used as a command line utility without installing a GUI library. %package -n oscilloscope Summary: Generic graphical signal plotting tool Requires: python2-matplotlib python2-matplotlib-gtk python2-numpy pygtk2 Requires: tuna = %{version}-%{release} %description -n oscilloscope Plot stream of values read from standard input on the screen, along with statistics and histograms. Allows instant viewing of how signal generators (e.g. loop tests, signaltests or even pings) react when using tuna or regular chrt & taskket to change their scheduling strategy or real-time priorities. %package help Summary: doc for %{name} %description help Man manual document for tuna %prep %autosetup -p1 -n %{name}-%{version} %build %{__python} setup.py build %install %{__python} setup.py install --skip-build --root %{buildroot} install -d %{buildroot}/{%{_bindir},%{_datadir}/tuna/help/kthreads} install -p -m644 tuna/tuna_gui.glade %{buildroot}/%{_datadir}/tuna/ install -p -m755 tuna-cmd.py %{buildroot}/%{_bindir}/tuna install -p -m755 oscilloscope-cmd.py %{buildroot}/%{_bindir}/oscilloscope install -p -m644 help/kthreads/* %{buildroot}/%{_datadir}/tuna/help/kthreads/ install -Dp -m644 etc/tuna.conf %{buildroot}/%{_sysconfdir}/tuna.conf install -Dp -m644 org.tuna.policy %{buildroot}/%{_datadir}/polkit-1/actions/org.tuna.policy install -Dp -m644 docs/tuna.8 %{buildroot}/%{_mandir}/man8/tuna.8 install -Dp -m644 etc/tuna/example.conf %{buildroot}/%{_sysconfdir}/tuna/example.conf for lng in `cat po/LINGUAS`; do po=po/"$lng.po" install -d %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES msgfmt $po -o %{buildroot}/%{_datadir}/locale/${lng}/LC_MESSAGES/%{name}.mo done %find_lang tuna %files -f tuna.lang %defattr(-,root,root,-) %if "%{python_ver}" >= "2.5" %{python_sitelib}/*.egg-info %endif %{_bindir}/tuna %{_datadir}/tuna/ %{python_sitelib}/tuna/ %{_sysconfdir}/{tuna.conf,tuna/*} %{_datadir}/polkit-1/actions/org.tuna.policy %files -n oscilloscope %defattr(-,root,root,-) %{_bindir}/oscilloscope %doc docs/{oscilloscope+tuna.html,oscilloscope+tuna.pdf} %files help %{_mandir}/man8/tuna.8* %doc ChangeLog %changelog * Thu Mar 5 2020 dingyiming - 0.13.1-7 - Package init