gnu: docbook-xsl update to 1.78.1
[jackhill/guix/guix.git] / gnu / packages / docbook.scm
CommitLineData
c915b404
LC
1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
3;;;
4;;; This file is part of GNU Guix.
5;;;
6;;; GNU Guix is free software; you can redistribute it and/or modify it
7;;; under the terms of the GNU General Public License as published by
8;;; the Free Software Foundation; either version 3 of the License, or (at
9;;; your option) any later version.
10;;;
11;;; GNU Guix is distributed in the hope that it will be useful, but
12;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14;;; GNU General Public License for more details.
15;;;
16;;; You should have received a copy of the GNU General Public License
17;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19(define-module (gnu packages docbook)
20 #:use-module (gnu packages)
21 #:use-module (gnu packages compression)
b777d784 22 #:use-module (gnu packages base)
c915b404
LC
23 #:use-module (guix licenses)
24 #:use-module (guix packages)
25 #:use-module (guix download)
26 #:use-module (guix build-system trivial)
27 #:autoload (gnu packages zip) (unzip))
28
29(define-public docbook-xml
30 (package
31 (name "docbook-xml")
32 (version "4.5")
33 (source (origin
34 (method url-fetch)
35 (uri (string-append "http://www.docbook.org/xml/" version
36 "/docbook-xml-" version ".zip"))
37 (sha256
38 (base32
39 "1d671lcjckjri28xfbf6dq7y3xnkppa910w1jin8rjc35dx06kjf"))))
40 (build-system trivial-build-system)
41 (arguments
42 '(#:builder (begin
43 (use-modules (guix build utils))
44
45 (let* ((unzip
46 (string-append (assoc-ref %build-inputs "unzip")
47 "/bin/unzip"))
48 (source (assoc-ref %build-inputs "source"))
49 (out (assoc-ref %outputs "out"))
50 (dtd (string-append out "/xml/dtd/docbook")))
51 (mkdir-p dtd)
52 (with-directory-excursion dtd
53 (system* unzip source))))
54 #:modules ((guix build utils))))
55 (native-inputs `(("unzip" ,unzip)))
56 (home-page "http://docbook.org")
57 (synopsis "DocBook XML DTDs for document authoring")
58 (description
59 "DocBook is general purpose XML and SGML document type particularly well
60suited to books and papers about computer hardware and software (though it is
61by no means limited to these applications.) This package provides XML DTDs.")
62 (license (x11-style "" "See file headers."))))
63
64(define-public docbook-xsl
65 (package
66 (name "docbook-xsl")
a37a3077 67 (version "1.78.1")
c915b404
LC
68 (source (origin
69 (method url-fetch)
70 (uri (string-append "mirror://sourceforge/docbook/docbook-xsl-"
71 version ".tar.bz2"))
72 (sha256
73 (base32
a37a3077 74 "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9"))))
c915b404
LC
75 (build-system trivial-build-system)
76 (arguments
77 `(#:builder (begin
78 (use-modules (guix build utils))
79
80 (let* ((bzip2 (assoc-ref %build-inputs "bzip2"))
81 (tar (assoc-ref %build-inputs "tar"))
82 (source (assoc-ref %build-inputs "source"))
83 (out (assoc-ref %outputs "out"))
84 (xsl (string-append out "/xml/xsl")))
85 (setenv "PATH" (string-append bzip2 "/bin"))
86 (system* (string-append tar "/bin/tar") "xvf" source)
87
88 (mkdir-p xsl)
89 (copy-recursively (string-append ,name "-" ,version)
90 (string-append xsl "/" ,name
91 "-" ,version))))
92 #:modules ((guix build utils))))
93 (native-inputs `(("bzip2" ,bzip2)
94 ("tar" ,tar)))
95 (home-page "http://docbook.org")
96 (synopsis "DocBook XSL style sheets for document authoring")
97 (description
98 "This package provides XSL style sheets for DocBook.")
99 (license (x11-style "" "See 'COPYING' file."))))