]> git.pld-linux.org Git - packages/kernel-tools.git/blobdiff - kernel-tools.spec
- fixed libnuma BR
[packages/kernel-tools.git] / kernel-tools.spec
index 0898a9a03311089c6c088868bed99cbb2ab35f23..d36f0280df57685778cac770e76fb6c1c569f023 100644 (file)
@@ -1,30 +1,35 @@
 # TODO:
 # - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
-# -n python-perf?
+# - add -n python-perf?
+# - without perf bcond does not work (it still builds it)
+# - add bcond to disable building docs (perf docs)
+# - install of perf compiles things over again
 
 # Conditional build:
 %bcond_without verbose         # verbose build (V=1)
 %bcond_without perf            # perf tools
+%bcond_without gtk             # GTK+ 2.x perf support
 
-%define                rel             1
-%define                basever 3.8
-%define                postver .6
+%define                basever         3.16
+%define                postver         .2
 Summary:       Assortment of tools for the Linux kernel
 Summary(pl.UTF-8):     Zestaw narzędzi dla jądra Linuksa
 Name:          kernel-tools
 Version:       %{basever}%{postver}
-Release:       %{rel}
+Release:       1
 License:       GPL v2
 Group:         Applications/System
-Source0:       http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
-# Source0-md5: 1c738edfc54e7c65faeb90c436104e2f
+Source0:       https://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
+# Source0-md5: 5c569ed649a0c9711879f333e90c5386
 %if "%{postver}" != ".0"
-Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Patch0-md5:  ab255ca10073bbaab3218e024d9f8568
+Patch0:                https://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
+# Patch0-md5:  926e6e2ee0634ce53730701da749b040
 %endif
 Source1:       cpupower.service
 Source2:       cpupower.config
 URL:           http://www.kernel.org/
+BuildRequires: gettext-tools
+BuildRequires: pciutils-devel
 BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
@@ -33,21 +38,27 @@ BuildRequires:      asciidoc
 BuildRequires: audit-libs-devel
 BuildRequires: binutils-devel
 BuildRequires: bison
+BuildRequires: docbook-dtd45-xml
 BuildRequires: docbook-style-xsl
 BuildRequires: elfutils-devel
 BuildRequires: flex
-BuildRequires: gtk+2-devel >= 2.0
 BuildRequires: libunwind-devel >= 0.99
-BuildRequires: newt-devel
+BuildRequires: numactl-devel
 BuildRequires: perl-devel >= 5.1
-BuildRequires: pkgconfig
 BuildRequires: python-devel
 BuildRequires: rpm-pythonprov
 BuildRequires: slang-devel
 BuildRequires: xmlto
+%if %{with gtk}
+BuildRequires: gtk+2-devel >= 2.0
+BuildRequires: pkgconfig
+%endif
 %endif
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+# otherwise /usr/lib/rpm/bin/debugedit: canonicalization unexpectedly shrank by one character
+%define                _enable_debug_packages  0
+
 %define                makeopts        CC="%{__cc}" %{?with_verbose:V=1}
 
 %description
@@ -109,31 +120,35 @@ Development files for the cpupower library.
 %description cpupower-libs-devel -l pl.UTF-8
 Pliki programistyczne biblioteki cpupower.
 
-%package perf-core
-Summary:       perf profiler tool (core package)
-Summary(pl.UTF-8):     Narzędzie profilujące perf (podstawowe narzędzia)
+%package perf
+Summary:       perf profiler tool
+Summary(pl.UTF-8):     Narzędzie profilujące perf
 Group:         Applications/System
+Suggests:      binutils
+Obsoletes:     perf-core
+Obsoletes:     perf-slang
 
-%description perf-core
+%description perf
 Perf is a profiler tool for Linux 2.6+ based systems that abstracts
 away CPU hardware differences in Linux performance measurements and
 presents a simple commandline interface. Perf is based on the
 perf_events interface exported by recent versions of the Linux kernel.
 
-This package contains core files and scripts.
+This package contains core files, scripts and text interface (TUI).
 
-%description perf-core -l pl.UTF-8
+%description perf -l pl.UTF-8
 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
 odseparowujące od różnic sprzętowych między pomiarami wydajności w
 zależności od procesora oraz udostępniające prosty interfejs linii
 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
 przez nowe wersje jądra Linuksa.
 
-Ten pakiet zawiera podstawowe pliki i skrypty.
+Ten pakiet zawiera podstawowe pliki, skrypty oraz interfejs tekstowy
+(TUI).
 
 %package perf-gtk
-Summary:       perf profiler tool (GTK+ GUI)
-Summary(pl.UTF-8):     Narzędzie profilujące perf (interfejs graficzny GTK+)
+Summary:       perf profiler tool (GTK+ GUI)
+Summary(pl.UTF-8):     Narzędzie profilujące perf (interfejs graficzny GTK+ 2)
 Group:         X11/Applications
 Requires:      %{name}-perf-core = %{version}-%{release}
 Provides:      %{name}-perf = %{version}-%{release}
@@ -144,7 +159,7 @@ away CPU hardware differences in Linux performance measurements and
 presents a simple commandline interface. Perf is based on the
 perf_events interface exported by recent versions of the Linux kernel.
 
-This package contains GTK+ based GUI.
+This package contains GTK+ based GUI.
 
 %description perf-gtk -l pl.UTF-8
 Perf to narzędzie profilujące dla systemów opartych na Linuksie 2.6+,
@@ -153,7 +168,7 @@ zależności od procesora oraz udostępniające prosty interfejs linii
 poleceń. Perf jest oparty na interfejsie perf_events eksportowanym
 przez nowe wersje jądra Linuksa.
 
-Ten pakiet zawiera graficzny interfejs oparty na GTK+.
+Ten pakiet zawiera graficzny interfejs oparty na GTK+ 2.
 
 %package perf-slang
 Summary:       perf profiler tool (Slang TUI)
@@ -185,6 +200,9 @@ Summary(pl.UTF-8):  Bashowe uzupełnianie parametrów dla polecenia perf
 Group:         Applications/Shells
 Requires:      %{name}-perf
 Requires:      bash-completion
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
 %description -n bash-completion-perf
 Bash completion for perf command.
@@ -200,9 +218,14 @@ cd linux-%{basever}
 %patch0 -p1
 %endif
 
+sed -i -e 's#libexec/perf-core#%{_datadir}/perf-core#g' tools/perf/config/Makefile
+
 %build
 cd linux-%{basever}
 
+# Simple Disk Sleep Monitor
+%{__cc} %{rpmcppflags} %{rpmcflags} %{rpmldflags} Documentation/laptops/dslm.c -o dslm
+
 # cpupower
 %{__make} -C tools/power/cpupower \
        %{makeopts} \
@@ -226,34 +249,22 @@ cd linux-%{basever}
 %{__make} -C tools/power/x86/x86_energy_perf_policy \
        CC="%{__cc}" \
        CFLAGS="%{rpmcflags}"
+CFLAGS="%{rpmcflags}" \
 %{__make} -C tools/power/x86/turbostat \
-       CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -Wall"
+       CC="%{__cc}"
 %endif
 
-# slabinfo
-%{__make} -C tools/vm \
+# page-types, slabinfo
+%{__make} -C tools/vm page-types slabinfo \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -Wall -Wextra"
+       CFLAGS="%{rpmcflags} -Wall -Wextra -I../lib"
 
 %if %{with perf}
-# perf slang version
-PWD=${PWD:-$(pwd)}
-install -d $PWD/perf-{slang,gtk}
-%{__make} -C tools/perf all man \
-       O=$PWD/perf-slang \
-       NO_GTK2=1 \
-       %{makeopts} \
-       CFLAGS_OPTIMIZE="%{rpmcflags}" \
-       prefix=%{_prefix} \
-       perfexecdir=%{_datadir}/perf-core \
-       template_dir=%{_datadir}/perf-core/templates
-
-# perf gtk version
 %{__make} -C tools/perf all man \
-       O=$PWD/perf-gtk \
+       %{!?with_gtk:NO_GTK2=1} \
        %{makeopts} \
        CFLAGS_OPTIMIZE="%{rpmcflags}" \
+       WERROR=0 \
        prefix=%{_prefix} \
        perfexecdir=%{_datadir}/perf-core \
        template_dir=%{_datadir}/perf-core/templates
@@ -266,7 +277,9 @@ install -d $PWD/perf-{slang,gtk}
 
 %install
 rm -rf $RPM_BUILD_ROOT
+
 cd linux-%{basever}
+install -d $RPM_BUILD_ROOT%{_sbindir}
 
 %{__make} -C tools/power/cpupower install \
        DESTDIR=$RPM_BUILD_ROOT \
@@ -288,7 +301,9 @@ install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BU
 install -p tools/power/cpupower/debug/x86_64/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
 %endif
 
-install tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
+install -p tools/vm/slabinfo $RPM_BUILD_ROOT%{_bindir}
+install -p tools/vm/page-types $RPM_BUILD_ROOT%{_sbindir}
+install -p dslm $RPM_BUILD_ROOT%{_sbindir}
 
 %ifarch %{ix86} %{x8664}
 install -d $RPM_BUILD_ROOT%{_mandir}/man8
@@ -300,7 +315,7 @@ install -d $RPM_BUILD_ROOT%{_mandir}/man8
 %else
 cd tools/power/x86/x86_energy_perf_policy
 install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
-install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
 cd -
 %endif
 
@@ -311,51 +326,34 @@ cd -
        DESTDIR=$RPM_BUILD_ROOT
 %else
 cd tools/power/x86/turbostat
-install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
+cp -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
 cd -
 install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
 %endif
 %endif
 
 %if %{with perf}
-# perf slang
-PWD=${PWD:-$(pwd)}
-# perf slang version
 %{__make} -j1 install install-man \
        -C tools/perf \
-       O=$PWD/perf-slang \
-       NO_GTK2=1 \
+       %{!?with_gtk:NO_GTK2=1} \
        CC="%{__cc}" \
        CFLAGS_OPTIMIZE="%{rpmcflags}" \
+       WERROR=0 \
        %{?with_verbose:V=1} \
        prefix=%{_prefix} \
        perfexecdir=%{_datadir}/perf-core \
        template_dir=%{_datadir}/perf-core/templates \
        DESTDIR=$RPM_BUILD_ROOT
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
-
-# perf gtk
-%{__make} -j1 install install-man \
-       -C tools/perf \
-       O=$PWD/perf-gtk \
-       CC="%{__cc}" \
-       CFLAGS_OPTIMIZE="%{rpmcflags}" \
-       %{?with_verbose:V=1} \
-       prefix=%{_prefix} \
-       perfexecdir=%{_datadir}/perf-core \
-       template_dir=%{_datadir}/perf-core/templates \
-       DESTDIR=$RPM_BUILD_ROOT
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
 
 %py_comp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
 %py_ocomp $RPM_BUILD_ROOT%{_datadir}/perf-core/scripts/python
+
+%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
 %endif
 
 # gen_init_cpio
 install -p usr/gen_init_cpio $RPM_BUILD_ROOT%{_bindir}/gen_init_cpio
 
-rm -r $RPM_BUILD_ROOT%{_datadir}/perf-core/tests
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -375,6 +373,8 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/gen_init_cpio
 %attr(755,root,root) %{_bindir}/slabinfo
+%attr(755,root,root) %{_sbindir}/dslm
+%attr(755,root,root) %{_sbindir}/page-types
 %ifarch %{ix86} %{x8664}
 %attr(755,root,root) %{_bindir}/centrino-decode
 %attr(755,root,root) %{_bindir}/powernow-k8-decode
@@ -404,8 +404,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/cpufreq.h
 
 %if %{with perf}
-%files perf-core
+%files perf
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/perf
+%attr(755,root,root) %{_bindir}/trace
 %{_mandir}/man1/perf*.1*
 %dir %{_datadir}/perf-core
 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
@@ -432,13 +434,15 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
 %{_datadir}/perf-core/scripts/python/*.py*
 
-%files perf-gtk
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf_gtk
+%dir %{_libdir}/traceevent
+%dir %{_libdir}/traceevent/plugins
+%attr(755,root,root) %{_libdir}/traceevent/plugins/plugin_*.so
 
-%files perf-slang
+%if %{with gtk}
+%files perf-gtk
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf_slang
+%attr(755,root,root) %{_libdir}/libperf-gtk.so
+%endif
 
 %files -n bash-completion-perf
 %defattr(644,root,root,755)
This page took 0.131051 seconds and 4 git commands to generate.