From: "Boris A. Dekshteyn" <boris.dekshteyn@gmail.com>
To: 42758@debbugs.gnu.org
Cc: "Boris A. Dekshteyn" <boris.dekshteyn@gmail.com>
Subject: [bug#42758] [PATCH] gnu: foo2zjs: Fix install phase.
Date: Sat, 8 Aug 2020 20:09:18 +1200 [thread overview]
Message-ID: <20200808080918.21304-1-boris.dekshteyn@gmail.com> (raw)
* gnu/packages/cups.scm (foo2zjs): Fix install phase
Existed package definition builds fine, but de-facto it doesn't work
as expected. This quick and dirty patch make it's functional (tested with
HP LJ M1005, at least i'am able to add printer, configure, and print test
page through cups web interface), but needs some further work (fix and install
udev rules and hotplug helper) to make it fully functional.
---
gnu/packages/cups.scm | 39 ++++++++++++++++++++++++++++++++++++++-
1 file changed, 38 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index 281c2718e8..899ea594f3 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -28,6 +28,7 @@
#:use-module (gnu packages algebra)
#:use-module (gnu packages autotools)
#:use-module (gnu packages avahi)
+ #:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages fonts) ; font-dejavu
#:use-module (gnu packages fontutils)
@@ -716,6 +717,40 @@ printer/driver specific, but spooler-independent PPD file.")
(("^MODTIME[[:blank:]]*=.*$")
"MODTIME = echo Thu Jan 01 01:00:00 1970\n"))
#t))
+ (add-before 'install 'make-install-dirs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Make missing install dirs
+ (let ((out (assoc-ref outputs "out"))
+ (dirs '("/share/cups/model"
+ "/share/foomatic/db/source/opt"
+ "/share/foomatic/db/source/printer"
+ "/share/foomatic/db/source/driver"
+ "/lib/cups/filter")))
+ (for-each (lambda (dir)
+ (mkdir-p (string-append out dir)))
+ dirs))))
+ (add-after 'install 'wrap-wrappers
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (ghostscript (assoc-ref inputs "ghostscript"))
+ (coreutils (assoc-ref inputs "coreutils"))
+ (sed (assoc-ref inputs "sed")))
+ (for-each (lambda (file)
+ (wrap-program file
+ `("PATH" ":" prefix
+ (,(string-append ghostscript "/bin:"
+ coreutils "/bin:"
+ sed "/bin")))))
+ (find-files (string-append
+ out "/bin") "wrapper$")))))
+ (add-after 'install 'install-cups-filters-symlinks
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (for-each
+ (lambda (file)
+ (symlink file
+ (string-append out "/lib/cups/filter/" (basename file))))
+ (find-files (string-append out "/bin"))))))
(add-after 'install 'remove-pdf
(lambda* (#:key outputs #:allow-other-keys)
;; Remove 'manual.pdf' which is (1) useless (it's a
@@ -729,7 +764,9 @@ printer/driver specific, but spooler-independent PPD file.")
#:tests? #f ;no tests
#:make-flags '("CC=gcc")))
(inputs
- `(("ghostscript" ,ghostscript)
+ `(("coreutils" ,coreutils)
+ ("sed" ,sed)
+ ("ghostscript" ,ghostscript)
("foomatic-filters" ,foomatic-filters))) ;for 'foomatic-rip'
(native-inputs
`(("bc" ,bc)
--
2.28.0
next reply other threads:[~2020-08-08 8:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-08 8:09 Boris A. Dekshteyn [this message]
2020-12-15 21:53 ` bug#42758: [PATCH] gnu: foo2zjs: Fix install phase Leo Famulari
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200808080918.21304-1-boris.dekshteyn@gmail.com \
--to=boris.dekshteyn@gmail.com \
--cc=42758@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.