unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: guix-devel@gnu.org
Subject: [PATCH 1/2] gnu: Add cpupower.
Date: Tue, 19 Jul 2016 04:45:19 +0200	[thread overview]
Message-ID: <20160719024520.9121-2-me@tobias.gr> (raw)
In-Reply-To: <20160719024520.9121-1-me@tobias.gr>

* 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

  reply	other threads:[~2016-07-19  2:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  2:45 [PATCH 0/2] Add cpupower Tobias Geerinckx-Rice
2016-07-19  2:45 ` Tobias Geerinckx-Rice [this message]
2016-07-19 20:59   ` [PATCH 1/2] gnu: " Ludovic Courtès
2016-07-19 21:13     ` Tobias Geerinckx-Rice
2016-07-19 22:01       ` Eric Bavier
2016-07-19  2:45 ` [PATCH 2/2] gnu: atlas: Use cpupower in description Tobias Geerinckx-Rice
2016-07-19 21:00   ` Ludovic Courtès
2016-07-19 21:33     ` Tobias Geerinckx-Rice
2016-07-19 21:47       ` Mathieu Lirzin
2016-07-28 22:59         ` ng0
2016-07-29  8:22           ` Mathieu Lirzin
2016-07-29  8:35             ` ng0
2016-08-14  6:24               ` Pjotr Prins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160719024520.9121-2-me@tobias.gr \
    --to=me@tobias.gr \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).