gnu: fortune-mod: Clean up empty directory.

* gnu/packages/games.scm (fortune-mod)[arguments]: RMDIR ‘games/’ after
emptying it.
This commit is contained in:
Tobias Geerinckx-Rice 2018-08-11 17:58:32 +02:00
parent b3ce80d20f
commit e08474d650
No known key found for this signature in database
GPG key ID: 0DB0FF884F556D79

View file

@ -5218,11 +5218,16 @@ (define-public fortune-mod
(chdir "fortune-mod")
#t)))
(add-after 'install 'fix-install-directory
;; Move binary from "games/" to "bin/".
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(rename-file (string-append out "/games/fortune")
(string-append out "/bin/fortune"))
;; Move binary from "games/" to "bin/" and remove the latter. This
;; is easier than patching CMakeLists.txt since the tests hard-code
;; the location as well.
(let* ((out (assoc-ref outputs "out"))
(bin (string-append out "/bin"))
(games (string-append out "/games")))
(rename-file (string-append games "/fortune")
(string-append bin "/fortune"))
(rmdir games)
#t))))))
(inputs `(("recode" ,recode)))
(native-inputs