From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56158) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOAbl-0007dH-DT for guix-patches@gnu.org; Sun, 10 Dec 2017 18:02:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOAbk-0003Jk-AV for guix-patches@gnu.org; Sun, 10 Dec 2017 18:02:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:47030) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eOAbk-0003JW-7l for guix-patches@gnu.org; Sun, 10 Dec 2017 18:02:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eOAbj-0002fl-Vh for guix-patches@gnu.org; Sun, 10 Dec 2017 18:02:04 -0500 Subject: [bug#29653] [PATCH 2/2] gnu: Add fbcat. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55958) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eOAax-0007am-JM for guix-patches@gnu.org; Sun, 10 Dec 2017 18:01:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eOAaw-0002if-BC for guix-patches@gnu.org; Sun, 10 Dec 2017 18:01:15 -0500 Received: from tobias.gr ([2001:470:cc92::1]:46248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eOAaw-0002g6-1U for guix-patches@gnu.org; Sun, 10 Dec 2017 18:01:14 -0500 Received: by tobias.gr (OpenSMTPD) with ESMTP id 26e5bf33 for ; Sun, 10 Dec 2017 23:01:09 +0000 (UTC) Received: by submission.tobias.gr (OpenSMTPD) with ESMTPSA id 13c2d7a4 (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128:NO) for ; Sun, 10 Dec 2017 23:01:06 +0000 (UTC) From: Tobias Geerinckx-Rice Date: Mon, 11 Dec 2017 00:03:36 +0100 Message-Id: <20171210230336.4695-3-me@tobias.gr> In-Reply-To: <20171210230336.4695-1-me@tobias.gr> References: <20171210230336.4695-1-me@tobias.gr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 29653@debbugs.gnu.org * gnu/packages/linux.scm (fbcat): New public variable. --- gnu/packages/linux.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index e61e279a7..0eb257436 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -78,6 +78,7 @@ #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) + #:use-module (gnu packages netpbm) #:use-module (gnu packages networking) #:use-module (gnu packages ninja) #:use-module (gnu packages perl) @@ -4502,3 +4503,79 @@ interfaces in parallel environments.") Targa (@dfn{.tga}) image. It can be used by anyone with read access to the relevant @file{/dev/vcs*} file(s).") (license license:gpl2))) + +(define-public fbcat + (package + (name "fbcat") + (version "0.5") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/jwilk/fbcat/releases/download/" + version "/" name "-" version ".tar.gz")) + (sha256 + (base32 "1dla1na3nf3s4xy0p6w0v54zipg1x8c14yqsw8w9qjzhchr4caxw")))) + (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 + ;; to an otherwise tiny package, so we put ‘fbgrab’ in its own output. + `(("pnmtopng" ,netpbm))) + (outputs (list "out" "fbgrab")) + (arguments + `(#:make-flags (list "CC=gcc") + #: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) + (zero? (apply system* "make" "-C" "doc" + make-flags)))) + (add-after 'build 'qualify-references + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((pnmtopng (assoc-ref inputs "pnmtopng")) + (out (assoc-ref outputs "out"))) + (substitute* "fbgrab" + (("fbcat" all) + (string-append out "/bin/" all)) + (("pnmtopng" all) + (string-append pnmtopng "/bin/" all))) + #t))) + (replace 'install + ;; The Makefile lacks an ‘install’ target. Install files manually. + (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")) + #t)))))) + (home-page "https://jwilk.net/software/fbcat") + (synopsis "Take a screenshot of the contents of the Linux framebuffer") + (description + "fbcat saves the contents of the Linux framebuffer (@file{/dev/fb*}), or +a dump therof. It supports a wide range of drivers and pixel formats. +@command{fbcat} can take screenshots of virtually any application that can be +made to write its output to the framebuffer, including (but not limited to) +text-mode or graphical applications that don't use a display server. + +Also included is @command{fbgrab}, a wrapper around @command{fbcat} that +emulates the behaviour of Gunnar Monell's older fbgrab utility.") + (license license:gpl2))) -- 2.15.0