diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-04-08 20:05:53 +0000 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2009-04-08 20:05:53 +0000 |
commit | 0b43a2878d23e73c54b53b5e1c0a026c6abed8b3 (patch) | |
tree | 5e0c7675258ad0c3be2f20d5be72a148e020ac47 /rules/powertop.make | |
parent | 590d630b4c4ec515d1d805cee1aea2ebf299134d (diff) | |
download | ptxdist-0b43a2878d23e73c54b53b5e1c0a026c6abed8b3.tar.gz ptxdist-0b43a2878d23e73c54b53b5e1c0a026c6abed8b3.tar.xz |
[powertop] new program
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@10272 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'rules/powertop.make')
-rw-r--r-- | rules/powertop.make | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/rules/powertop.make b/rules/powertop.make new file mode 100644 index 000000000..2c029d635 --- /dev/null +++ b/rules/powertop.make @@ -0,0 +1,84 @@ +# -*-makefile-*- +# $Id$ +# +# Copyright (C) 2009 by Marc Kleine-Budde <mkl@pengutronix.de> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +# +# We provide this package +# +PACKAGES-$(PTXCONF_POWERTOP) += powertop + +# +# Paths and names +# +POWERTOP_VERSION := 1.11 +POWERTOP := powertop-$(POWERTOP_VERSION) +POWERTOP_SUFFIX := tar.gz +POWERTOP_URL := http://www.lesswatts.org/projects/powertop/download/$(POWERTOP).$(POWERTOP_SUFFIX) +POWERTOP_SOURCE := $(SRCDIR)/$(POWERTOP).$(POWERTOP_SUFFIX) +POWERTOP_DIR := $(BUILDDIR)/$(POWERTOP) + +# ---------------------------------------------------------------------------- +# Get +# ---------------------------------------------------------------------------- + +$(POWERTOP_SOURCE): + @$(call targetinfo) + @$(call get, POWERTOP) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +POWERTOP_PATH := PATH=$(CROSS_PATH) + +POWERTOP_COMPILE_ENV := $(CROSS_ENV) +POWERTOP_MAKEVARS := BINDIR=/usr/sbin + +$(STATEDIR)/powertop.prepare: + @$(call targetinfo) +ifdef PTXCONF_NCURSES_WIDE_CHAR + sed -i -e "s/-lncurses[^ ]*/-lncursesw/g" "$(POWERTOP_DIR)/Makefile" +else + sed -i -e "s/-lncurses[^ ]*/-lncurses/g" "$(POWERTOP_DIR)/Makefile" +endif + @$(call touch) + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/powertop.targetinstall: + @$(call targetinfo) + + @$(call install_init, powertop) + @$(call install_fixup, powertop,PACKAGE,powertop) + @$(call install_fixup, powertop,PRIORITY,optional) + @$(call install_fixup, powertop,VERSION,$(POWERTOP_VERSION)) + @$(call install_fixup, powertop,SECTION,base) + @$(call install_fixup, powertop,AUTHOR,"Marc Kleine-Budde <mkl@pengutronix.de>") + @$(call install_fixup, powertop,DEPENDS,) + @$(call install_fixup, powertop,DESCRIPTION,missing) + + @$(call install_copy, powertop, 0, 0, 0755, -, /usr/sbin/powertop) + + @$(call install_finish, powertop) + + @$(call touch) + +# ---------------------------------------------------------------------------- +# Clean +# ---------------------------------------------------------------------------- + +powertop_clean: + rm -rf $(STATEDIR)/powertop.* + rm -rf $(PKGDIR)/powertop_* + rm -rf $(POWERTOP_DIR) + +# vim: syntax=make |