Commit 1c1184f2 authored by Kamal Mostafa's avatar Kamal Mostafa Committed by Tim Gardner

UBUNTU: [debian] tools: ship 'cpupower' in linux-tools

BugLink: http://bugs.launchpad.net/bugs/1158668

New Build-depends: libpci-dev

Adds to binary package "linux-tools-$(abi_version)"
  /usr/bin/cpupower_$(abi_version)
  /usr/lib/libcpupower.so.$(abi_version)

Adds to binary package "linux-tools-common"
  /usr/bin/cpupower
  /usr/share/man/man1/cpupower-set.1.gz
  /usr/share/man/man1/cpupower-frequency-set.1.gz
  /usr/share/man/man1/cpupower-frequency-info.1.gz
  /usr/share/man/man1/cpupower-monitor.1.gz
  /usr/share/man/man1/cpupower-info.1.gz
  /usr/share/man/man1/cpupower-idle-info.1.gz
  /usr/share/man/man1/cpupower.1.gz
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
Signed-off-by: default avatarTim Gardner <tim.gardner@canonical.com>
parent 0266466f
...@@ -458,6 +458,14 @@ endif ...@@ -458,6 +458,14 @@ endif
$(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch $(stampdir)/stamp-build-perarch: $(stampdir)/stamp-prepare-perarch
@echo Debug: $@ @echo Debug: $@
ifeq ($(do_tools),true) ifeq ($(do_tools),true)
# Allow for multiple installed versions of cpupower and libcpupower.so:
# Override LIB_MIN in order to to generate a versioned .so named
# libcpupower.so.$(abi_release) and link cpupower with that.
make -C $(builddirpa)/tools/power/cpupower \
CROSS_COMPILE=$(CROSS_COMPILE) \
LIB_MIN=$(abi_release) CPUFREQ_BENCH=false
ifeq ($(do_tools_perf),true) ifeq ($(do_tools_perf),true)
cd $(builddirpa)/tools/perf && \ cd $(builddirpa)/tools/perf && \
make prefix=/usr HAVE_CPLUS_DEMANGLE=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPYTHON=1 NO_LIBPERL=1 PYTHON=python2.7 make prefix=/usr HAVE_CPLUS_DEMANGLE=1 CROSS_COMPILE=$(CROSS_COMPILE) NO_LIBPYTHON=1 NO_LIBPERL=1 PYTHON=python2.7
...@@ -478,6 +486,15 @@ install-perarch: $(stampdir)/stamp-build-perarch ...@@ -478,6 +486,15 @@ install-perarch: $(stampdir)/stamp-build-perarch
# Add the tools. # Add the tools.
ifeq ($(do_tools),true) ifeq ($(do_tools),true)
install -d $(toolspkgdir)/usr/bin install -d $(toolspkgdir)/usr/bin
install -d $(toolspkgdir)/usr/lib
install -m755 $(builddirpa)/tools/power/cpupower/cpupower \
$(toolspkgdir)/usr/bin/cpupower_$(abi_release)
# Install only the full versioned libcpupower.so.$(abi_release), not
# the usual symlinks to it.
install -m644 $(builddirpa)/tools/power/cpupower/libcpupower.so.$(abi_release) \
$(toolspkgdir)/usr/lib/
ifeq ($(do_tools_perf),true) ifeq ($(do_tools_perf),true)
install -m755 $(builddirpa)/tools/perf/perf \ install -m755 $(builddirpa)/tools/perf/perf \
$(toolspkgdir)/usr/bin/perf_$(abi_release) $(toolspkgdir)/usr/bin/perf_$(abi_release)
......
...@@ -92,6 +92,9 @@ ifeq ($(do_tools),true) ...@@ -92,6 +92,9 @@ ifeq ($(do_tools),true)
install -d $(toolsbin) install -d $(toolsbin)
install -d $(toolsman)/man1 install -d $(toolsman)/man1
install -m755 debian/tools/cpupower $(toolsbin)/cpupower
install -m644 $(CURDIR)/tools/power/cpupower/man/*.1 $(toolsman)/man1/
ifeq ($(do_tools_perf),true) ifeq ($(do_tools_perf),true)
install -m755 debian/tools/perf $(toolsbin)/perf install -m755 debian/tools/perf $(toolsbin)/perf
endif endif
......
#!/bin/bash
full_version=`uname -r`
# Removing flavour from version i.e. generic or server.
flavour_abi=${full_version#*-}
flavour=${flavour_abi#*-}
version=${full_version%-$flavour}
cpupower="cpupower_$version"
if ! which "$cpupower" > /dev/null; then
echo "$cpupower not found" >&2
echo "You may need to install linux-tools-$version" >&2
exit 2
fi
exec "$cpupower" "$@"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment