gnu: cups-filter: Install backends and filters under lib/cups.

This ensures that they are stripped during the 'strip' phase, thereby removing
references to GCC and linux-libre-headers that would otherwise be found in
debugging symbols.

* gnu/packages/cups.scm (cups-filters)[source]: Change pkgbackenddir and
  pkgfilterdir to $(PREFIX)/lib/cups/{filter,backend}.
  (cups)[arguments]: Adjust accordingly.
This commit is contained in:
Ludovic Courtès 2015-06-27 19:31:59 +02:00
parent 6a52df505a
commit ef2f51a445
1 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2015 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -54,10 +55,12 @@
"CUPS_DATADIR = $(PREFIX)/share/cups") "CUPS_DATADIR = $(PREFIX)/share/cups")
(("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)") (("pkgcupsserverrootdir = \\$\\(CUPS_SERVERROOT\\)")
"pkgcupsserverrootdir = $(PREFIX)") "pkgcupsserverrootdir = $(PREFIX)")
;; Choose standard directories notably so that binaries are
;; stripped.
(("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend") (("pkgbackenddir = \\$\\(CUPS_SERVERBIN\\)/backend")
"pkgbackenddir = $(PREFIX)/backend") "pkgbackenddir = $(PREFIX)/lib/cups/backend")
(("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter") (("pkgfilterdir = \\$\\(CUPS_SERVERBIN\\)/filter")
"pkgfilterdir = $(PREFIX)/filter"))))) "pkgfilterdir = $(PREFIX)/lib/cups/filter")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:make-flags (list (string-append "PREFIX=" %output)) `(#:make-flags (list (string-append "PREFIX=" %output))
@ -196,7 +199,7 @@ device-specific programs to convert and print many types of files.")
(string-append (string-append
"for dir in " "for dir in "
(assoc-ref %outputs "out") "/lib/cups/filter " (assoc-ref %outputs "out") "/lib/cups/filter "
filters "/filter")) filters "/lib/cups/filter"))
;; check for charsets in cups-filters output ;; check for charsets in cups-filters output
(("/usr/share/cups/charsets") (("/usr/share/cups/charsets")
@ -264,15 +267,16 @@ device-specific programs to convert and print many types of files.")
(lambda (f) (lambda (f)
(symlink f (symlink f
(string-append out "/lib/cups/filter" (basename f)))) (string-append out "/lib/cups/filter" (basename f))))
(find-files (string-append cups-filters "/filter") ".*")) (find-files (string-append cups-filters "/lib/cups/filter")))
;; backends ;; backends
(for-each (for-each
(lambda (f) (lambda (f)
(symlink (string-append cups-filters f) (symlink (string-append cups-filters f)
(string-append out "/lib/cups" f))) (string-append out "/lib/cups/backend/"
'("/backend/parallel" (basename f))))
"/backend/serial")) '("/lib/cups/backend/parallel"
"/lib/cups/backend/serial"))
;; banners ;; banners
(let ((banners "/share/cups/banners")) (let ((banners "/share/cups/banners"))