]> git.pld-linux.org Git - packages/kernel-tools.git/blobdiff - kernel-tools.spec
- rel 2; use perf_xxx for slang/gtk commands (instead of perf-xxx), so it detects...
[packages/kernel-tools.git] / kernel-tools.spec
index 5c5ca78443d9f804216e1638c202e3ec195d571a..7799895a051ade28fbdab16dcf2f7c2c1da8b961 100644 (file)
@@ -1,17 +1,14 @@
-# TODO
-# - unpackaged: /etc/bash_completion.d/perf
-# - BR deps for -perf
-# - asciidoc used at install stage of perf (should build doc in build section)
-# - different packages for perf-slang and perf-gtk
+# TODO:
+# - redefine: PACKAGE_BUGREPORT=cpufreq@vger.kernel.org
+# -n python-perf?
 
-#
 # Conditional build:
 %bcond_without verbose         # verbose build (V=1)
-%bcond_with    perf            # perf tools (unfinished)
+%bcond_without perf            # perf tools
 
-%define                rel             0.5
+%define                rel             2
 %define                basever 3.7
-%define                postver .1
+%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
@@ -23,16 +20,28 @@ Source0:    http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
 # Source0-md5: 21223369d682bcf44bcdfe1521095983
 %if "%{postver}" != ".0"
 Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Patch0-md5:  c391dc1a1b4dae81aaef6f08a0594813
+# Patch0-md5:  b88977838a2a52ff4fb4e82b30726496
 %endif
 Source1:       cpupower.service
 Source2:       cpupower.config
+URL:           http://www.kernel.org/
 BuildRequires: rpmbuild(macros) >= 1.647
 BuildRequires: tar >= 1:1.22
 BuildRequires: xz
 %if %{with perf}
 BuildRequires: asciidoc
+BuildRequires: audit-libs-devel
+BuildRequires: binutils-devel
+BuildRequires: bison
+BuildRequires: docbook-style-xsl
+BuildRequires: elfutils-devel
+BuildRequires: flex
+BuildRequires: gtk+2-devel >= 2.0
+BuildRequires: libunwind-devel >= 0.99
 BuildRequires: newt-devel
+BuildRequires: perl-devel >= 5.1
+BuildRequires: pkgconfig
+BuildRequires: python-devel
 BuildRequires: rpm-pythonprov
 BuildRequires: slang-devel
 BuildRequires: xmlto
@@ -54,6 +63,7 @@ Summary:      cpupower - Shows and sets processor power related values
 Summary(pl.UTF-8):     cpupower - wyświetlanie i ustawianie wartości związanych z zużyciem energii przez procesor
 Group:         Applications/System
 Requires(post,preun,postun):   systemd-units >= 38
+Requires:      %{name}-cpupower-libs = %{version}-%{release}
 Requires:      systemd-units >= 0.38
 Provides:      cpufreq-utils = 1:009-0.6.p1
 Provides:      cpufrequtils = 1:009-0.6.p1
@@ -62,7 +72,6 @@ Obsoletes:    cpufreq-utils < 1:009-0.6.p1
 Obsoletes:     cpufrequtils < 1:009-0.6.p1
 Obsoletes:     cpupowerutils < 1:009-0.6.p1
 Obsoletes:     cpuspeed < 1:1.5-16
-Requires:      %{name}-cpupower-libs = %{version}-%{release}
 
 %description cpupower
 cpupower is a collection of tools to examine and tune power saving
@@ -89,7 +98,9 @@ Summary(pl.UTF-8):    Pliki programistyczne biblioteki cpupower
 Group:         Development/Libraries
 Requires:      %{name} = %{version}-%{release}
 Requires:      %{name}-cpupower-libs = %{version}-%{release}
+Provides:      cpufrequtils-devel = 1:009-0.6.p1
 Provides:      cpupowerutils-devel = 1:009-0.6.p1
+Obsoletes:     cpufrequtils-devel < 1:009-0.6.p1
 Obsoletes:     cpupowerutils-devel < 1:009-0.6.p1
 
 %description cpupower-libs-devel
@@ -98,24 +109,89 @@ Development files for the cpupower library.
 %description cpupower-libs-devel -l pl.UTF-8
 Pliki programistyczne biblioteki cpupower.
 
-%package perf
-Summary:       perf profiler tool
-Summary(pl.UTF-8):     Narzędzie profilujące perf
+%package perf-core
+Summary:       perf profiler tool (core package)
+Summary(pl.UTF-8):     Narzędzie profilujące perf (podstawowe narzędzia)
 Group:         Applications/System
 
-%description perf
+%description perf-core
+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.
+
+%description perf-core -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.
+
+%package perf-gtk
+Summary:       perf profiler tool (GTK+ GUI)
+Summary(pl.UTF-8):     Narzędzie profilujące perf (interfejs graficzny GTK+)
+Group:         X11/Applications
+Requires:      %{name}-perf-core = %{version}-%{release}
+Provides:      %{name}-perf = %{version}-%{release}
+
+%description perf-gtk
 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.
 
-%description perf -l pl.UTF-8
+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+,
 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 graficzny interfejs oparty na GTK+.
+
+%package perf-slang
+Summary:       perf profiler tool (Slang TUI)
+Summary(pl.UTF-8):     Narzędzie profilujące perf (interfejs tekstowy Slang)
+Group:         X11/Applications
+Requires:      %{name}-perf-core = %{version}-%{release}
+Provides:      %{name}-perf = %{version}-%{release}
+
+%description perf-slang
+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 Slang based TUI.
+
+%description perf-slang -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 tekstowy interfejs oparty na bibliotece Slang.
+
+%package -n bash-completion-perf
+Summary:       Bash completion for perf command
+Summary(pl.UTF-8):     Bashowe uzupełnianie parametrów dla polecenia perf
+Group:         Applications/Shells
+Requires:      %{name}-perf = %{version}-%{release}
+Requires:      bash-completion
+
+%description -n bash-completion-perf
+Bash completion for perf command.
+
+%description -n bash-completion-perf -l pl.UTF-8
+Bashowe uzupełnianie parametrów dla polecenia perf.
+
 %prep
 %setup -qc
 cd linux-%{basever}
@@ -130,41 +206,54 @@ cd linux-%{basever}
 # cpupower
 %{__make} -C tools/power/cpupower \
        %{makeopts} \
-       CPUFREQ_BENCH=false
+       CPUFREQ_BENCH=false \
+       OPTIMIZATION="%{rpmcflags}" \
+       STRIPCMD=true
 
 %ifarch %{ix86}
 %{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
-       %{makeopts} \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 %endif
 
 %ifarch %{x8664}
 %{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
-       %{makeopts}
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 %endif
 
 %ifarch %{ix86} %{x8664}
 %{__make} -C tools/power/x86/x86_energy_perf_policy \
-       %{makeopts}
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 %{__make} -C tools/power/x86/turbostat \
-       %{makeopts}
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -Wall"
 %endif
 
+# slabinfo
+%{__make} -C tools/vm \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags} -Wall -Wextra"
+
 %if %{with perf}
 # perf slang version
 PWD=${PWD:-$(pwd)}
 install -d $PWD/perf-{slang,gtk}
-%{__make} -C tools/perf \
+%{__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 \
+%{__make} -C tools/perf all man \
        O=$PWD/perf-gtk \
        %{makeopts} \
+       CFLAGS_OPTIMIZE="%{rpmcflags}" \
        prefix=%{_prefix} \
        perfexecdir=%{_datadir}/perf-core \
        template_dir=%{_datadir}/perf-core/templates
@@ -173,6 +262,7 @@ install -d $PWD/perf-{slang,gtk}
 # gen_init_cpio
 %{__make} -C usr gen_init_cpio \
        %{makeopts} \
+       CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -192,18 +282,14 @@ cp -p %{SOURCE1} $RPM_BUILD_ROOT%{systemdunitdir}/cpupower.service
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/cpupower
 
 %ifarch %{ix86}
-cd tools/power/cpupower/debug/i386
-install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
-install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
-cd -
+install -p tools/power/cpupower/debug/i386/{centrino,powernow-k8}-decode $RPM_BUILD_ROOT%{_bindir}
 %endif
 %ifarch %{x8664}
-cd tools/power/cpupower/debug/x86_64
-install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
-install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
-cd -
+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}
+
 %ifarch %{ix86} %{x8664}
 install -d $RPM_BUILD_ROOT%{_mandir}/man8
 # broken makefile, install manually
@@ -240,22 +326,29 @@ PWD=${PWD:-$(pwd)}
        O=$PWD/perf-slang \
        NO_GTK2=1 \
        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{,_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
 %endif
 
 # gen_init_cpio
@@ -278,6 +371,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/gen_init_cpio
+%attr(755,root,root) %{_bindir}/slabinfo
 %ifarch %{ix86} %{x8664}
 %attr(755,root,root) %{_bindir}/centrino-decode
 %attr(755,root,root) %{_bindir}/powernow-k8-decode
@@ -288,7 +383,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man8/turbostat.8*
 %{_mandir}/man8/x86_energy_perf_policy.8*
 %endif
-%attr(755,root,root) %{_bindir}/gen_init_cpio
 
 %files cpupower -f cpupower.lang
 %defattr(644,root,root,755)
@@ -308,9 +402,8 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/cpufreq.h
 
 %if %{with perf}
-%files perf
+%files perf-core
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf
 %{_mandir}/man1/perf*.1*
 %dir %{_datadir}/perf-core
 %attr(755,root,root) %{_datadir}/perf-core/perf-archive
@@ -332,8 +425,20 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib
 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf
 %dir %{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace
-%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py
+%{_datadir}/perf-core/scripts/python/Perf-Trace-Util/lib/Perf/Trace/*.py*
 %dir %{_datadir}/perf-core/scripts/python/bin
 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
-%{_datadir}/perf-core/scripts/python/*.py
+%{_datadir}/perf-core/scripts/python/*.py*
+
+%files perf-gtk
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/perf_gtk
+
+%files perf-slang
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/perf_slang
+
+%files -n bash-completion-perf
+%defattr(644,root,root,755)
+/etc/bash_completion.d/perf
 %endif
This page took 0.070886 seconds and 4 git commands to generate.