guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add sysfsutils, cpufrequtils


From: Taylan Ulrich Bayırlı/Kammer
Subject: Add sysfsutils, cpufrequtils
Date: Wed, 18 Feb 2015 23:35:06 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

I was going to send this as a patch sequence with git-send-email, but we
seem to be lacking the necessary Perl modules. :-)

>From a2edf2d2cec85d02e3a3848499706544be0e0961 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <address@hidden>
Date: Wed, 18 Feb 2015 21:20:38 +0100
Subject: [PATCH 1/3] gnu: Add sysfsutils.

* gnu/packages/linux.scm (sysfsutils): New variable.
---
 gnu/packages/linux.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 3bda6f2..b7a8f1a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1883,3 +1883,27 @@ during the system boot, and will run as a background 
process.  When an ACPI
 event is received from the kernel, acpid will examine the list of rules
 specified in /etc/acpi/events and execute the rules that match the event.")
     (license gpl2+)))
+
+(define-public sysfsutils
+  (package
+    (name "sysfsutils")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "mirror://sourceforge/linux-diag/sysfsutils/" version "/sysfsutils-"
+         version ".tar.gz"))
+       (sha256
+        (base32 "12i0ip11xbfcjzxz4r10cvz7mbzgq1hfcdn97w6zz7sm3wndwrg8"))))
+    (build-system gnu-build-system)
+    (home-page "http://linux-diag.sourceforge.net/Sysfsutils.html";)
+    (synopsis "System utilities based on Linux sysfs")
+    (description
+     "These are a set of utilites built upon sysfs, a virtual filesystem in
+Linux kernel versions 2.5+ that exposes a system's device tree.  The package
+also contains the libsysfs library.")
+    ;; The library is under lgpl2.1+ (all files say "or any later version").
+    ;; The rest is mostly gpl2, with a few files indicating gpl2+.
+    (license (list gpl2 gpl2+ lgpl2.1+))))
-- 
2.2.1

>From e7a1705f8d5719cdd88ca681252d34a0f7b586c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <address@hidden>
Date: Wed, 18 Feb 2015 22:17:01 +0100
Subject: [PATCH 2/3] gnu: Add sysfsutils-1.

* gnu/packages/linux.scm (sysfsutils-1): New variable.
---
 gnu/packages/linux.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index b7a8f1a..345297f 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1907,3 +1907,31 @@ also contains the libsysfs library.")
     ;; The library is under lgpl2.1+ (all files say "or any later version").
     ;; The rest is mostly gpl2, with a few files indicating gpl2+.
     (license (list gpl2 gpl2+ lgpl2.1+))))
+
+(define-public sysfsutils-1
+  (package
+    (inherit sysfsutils)
+    (name "sysfsutils")
+    (version "1.3.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "mirror://sourceforge/linux-diag/sysfsutils/sysfsutils-" version
+         "/sysfsutils-" version ".tar.gz"))
+       (sha256
+        (base32 "0kdhs07fm8263pxwd5blwn2x211cg4fk63fyf9ijcdkvzmwxrqq3"))))
+    (arguments
+     '(#:phases
+       (alist-cons-after
+        'unpack 'fix-makefile-and-configure
+        (lambda _
+          (substitute* '("Makefile.in")
+            (("includedir = /usr/include/sysfs")
+             "includedir = @includedir@"))
+          (substitute* '("configure")
+            (("includedir='(\\$\\{prefix\\}/include)'" all orig)
+             (string-append "includedir='" orig "/sysfs'"))))
+        %standard-phases)))
+    (synopsis "System utilities based on Linux sysfs (version 1.x)")))
-- 
2.2.1

>From ae4cba1a57fc64294d5ec3b667ab482f7cc7d27e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
 <address@hidden>
Date: Wed, 18 Feb 2015 21:20:57 +0100
Subject: [PATCH 3/3] gnu: Add cpufrequtils.

* gnu/packages/linux.scm (cpufrequtils): New variable.
* gnu/packages/patches/cpufrequtils-fix-aclocal.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
---
 gnu-system.am                                      |  1 +
 gnu/packages/linux.scm                             | 28 +++++++++++++
 .../patches/cpufrequtils-fix-aclocal.patch         | 46 ++++++++++++++++++++++
 3 files changed, 75 insertions(+)
 create mode 100644 gnu/packages/patches/cpufrequtils-fix-aclocal.patch

diff --git a/gnu-system.am b/gnu-system.am
index eeadd8f..64ef535 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -371,6 +371,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/cpio-CVE-2014-9112-pt4.patch            \
   gnu/packages/patches/cpio-CVE-2014-9112-pt5.patch            \
   gnu/packages/patches/cpio-gets-undeclared.patch              \
+  gnu/packages/patches/cpufrequtils-fix-aclocal.patch          \
   gnu/packages/patches/cssc-gets-undeclared.patch               \
   gnu/packages/patches/cssc-missing-include.patch               \
   gnu/packages/patches/clucene-contribs-lib.patch               \
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 345297f..e2279c1 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -1935,3 +1935,31 @@ also contains the libsysfs library.")
              (string-append "includedir='" orig "/sysfs'"))))
         %standard-phases)))
     (synopsis "System utilities based on Linux sysfs (version 1.x)")))
+
+(define-public cpufrequtils
+  (package
+    (name "cpufrequtils")
+    (version "0.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/cpufrequtils-";
+         version ".tar.gz"))
+       (sha256
+        (base32 "0qfqv7nqmjfr3p0bwrdlxkiqwqr7vmx053cadaa548ybqbghxmvm"))
+       (patches (list (search-patch "cpufrequtils-fix-aclocal.patch")))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("sysfsutils" ,sysfsutils-1)))
+    (arguments
+     '(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath="
+                                         (assoc-ref %outputs "out") "/lib"))))
+    (home-page "https://www.kernel.org/pub/linux/utils/kernel/cpufreq/";)
+    (synopsis "Utilities to get and set CPU frequency on Linux")
+    (description
+     "The cpufrequtils suite contains utilities to retreive CPU frequency
+information, and set the CPU frequency if supported, using the cpufreq
+capabilities of the Linux kernel.")
+    (license gpl2)))
diff --git a/gnu/packages/patches/cpufrequtils-fix-aclocal.patch 
b/gnu/packages/patches/cpufrequtils-fix-aclocal.patch
new file mode 100644
index 0000000..be5767f
--- /dev/null
+++ b/gnu/packages/patches/cpufrequtils-fix-aclocal.patch
@@ -0,0 +1,46 @@
+Add an extra layer of quoting to ltmain.sh sanity check.
+
+--- a/configure        2005-05-07 14:19:31.000000000 +0200
++++ b/configure        2015-02-10 11:16:32.456146934 +0100
+@@ -6266,7 +6266,7 @@
+   exit 1
+ fi
+ gentoo_lt_version="1.5.16"
+-gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 
's|^[:space:]*VERSION=||'`
++gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||'`
+ if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+--- a/aclocal.m4       2005-05-07 14:19:25.000000000 +0200
++++ b/aclocal.m4       2015-02-10 11:16:15.352030318 +0100
+@@ -246,7 +246,7 @@
+   exit 1
+ fi
+ gentoo_lt_version="1.5.16"
+-gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||'`
++gentoo_ltmain_version=`[grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||']`
+ if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+   AC_MSG_RESULT(no)
+   echo
+--- a/libcpufreq/configure     2005-05-07 14:19:31.000000000 +0200
++++ b/libcpufreq/configure     2015-02-10 11:16:32.456146934 +0100
+@@ -6266,7 +6266,7 @@
+   exit 1
+ fi
+ gentoo_lt_version="1.5.16"
+-gentoo_ltmain_version=`grep '^[:space:]*VERSION=' $ltmain | sed -e 
's|^[:space:]*VERSION=||'`
++gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||'`
+ if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+   echo "$as_me:$LINENO: result: no" >&5
+ echo "${ECHO_T}no" >&6
+--- a/libcpufreq/aclocal.m4    2005-05-07 14:19:25.000000000 +0200
++++ b/libcpufreq/aclocal.m4    2015-02-10 11:16:15.352030318 +0100
+@@ -246,7 +246,7 @@
+   exit 1
+ fi
+ gentoo_lt_version="1.5.16"
+-gentoo_ltmain_version=`grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||'`
++gentoo_ltmain_version=`[grep '^[[:space:]]*VERSION=' $ltmain | sed -e 
's|^[[:space:]]*VERSION=||']`
+ if test "$gentoo_lt_version" != "$gentoo_ltmain_version"; then
+   AC_MSG_RESULT(no)
+   echo
-- 
2.2.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]