From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: [PATCH 1/2] gnu: Add cpupower. Date: Tue, 19 Jul 2016 04:45:19 +0200 Message-ID: <20160719024520.9121-2-me@tobias.gr> References: <20160719024520.9121-1-me@tobias.gr> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPL1W-0006wt-IU for guix-devel@gnu.org; Mon, 18 Jul 2016 22:44:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPL1S-0000lR-Gb for guix-devel@gnu.org; Mon, 18 Jul 2016 22:44:41 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:60203) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPL1S-0000kH-9J for guix-devel@gnu.org; Mon, 18 Jul 2016 22:44:38 -0400 Received: from mfilter17-d.gandi.net (mfilter17-d.gandi.net [217.70.178.145]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 85652FB88B for ; Tue, 19 Jul 2016 04:44:36 +0200 (CEST) Received: from relay6-d.mail.gandi.net ([IPv6:::ffff:217.70.183.198]) by mfilter17-d.gandi.net (mfilter17-d.gandi.net [::ffff:10.0.15.180]) (amavisd-new, port 10024) with ESMTP id t1ArJd0gf8VQ for ; Tue, 19 Jul 2016 04:44:35 +0200 (CEST) Received: from sandstone.cloud.online.net (unknown [163.172.141.64]) (Authenticated sender: me@tobias.gr) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id EA17AFB886 for ; Tue, 19 Jul 2016 04:44:34 +0200 (CEST) In-Reply-To: <20160719024520.9121-1-me@tobias.gr> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org * gnu/packages/linux.scm (cpupower): New variable. --- gnu/packages/linux.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index d20314f..8b8d8d6 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2752,3 +2752,41 @@ from that to the system kernel's @file{/dev/random} machinery.") ;; The source package is offered under the GPL2+, but the files ;; 'rngd_rdrand.c' and 'rdrand_asm.S' are only available under the GPL2. (license (list license:gpl2 license:gpl2+)))) + +(define-public cpupower + (package + (name "cpupower") + (version (package-version linux-libre)) + (source (package-source linux-libre)) + (build-system gnu-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-after 'unpack 'enter-subdirectory + (lambda _ + (chdir "tools/power/cpupower"))) + (delete 'configure) + (add-before 'build 'fix-makefiles + (lambda _ + (substitute* "Makefile" + (("/usr/") "/") + (("/bin/(install|pwd)" _ command) command)) + (substitute* "bench/Makefile" + (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o"))))) + #:make-flags (let ((out (assoc-ref %outputs "out"))) + (list (string-append "DESTDIR=" out) + (string-append "LDFLAGS=-Wl,-rpath=" out "/lib") + "docdir=/share/doc/cpupower" + "confdir=$(docdir)/examples" + ;; The Makefile recommends the following changes + "DEBUG=false" + "PACKAGE_BUGREPORT=bug-guix@gnu.org")) + #:tests? #f)) ;no tests + (inputs `(("gettext" ,gnu-gettext) + ("pciutils" ,pciutils))) + (home-page (package-home-page linux-libre)) + (synopsis "CPU frequency and voltage scaling tools for Linux") + (description + "cpupower is a set of user-space tools that use the cpufreq feature of the +Linux kernel to retrieve and control processor features related to power saving, +such as frequency and voltage scaling.") + (license license:gpl2))) -- 2.9.0