- Run spec-cleaner

- Don't disable as-needed, it works now.

OBS-URL: https://build.opensuse.org/package/show/hardware/cpupower?expand=0&rev=86
This commit is contained in:
Ismail Dönmez 2018-12-06 09:34:25 +00:00 committed by Git OBS Bridge
parent a694a76be1
commit 7ac7e310d0
2 changed files with 52 additions and 56 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Dec 6 09:33:55 UTC 2018 - Ismail Dönmez <idonmez@suse.com>
- Run spec-cleaner
- Don't disable as-needed, it works now.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 4 12:14:23 UTC 2018 - trenn@suse.de Tue Dec 4 12:14:23 UTC 2018 - trenn@suse.de

View File

@ -2,7 +2,6 @@
# spec file for package cpupower # spec file for package cpupower
# #
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Author: Thomas Renninger <trenn@suse.de>
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -17,38 +16,36 @@
# #
Name: cpupower
# Use this as version when things are in mainline kernel # Use this as version when things are in mainline kernel
%define version %(rpm -q --qf '%VERSION' kernel-source) %define version %(rpm -q --qf '%{VERSION}' kernel-source)
Version: 4.19
Release: 0
%define tsversion 18.07.27 %define tsversion 18.07.27
%define pbversion 17.05.11 %define pbversion 17.05.11
Name: cpupower
Version: 4.19
Release: 0
Summary: Tools to determine and set CPU Power related Settings Summary: Tools to determine and set CPU Power related Settings
License: GPL-2.0-only License: GPL-2.0-only
Group: System/Base Group: System/Base
Url: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git URL: https://git.kernel.org/cgit/linux/kernel/git/rafael/linux-pm.git
Source: %name-%version.tar.bz2 Source: %{name}-%{version}.tar.bz2
Source1: turbostat-%tsversion.tar.bz2 Source1: turbostat-%{tsversion}.tar.bz2
Source2: cpupower_export_tarball_from_git.sh Source2: cpupower_export_tarball_from_git.sh
Source3: x86_energy_perf_policy-%{pbversion}.tar.bz2 Source3: x86_energy_perf_policy-%{pbversion}.tar.bz2
Patch1: cpupower_rapl.patch Patch1: cpupower_rapl.patch
Patch2: rapl_monitor.patch Patch2: rapl_monitor.patch
Patch3: cpupower_exclude_kernel_Makefile.patch Patch3: cpupower_exclude_kernel_Makefile.patch
Patch4: cpupower_fix_compilation_and_sysfs_read_file_mess.patch Patch4: cpupower_fix_compilation_and_sysfs_read_file_mess.patch
Patch5: cpupower_bash-completion_for_cpupower_tool.patch Patch5: cpupower_bash-completion_for_cpupower_tool.patch
Patch22: turbostat_makefile_fix_asm_header.patch Patch22: turbostat_makefile_fix_asm_header.patch
# Fixes bsc#1048546: # Fixes bsc#1048546:
Patch30: x86_perf_makefile_fix_asm_header.patch Patch30: x86_perf_makefile_fix_asm_header.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gettext-tools BuildRequires: gettext-tools
BuildRequires: pciutils BuildRequires: pciutils
BuildRequires: pciutils-devel BuildRequires: pciutils-devel
Obsoletes: cpufrequtils Obsoletes: cpufrequtils
Provides: cpufrequtils = %version Provides: cpufrequtils = %{version}
%description %description
This tool is to make access to the Linux kernel's processor power subsystems This tool is to make access to the Linux kernel's processor power subsystems
@ -66,8 +63,8 @@ C libraries.
%package devel %package devel
Summary: Include files and C-libraries Summary: Include files and C-libraries
Group: Development/Languages/C and C++ Group: Development/Languages/C and C++
Requires: libcpupower0 = %{version}
Conflicts: cpufrequtils-devel Conflicts: cpufrequtils-devel
Requires: libcpupower0 = %version
%description devel %description devel
Include files and C-libraries for C/C++ development Include files and C-libraries for C/C++ development
@ -75,8 +72,8 @@ Include files and C-libraries for C/C++ development
%package bench %package bench
Summary: CPU frequency micro benchmark Summary: CPU frequency micro benchmark
Group: System/Benchmark Group: System/Benchmark
Obsoletes: cpufrequtils-bench < %version Obsoletes: cpufrequtils-bench < %{version}
Provides: cpufrequtils-bench = %version Provides: cpufrequtils-bench = %{version}
%description bench %description bench
Helps to test the condition of a given kernel cpufreq Helps to test the condition of a given kernel cpufreq
@ -86,87 +83,80 @@ For that purpose, it compares the performance governor to a configured
powersave module. powersave module.
%prep %prep
%setup -D -b 1 -b 3 %setup -q -D -b 1 -b 3
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
cd ../turbostat-%tsversion cd ../turbostat-%{tsversion}
%patch22 -p1 %patch22 -p1
cd ../x86_energy_perf_policy-%{pbversion} cd ../x86_energy_perf_policy-%{pbversion}
%patch30 -p1 %patch30 -p1
%build %build
# This package failed when testing with -Wl,-as-needed being default. CONF="PACKAGE_BUGREPORT=https://bugs.opensuse.org mandir=%{_mandir} libdir=%{_libdir} CPUFRQ_BENCH=true VERSION=%{version}"
# So we disable it here, if you want to retest, just delete this comment and the line below. export CFLAGS="%{optflags} -I ."
export SUSE_ASNEEDED=0
CONF="PACKAGE_BUGREPORT=http://bugs.opensuse.org mandir=%_mandir libdir=%_libdir CPUFRQ_BENCH=true VERSION=%version"
export CFLAGS="%optflags -I ."
make $CONF %{?_smp_mflags} make $CONF %{?_smp_mflags}
%ifarch ix86 x86_64 %ifarch ix86 x86_64
cd ../turbostat-%tsversion cd ../turbostat-%{tsversion}
export CFLAGS="%optflags -I ." export CFLAGS="%{optflags} -I ."
make %{?_smp_mflags} make %{?_smp_mflags}
cd ../x86_energy_perf_policy-%{pbversion} cd ../x86_energy_perf_policy-%{pbversion}
make %{?_smp_mflags} make %{?_smp_mflags}
%endif %endif
%install %install
export SUSE_ASNEEDED=0 CONF="PACKAGE_BUGREPORT=https://bugs.opensuse.org mandir=%{_mandir} libdir=%{_libdir} CPUFRQ_BENCH=true DESTDIR=%{buildroot} sbindir=%{_sbindir} docdir=%{_docdir}/%{name} confdir=%{_sysconfdir} VERSION=%{version}"
CONF="PACKAGE_BUGREPORT=http://bugs.opensuse.org mandir=%_mandir libdir=%_libdir CPUFRQ_BENCH=true DESTDIR=%buildroot sbindir=%_sbindir docdir=%_docdir/%name confdir=%_sysconfdir VERSION=%version"
%make_install $CONF %make_install $CONF
# copy to examples doc dir to avoid complains from the build # copy to examples doc dir to avoid complains from the build
# system about an executable in the doc dir. # system about an executable in the doc dir.
mkdir -p %buildroot/%_docdir/%name/examples mkdir -p %{buildroot}/%{_docdir}/%{name}/examples
mv %buildroot//%_docdir/%name/cpufreq-bench_script.sh %buildroot/%_docdir/%name/examples mv %{buildroot}//%{_docdir}/%{name}/cpufreq-bench_script.sh %{buildroot}/%{_docdir}/%{name}/examples
%find_lang %name
%find_lang %{name}
%ifarch ix86 x86_64 %ifarch ix86 x86_64
cd ../turbostat-%tsversion cd ../turbostat-%{tsversion}
%make_install -e %make_install -e
cd ../x86_energy_perf_policy-%{pbversion} cd ../x86_energy_perf_policy-%{pbversion}
%make_install %make_install
%endif %endif
%post -n libcpupower0 -p /sbin/ldconfig %post -n libcpupower0 -p /sbin/ldconfig
%postun -n libcpupower0 -p /sbin/ldconfig %postun -n libcpupower0 -p /sbin/ldconfig
%files -f %name.lang %files -f %{name}.lang
%defattr (-,root,root) %{_datadir}/bash-completion/completions/cpupower
/usr/share/bash-completion/completions/cpupower %{_mandir}/man1/cpupower*
%_mandir/man1/cpupower* %{_bindir}/cpupower
%_bindir/cpupower
%ifarch ix86 x86_64 %ifarch ix86 x86_64
%_mandir/man8/turbostat* %{_mandir}/man8/turbostat*
%_bindir/turbostat %{_bindir}/turbostat
%_mandir/man8/x86_energy_perf_policy* %{_mandir}/man8/x86_energy_perf_policy*
%_bindir/x86_energy_perf_policy %{_bindir}/x86_energy_perf_policy
%endif %endif
%files bench %files bench
%defattr (-,root,root) %config %{_sysconfdir}/cpufreq-bench.conf
%config %_sysconfdir/cpufreq-bench.conf %{_sbindir}/cpufreq-bench
%_sbindir/cpufreq-bench %{_bindir}/cpufreq-bench_plot.sh
%_bindir/cpufreq-bench_plot.sh %dir %{_docdir}/%{name}
%dir %_docdir/%name %dir %{_docdir}/%{name}/examples
%dir %_docdir/%name/examples %{_docdir}/%{name}/examples/cpufreq-bench_script.sh
%_docdir/%name/examples/cpufreq-bench_script.sh %{_docdir}/%{name}/README-BENCH
%_docdir/%name/README-BENCH
%files -n libcpupower0 %files -n libcpupower0
%defattr(-,root,root) %{_libdir}/libcpupower*.so.*
%_libdir/libcpupower*.so.*
%files devel %files devel
%defattr(-,root,root) %{_includedir}/cpufreq.h
%_includedir/cpufreq.h %{_includedir}/cpuidle.h
%_includedir/cpuidle.h %{_includedir}/powercap.h
/usr/include/powercap.h %{_libdir}/libcpu*.so
%_libdir/libcpu*.so
%changelog %changelog