]> git.pld-linux.org Git - packages/kernel-tools.git/blobdiff - kernel-tools.spec
- updated md5
[packages/kernel-tools.git] / kernel-tools.spec
index 6714408e99cae76e25e7515761fa6485ce2b0a39..0ccdc9a855cb941b87d8b265e7b50a085895c8c7 100644 (file)
@@ -1,14 +1,18 @@
 # 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 perf version
 
 %define                rel             1
-%define                basever 3.7
-%define                postver .1
+%define                basever 3.10
+%define                postver .19
 Summary:       Assortment of tools for the Linux kernel
 Summary(pl.UTF-8):     Zestaw narzędzi dla jądra Linuksa
 Name:          kernel-tools
@@ -17,14 +21,16 @@ Release:    %{rel}
 License:       GPL v2
 Group:         Applications/System
 Source0:       http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
-# Source0-md5: 21223369d682bcf44bcdfe1521095983
+# Source0-md5: 4f25cd5bec5f8d5a7d935b3f2ccb8481
 %if "%{postver}" != ".0"
-Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
-# Patch0-md5:  c391dc1a1b4dae81aaef6f08a0594813
+Patch0:                http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.xz
+# Patch0-md5:  b7f932eecbbf5636ad69add480fa1573
 %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,18 +39,20 @@ 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: 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)
 
@@ -183,7 +191,7 @@ Ten pakiet zawiera tekstowy interfejs oparty na bibliotece Slang.
 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:      %{name}-perf
 Requires:      bash-completion
 
 %description -n bash-completion-perf
@@ -203,6 +211,9 @@ cd linux-%{basever}
 %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} \
@@ -228,13 +239,13 @@ cd linux-%{basever}
        CFLAGS="%{rpmcflags}"
 %{__make} -C tools/power/x86/turbostat \
        CC="%{__cc}" \
-       CFLAGS="%{rpmcflags} -Wall"
+       CFLAGS="%{rpmcflags} -Wall -I../../../../arch/x86/include/uapi/"
 %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
@@ -245,19 +256,23 @@ install -d $PWD/perf-{slang,gtk}
        NO_GTK2=1 \
        %{makeopts} \
        CFLAGS_OPTIMIZE="%{rpmcflags}" \
+       WERROR=0 \
        prefix=%{_prefix} \
        perfexecdir=%{_datadir}/perf-core \
        template_dir=%{_datadir}/perf-core/templates
 
+%if %{with gtk}
 # perf gtk version
 %{__make} -C tools/perf all man \
        O=$PWD/perf-gtk \
        %{makeopts} \
        CFLAGS_OPTIMIZE="%{rpmcflags}" \
+       WERROR=0 \
        prefix=%{_prefix} \
        perfexecdir=%{_datadir}/perf-core \
        template_dir=%{_datadir}/perf-core/templates
 %endif
+%endif
 
 # gen_init_cpio
 %{__make} -C usr gen_init_cpio \
@@ -266,7 +281,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 +305,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 +319,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,9 +330,9 @@ cd -
        DESTDIR=$RPM_BUILD_ROOT
 %else
 cd tools/power/x86/turbostat
-install -p turbostat $RPM_BUILD_ROOT%{_bindir}/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
 
@@ -327,28 +346,34 @@ PWD=${PWD:-$(pwd)}
        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}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_slang}
 
+%if %{with gtk}
 # perf gtk
 %{__make} -j1 install install-man \
        -C tools/perf \
        O=$PWD/perf-gtk \
        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{,-gtk}
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/perf{,_gtk}
+%endif
 
 %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
@@ -373,6 +398,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
@@ -430,13 +457,15 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_datadir}/perf-core/scripts/python/bin/*
 %{_datadir}/perf-core/scripts/python/*.py*
 
+%if %{with gtk}
 %files perf-gtk
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf-gtk
+%attr(755,root,root) %{_bindir}/perf_gtk
+%endif
 
 %files perf-slang
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/perf-slang
+%attr(755,root,root) %{_bindir}/perf_slang
 
 %files -n bash-completion-perf
 %defattr(644,root,root,755)
This page took 0.176178 seconds and 4 git commands to generate.