]> git.pld-linux.org Git - packages/kernel-tools.git/blame - kernel-tools.spec
from kernel 3.5.7
[packages/kernel-tools.git] / kernel-tools.spec
CommitLineData
49fba13a
ER
1#
2# Conditional build:
3%bcond_without verbose # verbose build (V=1)
4
5%define rel 0.1
ea56b4b8
ER
6%define basever 3.5
7%define postver .7
49fba13a
ER
8Summary: Assortment of tools for the Linux kernel
9Name: kernel-tools
10Version: %{basever}%{postver}
11Release: %{rel}
12License: GPL v2
13Group: Base
14Source0: http://www.kernel.org/pub/linux/kernel/v3.x/linux-%{basever}.tar.xz
ea56b4b8 15# Source0-md5: 24153eaaa81dedc9481ada8cd9c3b83d
49fba13a
ER
16%if "%{postver}" != ".0"
17Patch0: http://www.kernel.org/pub/linux/kernel/v3.x/patch-%{version}.bz2
ea56b4b8 18# Patch0-md5: f908f8c222cf4a1988b8bf180df46bb2
49fba13a
ER
19%endif
20BuildRequires: tar >= 1:1.22
21BuildRequires: xz
22Requires: %{name}-libs = %{version}-%{release}
23Provides: cpufreq-utils = 1:009-0.6.p1
24Provides: cpufrequtils = 1:009-0.6.p1
25Provides: cpupowerutils = 1:009-0.6.p1
26Obsoletes: cpufreq-utils < 1:009-0.6.p1
27Obsoletes: cpufrequtils < 1:009-0.6.p1
28Obsoletes: cpupowerutils < 1:009-0.6.p1
29Obsoletes: cpuspeed < 1:1.5-16
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33This package contains the tools/ directory from the kernel source and
34the supporting documentation.
35
36%package libs
37Summary: Libraries for the kernels-tools
38License: GPL v2
39Group: Libraries
40
41%description libs
42This package contains the libraries built from the tools/ directory
43from the kernel source.
44
45%package libs-devel
46Summary: Assortment of tools for the Linux kernel
47License: GPL v2
48Group: Development/Libraries
49Requires: kernel-tools = %{version}-%{release}
50Requires: kernel-tools-libs = %{version}-%{release}
51Provides: cpupowerutils-devel = 1:009-0.6.p1
52Provides: kernel-tools-devel
53Obsoletes: cpupowerutils-devel < 1:009-0.6.p1
54
55%description libs-devel
56This package contains the development files for the tools/ directory
57from the kernel source.
58
59%prep
60%setup -qc
61cd linux-%{basever}
62
63%if "%{postver}" != ".0"
64%patch0 -p1
65%endif
66
67%build
68cd linux-%{basever}
69
70# cpupower
71%{__make} -C tools/power/cpupower \
72 CC="%{__cc}" \
73 %{?with_verbose:V=1} \
74 CPUFREQ_BENCH=false
75
76%ifarch %{ix86}
77%{__make} -C tools/power/cpupower/debug/i386 centrino-decode powernow-k8-decode \
78 CC="%{__cc}" \
79 %{?with_verbose:V=1}
80%endif
81
82%ifarch %{x8664}
83%{__make} -C tools/power/cpupower/debug/x86_64 centrino-decode powernow-k8-decode \
84 CC="%{__cc}" \
85 %{?with_verbose:V=1}
86%endif
87
88%ifarch %{ix86} %{x8664}
89%{__make} -C tools/power/x86/x86_energy_perf_policy \
90 CC="%{__cc}" \
91 %{?with_verbose:V=1}
92%{__make} -C tools/power/x86/turbostat \
93 CC="%{__cc}" \
94 %{?with_verbose:V=1}
95%endif
96
97%install
98rm -rf $RPM_BUILD_ROOT
99cd linux-%{basever}
100
101%{__make} -C tools/power/cpupower install \
102 DESTDIR=$RPM_BUILD_ROOT \
103 libdir=%{_libdir} \
104 mandir=%{_mandir} \
105 CPUFREQ_BENCH=false
106
107%find_lang cpupower
108mv cpupower.lang ..
109
110%ifarch %{ix86}
111cd tools/power/cpupower/debug/i386
112install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
113install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
114cd -
115%endif
116%ifarch %{x8664}
117cd tools/power/cpupower/debug/x86_64
118install -p centrino-decode $RPM_BUILD_ROOT%{_bindir}/centrino-decode
119install -p powernow-k8-decode $RPM_BUILD_ROOT%{_bindir}/powernow-k8-decode
120cd -
121%endif
122
123%ifarch %{ix86} %{x8664}
124install -d $RPM_BUILD_ROOT%{_mandir}/man8
125# broken makefile, install manually
126%if 0
127%{__make} install \
128 -C tools/power/x86/x86_energy_perf_policy \
129 DESTDIR=$RPM_BUILD_ROOT
130%else
131cd tools/power/x86/x86_energy_perf_policy
132install -p x86_energy_perf_policy $RPM_BUILD_ROOT%{_bindir}
133install -p x86_energy_perf_policy.8 $RPM_BUILD_ROOT%{_mandir}/man8
134cd -
135%endif
136
137# broken makefile, install manually
138%if 0
139%{__make} install \
140 -C tools/power/x86/turbostat \
141 DESTDIR=$RPM_BUILD_ROOT
142%else
143cd tools/power/x86/turbostat
144install -p turbostat $RPM_BUILD_ROOT%{_bindir}/turbostat
145install -p turbostat.8 $RPM_BUILD_ROOT%{_mandir}/man8
146%endif
147%endif
148
149%clean
150rm -rf $RPM_BUILD_ROOT
151
152%post libs -p /sbin/ldconfig
153%postun libs -p /sbin/ldconfig
154
155%files -f cpupower.lang
156%defattr(644,root,root,755)
157%attr(755,root,root) %{_bindir}/cpupower
158%ifarch %{ix86} %{x8664}
159%attr(755,root,root) %{_bindir}/centrino-decode
160%attr(755,root,root) %{_bindir}/powernow-k8-decode
161%endif
162%{_mandir}/man[1-8]/cpupower*
163%ifarch %{ix86} %{x8664}
164%attr(755,root,root) %{_bindir}/turbostat
165%attr(755,root,root) %{_bindir}/x86_energy_perf_policy
166%{_mandir}/man8/turbostat*
167%{_mandir}/man8/x86_energy_perf_policy*
168%endif
169
170%files libs
171%defattr(644,root,root,755)
172%attr(755,root,root) %{_libdir}/libcpupower.so.*.*.*
173%ghost %{_libdir}/libcpupower.so.0
174
175%files libs-devel
176%defattr(644,root,root,755)
177%{_libdir}/libcpupower.so
178%{_includedir}/cpufreq.h
This page took 0.062337 seconds and 4 git commands to generate.