commit e1ddd46cb963a87421cc60569627a57ad48acc1b8a162cdeab860ffc5ac16059 Author: Thomas Renninger Date: Sun May 1 18:11:39 2011 +0000 - Initial commit of tools/power/cpupower directory from linux-next kernel repository OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cpupower-2.6.39.tar.bz2 b/cpupower-2.6.39.tar.bz2 new file mode 100644 index 0000000..3e3f0d1 --- /dev/null +++ b/cpupower-2.6.39.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8afb2547a03de078d68d27aa819d1d394fde2929ec031345fa813a0d4abfa249 +size 65620 diff --git a/cpupower.changes b/cpupower.changes new file mode 100644 index 0000000..ad8d6d5 --- /dev/null +++ b/cpupower.changes @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Thu Apr 21 15:28:55 UTC 2011 - trenn@suse.de + +- Initial commit of tools/power/cpupower directory from + linux-next kernel repository + diff --git a/cpupower.spec b/cpupower.spec new file mode 100644 index 0000000..44f6100 --- /dev/null +++ b/cpupower.spec @@ -0,0 +1,146 @@ +# +# spec file for package cpupower +# +# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Author: Thomas Renninger +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + + +Name: cpupower +Url: http://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils.html +# Use this as version when things are in mainline kernel +%define version %(rpm -q --qf '%{VERSION}' kernel-source) +Version: 2.6.39 +Release: 1 +Summary: Tools to determine and set CPU Power related Settings +License: GPLv2+ +Group: System/Base +Source: %{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: pciutils-devel gettext-tools pciutils +Obsoletes: cpufrequtils +Provides: cpufrequtils + +%description +This tool is to make access to the Linux kernel's processor power subsystems +like CPU frequency switching (cpufreq) or CPU sleep states (cpuidle) for users +and userspace tools easier. + + +Authors: +-------- + Dominik Brodowski + Thomas Renninger + +%package -n libcpupower0 +License: GPLv2+ +Summary: Obsolete processor frequency related C-library +Group: System/Base +AutoReqProv: on + +%description -n libcpupower0 +Contains libcpupower and soon possibly other CPU power related +C libraries. + +Authors: +-------- + Dominik Brodowski + + +%package devel +License: GPLv2+ +Summary: Include files and C-libraries +Group: Development/Languages/C and C++ +Requires: libcpupower0 = %{version} + +%description devel +Include files and C-libraries for C/C++ development + + +Authors: +-------- + Dominik Brodowski + +%package bench +License: GPLv2+ +Summary: CPU frequency micro benchmark +Group: System/Benchmark + +%description bench +Helps to test the condition of a given kernel cpufreq +governor (e.g. ondemand, userspace, conservative) and the cpufreq HW driver +(e.g. powernow-k8, acpi-cpufreq, ...). +For that purpose, it compares the performance governor to a configured +powersave module. + + +Authors: +-------- + Christian Kornacker + +%prep +%setup -q + +%build +# This package failed when testing with -Wl,-as-needed being default. +# So we disable it here, if you want to retest, just delete this comment and the line below. +export SUSE_ASNEEDED=0 +CONF="PACKAGE_BUGREPORT=http://bugs.opensuse.org mandir=%_mandir libdir=%_libdir CPUFRQ_BENCH=true STRIP=true VERSION=%{version}" +export CFLAGS="$RPM_OPT_FLAGS" +make $CONF + +%install +export SUSE_ASNEEDED=0 +CONF="PACKAGE_BUGREPORT=http://bugs.opensuse.org mandir=%_mandir libdir=%_libdir CPUFRQ_BENCH=true DESTDIR=$RPM_BUILD_ROOT sbindir=/usr/sbin docdir=%{_docdir}/%{name} confdir=/etc VERSION=%{version}" +make install DESTDIR=$RPM_BUILD_ROOT $CONF +# copy to examples doc dir to avoid complains from the build +# system about an executable in the doc dir. +mkdir -p $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples +mv $RPM_BUILD_ROOT/%{_docdir}/%{name}/cpufreq-bench_script.sh $RPM_BUILD_ROOT/%{_docdir}/%{name}/examples +%find_lang %{name} + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -n libcpupower0 -p /sbin/ldconfig + +%postun -n libcpupower0 -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr (-,root,root) +%{_mandir}/man1/cpupower* +/usr/bin/cpupower + +%files bench +%defattr (-,root,root) +%config /etc/cpufreq-bench.conf +/usr/sbin/cpufreq-bench +/usr/bin/cpufreq-bench_plot.sh +%dir %{_docdir}/%{name} +%dir %{_docdir}/%{name}/examples +%{_docdir}/%{name}/examples/cpufreq-bench_script.sh +%{_docdir}/%{name}/README-BENCH + +%files -n libcpupower0 +%defattr(-,root,root) +%{_libdir}/libcpupower*.so.* + +%files devel +%defattr(-,root,root) +/usr/include/cpufreq.h +%{_libdir}/libcpu*.so + +%changelog