gnu: thinkfan: Let the build system handle rcscripts/.
This moves them from /share/thinkfan to their conventional locations in /etc and /lib; the former was an arbitrary Guixism anyway. * gnu/packages/linux.scm (thinkfan)[arguments]: Re-write 'install-rc-scripts' as 'create-init-scripts' and move it after the 'unpack' phase.master
parent
9a3d176ee1
commit
908a3f3614
|
@ -3507,19 +3507,23 @@ feature, and a laptop with an accelerometer. It has no effect on SSDs.")
|
||||||
`("-DUSE_ATASMART:BOOL=ON")
|
`("-DUSE_ATASMART:BOOL=ON")
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
;; Install scripts for various foreign init systems. Also fix
|
(add-after 'unpack 'create-init-scripts
|
||||||
;; hard-coded path for daemon.
|
;; CMakeLists.txt relies on build-time symptoms of OpenRC and
|
||||||
(add-after 'install 'install-rc-scripts
|
;; systemd to patch and install their service files. Fake their
|
||||||
|
;; presence rather than duplicating the build system below. Leave
|
||||||
|
;; things like ‘/bin/kill’ because they're not worth a dependency.
|
||||||
|
;; The sysvinit needs manual patching, but since upstream doesn't
|
||||||
|
;; even provide the option to install it: don't.
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(files (find-files "../source/rcscripts" ".*")))
|
(share (string-append out "/share/" ,name)))
|
||||||
(substitute* files
|
(substitute* "CMakeLists.txt"
|
||||||
(("/usr/sbin/(\\$NAME|thinkfan)" _ name)
|
(("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
|
||||||
(string-append out "/sbin/" name)))
|
(format "option(~a_FOUND \"Faked\" ON)\n" package))
|
||||||
(for-each (cute install-file <>
|
;; That was easy! Now we just need to fix the destinations.
|
||||||
(string-append out "/share/thinkfan"))
|
(("/etc" directory)
|
||||||
files))
|
(string-append out directory)))
|
||||||
#t)))))
|
#t))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)))
|
||||||
(inputs
|
(inputs
|
||||||
|
|
Reference in New Issue