From 2df1c3527d68f7372173bd3c6bde1eeef5a89f83 Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Fri, 8 Feb 2013 02:58:35 +0100 Subject: [PATCH] new package: add package 'powertop' --- packages/debug/meta | 2 +- packages/debug/powertop/build | 45 +++++++++++++++++++++++++++++++++ packages/debug/powertop/install | 27 ++++++++++++++++++++ packages/debug/powertop/meta | 36 ++++++++++++++++++++++++++ 4 files changed, 109 insertions(+), 1 deletion(-) create mode 100755 packages/debug/powertop/build create mode 100755 packages/debug/powertop/install create mode 100644 packages/debug/powertop/meta diff --git a/packages/debug/meta b/packages/debug/meta index 8ac8ff7fbb..8b19cffafd 100644 --- a/packages/debug/meta +++ b/packages/debug/meta @@ -25,7 +25,7 @@ PKG_ARCH="any" PKG_LICENSE="GPL" PKG_SITE="http://www.openelec.tv" PKG_URL="" -PKG_DEPENDS="acpica cpuid dmidecode gdb hddtemp i2c-tools pmtools strace" +PKG_DEPENDS="acpica cpuid dmidecode gdb hddtemp i2c-tools pmtools powertop strace" PKG_BUILD_DEPENDS="toolchain" PKG_PRIORITY="optional" PKG_SECTION="debug" diff --git a/packages/debug/powertop/build b/packages/debug/powertop/build new file mode 100755 index 0000000000..af3093299a --- /dev/null +++ b/packages/debug/powertop/build @@ -0,0 +1,45 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 +export CXXFLAGS="$CXXFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses" +export CFLAGS="$CFLAGS -I$SYSROOT_PREFIX/usr/include/ncurses" +export LIBS="-ltinfo" +export LDFLAGS="$LDFLAGS -ltinfo" + +cd $PKG_BUILD + +ln -sf $ROOT/$TOOLCHAIN/usr/include/ncurses.h src/ + +ac_cv_func_malloc_0_nonnull=yes \ +ac_cv_func_realloc_0_nonnull=yes \ +./configure --host=$TARGET_NAME \ + --build=$HOST_NAME \ + --prefix=/usr \ + --bindir=/usr/bin \ + --with-sysroot=$ROOT/$TOOLCHAIN \ + +make PREFIX=/usr \ + CC="$TARGET_CC" \ + AR="$TARGET_AR" \ + CFLAGS="$TARGET_CFLAGS" \ + CPPFLAGS="$TARGET_CPPFLAGS" \ diff --git a/packages/debug/powertop/install b/packages/debug/powertop/install new file mode 100755 index 0000000000..fc3811fa6c --- /dev/null +++ b/packages/debug/powertop/install @@ -0,0 +1,27 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +mkdir -p $INSTALL/usr/bin/ +cp $PKG_BUILD/src/powertop $INSTALL/usr/bin/ + diff --git a/packages/debug/powertop/meta b/packages/debug/powertop/meta new file mode 100644 index 0000000000..b2a1010221 --- /dev/null +++ b/packages/debug/powertop/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2013 Dag Wieers (dag@wieers.com) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="powertop" +PKG_VERSION="2.2" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="https://01.org/powertop/" +PKG_URL="https://01.org/powertop/sites/default/files/downloads/$PKG_NAME-$PKG_VERSION.tar.gz" +PKG_DEPENDS="ncurses" +PKG_BUILD_DEPENDS="toolchain ncurses" +PKG_PRIORITY="optional" +PKG_SECTION="system" +PKG_SHORTDESC="powertop: tool to diagnose issues with power consumption and power management" +PKG_LONGDESC="PowerTOP is a Linux tool to diagnose issues with power consumption and power management. In addition to being a diagnostic tool, PowerTOP also has an interactive mode where the user can experiment various power management settings for cases where the Linux distribution has not enabled these settings." +PKG_IS_ADDON="no" + +PKG_AUTORECONF="no"