gnu: cpupower: Modernise.

* gnu/packages/linux.scm (cpupower)[arguments]: Rewrite as G-expressions.
[native-inputs]: Remove input label.
This commit is contained in:
Tobias Geerinckx-Rice 2022-08-21 02:00:01 +02:00
parent 13da331fa4
commit 210dc1a15f
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -6359,31 +6359,30 @@ (define-public cpupower
(source (package-source linux-libre)) (source (package-source linux-libre))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (modify-phases %standard-phases (list #:make-flags
(add-after 'unpack 'enter-subdirectory #~(list (string-append "DESTDIR=" #$output)
(lambda _ (string-append "LDFLAGS=-Wl,-rpath=" #$output "/lib")
(chdir "tools/power/cpupower") "libdir=/lib"
#t)) "docdir=/share/doc/cpupower"
(delete 'configure) "confdir=$(docdir)/examples"
(add-before 'build 'fix-makefiles ;; The Makefile recommends the following changes
(lambda _ "DEBUG=false"
(substitute* "Makefile" "PACKAGE_BUGREPORT=bug-guix@gnu.org")
(("/usr/") "/") #:tests? #f ; no tests
(("/bin/(install|pwd)" _ command) command)) #:phases
(substitute* "bench/Makefile" #~(modify-phases %standard-phases
(("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")) (add-after 'unpack 'enter-subdirectory
#t))) (lambda _
#:make-flags (let ((out (assoc-ref %outputs "out"))) (chdir "tools/power/cpupower")))
(list (string-append "DESTDIR=" out) (delete 'configure) ; no configure script
(string-append "LDFLAGS=-Wl,-rpath=" out "/lib") (add-before 'build 'fix-makefiles
"libdir=/lib" (lambda _
"docdir=/share/doc/cpupower" (substitute* "Makefile"
"confdir=$(docdir)/examples" (("/usr/") "/")
;; The Makefile recommends the following changes (("/bin/(install|pwd)" _ command) command))
"DEBUG=false" (substitute* "bench/Makefile"
"PACKAGE_BUGREPORT=bug-guix@gnu.org")) (("\\$\\(CC\\) -o") "$(CC) $(LDFLAGS) -o")))))))
#:tests? #f)) ;no tests (native-inputs (list gettext-minimal))
(native-inputs `(("gettext" ,gettext-minimal)))
(inputs (list pciutils)) (inputs (list pciutils))
(home-page (package-home-page linux-libre)) (home-page (package-home-page linux-libre))
(synopsis "CPU frequency and voltage scaling tools for Linux") (synopsis "CPU frequency and voltage scaling tools for Linux")