-
Notifications
You must be signed in to change notification settings - Fork 0
/
docbook-xsl
164 lines (125 loc) · 5.79 KB
/
docbook-xsl
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/bin/bash
set -e
export CFLAGS="-O2 "
export CXXFLAGS="-O2 "
URL=https://github.com/docbook/xslt10-stylesheets/releases/download/release/1.79.2/docbook-xsl-nons-1.79.2.tar.bz2
TAR=$(echo $URL | sed -r 's|(.*)/||')
DIR=$(echo $TAR | sed 's|.tar.*||g')
PACKAGE=docbook-xsl
# Get Package
cd /blfs/builds
wget $URL
wget https://www.linuxfromscratch.org/patches/blfs/svn/docbook-xsl-nons-1.79.2-stack_fix-1.patch
tar -xvf $TAR
cd $DIR
# Build
mkdir -p /pkgs/$PACKAGE/etc
patch -Np1 -i ../docbook-xsl-nons-1.79.2-stack_fix-1.patch
install -v -m755 -d /pkgs/$PACKAGE/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2 &&
cp -v -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 \
/pkgs/$PACKAGE/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2 &&
ln -s VERSION /pkgs/$PACKAGE/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2/VERSION.xsl &&
install -v -m644 -D README \
/pkgs/$PACKAGE/usr/share/doc/docbook-xsl-nons-1.79.2/README.txt &&
install -v -m644 RELEASE-NOTES* NEWS* \
/pkgs/$PACKAGE/usr/share/doc/docbook-xsl-nons-1.79.2
install -v -m755 -d /pkgs/$PACKAGE/etc/xml &&
xmlcatalog --noout --create /pkgs/$PACKAGE/etc/xml/catalog
xmlcatalog --noout --add "rewriteSystem" \
"http://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"https://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"https://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"http://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"https://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"https://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/pkgs/$PACKAGE/etc/xml/catalog
# Install
cd /pkgs
rm -r /pkgs/$PACKAGE/etc/
sudo echo "libxml2" > /pkgs/$PACKAGE/depends
sudo cat > /pkgs/$PACKAGE/postinst << "EOF"
if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &&
if [ ! -f /etc/xml/catalog ]; then
xmlcatalog --noout --create /etc/xml/catalog
fi &&
xmlcatalog --noout --add "rewriteSystem" \
"http://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"https://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"https://cdn.docbook.org/release/xsl-nons/1.79.2" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"http://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"https://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"https://cdn.docbook.org/release/xsl-nons/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteSystem" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog &&
xmlcatalog --noout --add "rewriteURI" \
"http://docbook.sourceforge.net/release/xsl/current" \
"/usr/share/xml/docbook/xsl-stylesheets-nons-1.79.2" \
/etc/xml/catalog
EOF
sudo echo "" > /pkgs/$PACKAGE/make-depends
sudo tar -cvzpf $PACKAGE.tar.xz $PACKAGE
sudo cp $PACKAGE.tar.xz /finished
cd /blfs/builds
sudo rm -r $DIR