[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/08: gnu: thinkfan: Let the build system handle rcscripts/.
From: |
guix-commits |
Subject: |
08/08: gnu: thinkfan: Let the build system handle rcscripts/. |
Date: |
Tue, 5 Mar 2019 11:02:52 -0500 (EST) |
nckx pushed a commit to branch master
in repository guix.
commit 908a3f361480f39819c712d62a5e0b685e823c54
Author: Tobias Geerinckx-Rice <address@hidden>
Date: Tue Mar 5 16:56:41 2019 +0100
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.
---
gnu/packages/linux.scm | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9f83f97..dd9e19a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -3507,19 +3507,23 @@ feature, and a laptop with an accelerometer. It has no
effect on SSDs.")
`("-DUSE_ATASMART:BOOL=ON")
#:phases
(modify-phases %standard-phases
- ;; Install scripts for various foreign init systems. Also fix
- ;; hard-coded path for daemon.
- (add-after 'install 'install-rc-scripts
+ (add-after 'unpack 'create-init-scripts
+ ;; CMakeLists.txt relies on build-time symptoms of OpenRC and
+ ;; 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)
- (let ((out (assoc-ref outputs "out"))
- (files (find-files "../source/rcscripts" ".*")))
- (substitute* files
- (("/usr/sbin/(\\$NAME|thinkfan)" _ name)
- (string-append out "/sbin/" name)))
- (for-each (cute install-file <>
- (string-append out "/share/thinkfan"))
- files))
- #t)))))
+ (let* ((out (assoc-ref outputs "out"))
+ (share (string-append out "/share/" ,name)))
+ (substitute* "CMakeLists.txt"
+ (("pkg_check_modules\\((OPENRC|SYSTEMD) .*" _ package)
+ (format "option(~a_FOUND \"Faked\" ON)\n" package))
+ ;; That was easy! Now we just need to fix the destinations.
+ (("/etc" directory)
+ (string-append out directory)))
+ #t))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
- branch master updated (f5e08f1 -> 908a3f3), guix-commits, 2019/03/05
- 07/08: gnu: thinkfan: Update to 1.0.2., guix-commits, 2019/03/05
- 02/08: gnu: libnftnl: Update to 1.1.2., guix-commits, 2019/03/05
- 01/08: gnu: genext2fs: Update to 1.4.1-4., guix-commits, 2019/03/05
- 06/08: gnu: iucode-tool: Update to 2.3.1., guix-commits, 2019/03/05
- 04/08: gnu: f2fs-tools: Don't use NAME in source URI., guix-commits, 2019/03/05
- 08/08: gnu: thinkfan: Let the build system handle rcscripts/.,
guix-commits <=
- 03/08: gnu: xfsprogs: Update to 4.20.0., guix-commits, 2019/03/05
- 05/08: gnu: f2fs-tools: Update to 1.12.0., guix-commits, 2019/03/05