summaryrefslogtreecommitdiff
path: root/repo/devel/docbook-xsl.xibuild
blob: 18af313c252684d4b103060d054434778e3d7922 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/sh

MAKEDEPS="patch"
DEPS="libxml2 libxslt docbook-xml"

PKG_VER=1.79.2
SOURCE=https://github.com/docbook/xslt10-stylesheets/releases/download/release/$PKG_VER/docbook-xsl-nons-$PKG_VER.tar.bz2
ADDITIONAL="
    https://www.linuxfromscratch.org/patches/blfs/svn/docbook-xsl-nons-$PKG_VER-stack_fix-1.patch
"

DESC="XML stylesheets for Docbook-xml transformations"

prepare() {
    patch -Np1 -i docbook-xsl-nons-$PKG_VER-stack_fix-1.patch

}

package () {
    install -m755 -d $PKG_DEST/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER &&

    cp -R VERSION assembly common eclipse epub epub3 extensions fo        \
             highlighting html htmlhelp images javahelp lib manpages params  \
             profiling roundtrip slides template tests tools webhelp website \
             xhtml xhtml-1_1 xhtml5                                          \
             $PKG_DEST/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER &&

    ln -s VERSION $PKG_DEST/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER/VERSION.xsl &&

    install -m644 -D README \
                        $PKG_DEST/usr/share/doc/docbook-xsl-nons-$PKG_VER/README.txt &&
    install -m644    RELEASE-NOTES* NEWS* \
                    $PKG_DEST/usr/share/doc/docbook-xsl-nons-$PKG_VER


    if [ ! -d $PKG_DEST/etc/xml ]; then install -m755 -d $PKG_DEST/etc/xml; fi &&
        if [ ! -f $PKG_DEST/etc/xml/catalog ]; then
    xmlcatalog --noout --create $PKG_DEST/etc/xml/catalog
    fi &&

    xmlcatalog --noout --add "rewriteSystem" \
               "https://cdn.docbook.org/release/xsl-nons/$PKG_VER" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
               $PKG_DEST/etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "https://cdn.docbook.org/release/xsl-nons/$PKG_VER" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
        $PKG_DEST/etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteSystem" \
               "https://cdn.docbook.org/release/xsl-nons/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
        $PKG_DEST/etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "https://cdn.docbook.org/release/xsl-nons/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
        $PKG_DEST/etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteSystem" \
               "http://docbook.sourceforge.net/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
        $PKG_DEST/etc/xml/catalog &&

    xmlcatalog --noout --add "rewriteURI" \
               "http://docbook.sourceforge.net/release/xsl/current" \
               "/usr/share/xml/docbook/xsl-stylesheets-nons-$PKG_VER" \
        $PKG_DEST/etc/xml/catalog

}