gnu: fbcat: Update to 0.5.1.

* gnu/packages/linux.scm (fbcat): Update to 0.5.1.
[native-inputs]: Remove field.
[arguments]: Add PREFIX to #:make-flags.  Remove `fix-docbook-location'
and `build-documentation' phases.  Let the Makefile install everything.
Add a `split-fbgrab-output' to clean up.
This commit is contained in:
Tobias Geerinckx-Rice 2018-01-26 22:59:15 +01:00
parent 33a3b9fc11
commit 7f86e5e74d
No known key found for this signature in database
GPG Key ID: 0DB0FF884F556D79
1 changed files with 13 additions and 29 deletions

View File

@ -4551,20 +4551,15 @@ relevant @file{/dev/vcs*} file(s).")
(define-public fbcat
(package
(name "fbcat")
(version "0.5")
(version "0.5.1")
(source
(origin
(method url-fetch)
(uri (string-append "https://github.com/jwilk/fbcat/releases/download/"
version "/" name "-" version ".tar.gz"))
(sha256
(base32 "1dla1na3nf3s4xy0p6w0v54zipg1x8c14yqsw8w9qjzhchr4caxw"))))
(base32 "0pj9hxmwhbz6kmd7847yx2jh1scl9l25zgndyi8s9vlzdkq2q8d7"))))
(build-system gnu-build-system)
(native-inputs
;; For building the man pages.
`(("docbook-xml" ,docbook-xml)
("docbook-xsl" ,docbook-xsl)
("xsltproc" ,libxslt)))
(inputs
;; The fbgrab wrapper can use one of several PPM-to-PNG converters. We
;; choose netpbm simply because it's the smallest. It still adds ~94 MiB
@ -4572,24 +4567,13 @@ relevant @file{/dev/vcs*} file(s).")
`(("pnmtopng" ,netpbm)))
(outputs (list "out" "fbgrab"))
(arguments
`(#:make-flags (list "CC=gcc")
`(#:make-flags
(list "CC=gcc"
(string-append "PREFIX=" (assoc-ref %outputs "out")))
#:tests? #f ; no tests
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'fix-docbook-location
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "doc/Makefile"
(("http://docbook.sourceforge.net/release/xsl/current")
(string-append (assoc-ref inputs "docbook-xsl")
"/xml/xsl/docbook-xsl-"
,(package-version docbook-xsl))))
#t))
(delete 'configure) ; no configure script
(add-after 'build 'build-documentation
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke "make" "-C" "doc"
make-flags)
#t))
(add-after 'build 'qualify-references
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((pnmtopng (assoc-ref inputs "pnmtopng"))
@ -4600,17 +4584,17 @@ relevant @file{/dev/vcs*} file(s).")
(("pnmtopng" all)
(string-append pnmtopng "/bin/" all)))
#t)))
(replace 'install
;; The Makefile lacks an install target. Install files manually.
(add-after 'install 'split-fbgrab-output
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(out:fbgrab (assoc-ref outputs "fbgrab")))
(install-file "fbcat" (string-append out "/bin"))
(install-file "doc/fbcat.1"
(string-append out "/share/man/man1"))
(install-file "fbgrab" (string-append out:fbgrab "/bin"))
(install-file "doc/fbgrab.1"
(string-append out:fbgrab "/share/man/man1"))
(for-each (lambda (file)
(let ((old (string-append out "/" file))
(new (string-append out:fbgrab "/" file)))
(mkdir-p (dirname new))
(rename-file old new)))
(list "bin/fbgrab"
"share/man/man1/fbgrab.1"))
#t))))))
(home-page "https://jwilk.net/software/fbcat")
(synopsis "Take a screenshot of the contents of the Linux framebuffer")