source: npl/overig/linuxdoc_tools/linuxdoc-tools.build

Last change on this file was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 34.9 KB
Line 
1#!/bin/bash
2
3###############################################################################
4# Script:  linuxdoc-tools.build
5# Purpose: Build & install all components that form the linuxdoc-tools
6#          Slackware Package.
7# Credit:  written by Stuart Winter <mozes@slackware.com>
8#          with the docbook build code by Jerome Pinot <ngc891@gmail.com>
9#          and some script code taken from Debian, Red Hat/Fedora &
10#          Linux From Scratch documentation
11#          http://www.linuxfromscratch.org/blfs/view/svn/index.html
12#          http://cblfs.cross-lfs.org/index.php/Category:DocBook_SGML
13#          Thanks guys! :-)
14###############################################################################
15
16# Version of LDT (which is also the .t?z package version)
17LINUXDOCTOOLSVER=$PKGVERSION
18
19# Bundled package versions:
20ASCIIDOCVER=8.6.9
21DSSSLSTYLESHEETSVER=1.79
22XSLSTYLESHEETSVER=1.78.1
23DOCBOOKUTILSVER=0.6.14
24SGMLDTD3VER=3.1
25SGMLDTD4VER=4.5
26XMLDTDVER=4.5
27GNOMEDOCUTILSVER=0.20.10
28GTKDOCVER=1.24
29SGMLSPLVER=1.03ii
30OPENJADEVER=1.3.3-pre1
31OPENSPVER=1.5.2
32SGMLCOMMONVER=0.6.3
33XMLTOVER=0.0.26
34DOCBOOK2XVER=0.8.8
35
36# Determine the general CFLAGS for the known architectures:
37case $ARCH in
38  arm)     export SLKCFLAGS="-O2 -march=armv5te"
39           export LIBDIRSUFFIX=""
40           export HOSTTARGET="-gnueabi"
41           ;;
42  armv7hl) export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
43           export LIBDIRSUFFIX=""
44           export HOSTTARGET="-gnueabi"
45           ;;
46  i586)    export SLKCFLAGS="-O2 -march=i586 -mtune=i686"
47           export LIBDIRSUFFIX=""
48           export HOSTTARGET=""
49           ;;
50  s390)    export SLKCFLAGS="-O2"
51           export LIBDIRSUFFIX=""
52           export HOSTTARGET=""
53           ;;
54  x86_64)  export SLKCFLAGS="-O2 -fPIC"
55           export LIBDIRSUFFIX="64"
56           export HOSTTARGET=""
57           ;;
58esac
59
60# The build order is purposive.
61# The build order for the XML style sheets & docbook stuff comes from
62# the Linux from Scratch documentation; the other rest is because of
63# dependency build order.
64
65####################### Build AsciiDoc ##############################
66
67# Extract source:
68cd $TMP
69tar xvf $CWD/sources/asciidoc-$ASCIIDOCVER.tar.*z*
70cd asciidoc-$ASCIIDOCVER || exit 1
71chown -R root:root .
72find . \
73  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
74  -exec chmod 755 {} \; -o \
75  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
76  -exec chmod 644 {} \;
77
78# Configure:
79./configure \
80  --prefix=/usr \
81  --sysconfdir=/etc \
82  --docdir=/usr/doc/asciidoc-$ASCIIDOCVER \
83  --mandir=/usr/man || exit 1
84
85# Install:
86make install && make docs || exit 1
87find /etc/asciidoc -type f -print0 | xargs -0 chmod 644
88
89# Copy docs:
90mkdir -vpm755 /usr/doc/asciidoc-$ASCIIDOCVER
91cp -fav \
92  BUGS CHANGELOG COPY* README \
93  /usr/doc/asciidoc-$ASCIIDOCVER/
94
95####################### Build sgml-common ############################
96
97# Extract source.  We're using a source RPM since it contains a number of
98# patches that we need:
99cd $TMP
100mkdir sgml-common && cd sgml-common
101rpm2cpio $CWD/sources/sgml-common-${SGMLCOMMONVER}*.src.rpm | cpio -div || exit 1
102# The real source archive is stored inside the source RPM, you see:
103tar xvf sgml-common-$SGMLCOMMONVER.tgz
104cd sgml-common-$SGMLCOMMONVER || exit 1
105chown -R root:root .
106find . \
107  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
108  -exec chmod 755 {} \; -o \
109  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
110  -exec chmod 644 {} \;
111
112# Apply patches (these are included in the source rpm):
113# Don't include the XML dir patch because we keep our stuff in /usr/share/sgml.
114for i in \
115  sgml-common-quotes.patch \
116  sgml-common-umask.patch ; do
117    patch --verbose -p1 < ../$i
118done || exit 1
119
120# Configure:
121# autoconf doesn't work anymore..
122#aclocal
123#automake --add-missing --copy
124#autoreconf -vif
125# but this does..
126for file in COPYING INSTALL install-sh missing mkinstalldirs; do
127   rm -f $file
128   cp -fav /usr/share/automake-*/$file .
129done
130./configure \
131  --prefix=/usr \
132  --mandir=/usr/man \
133  --infodir=/usr/info \
134  --sysconfdir=/etc \
135  || exit 1
136
137# Build & install:
138make -e 'mkdir_p=mkdir -p' install || exit 1
139
140# Create catalog:
141install-catalog --add /etc/sgml/sgml-ent.cat \
142  /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
143install-catalog --add /etc/sgml/sgml-docbook.cat \
144  /etc/sgml/sgml-ent.cat
145
146# Copy docs:
147mkdir -vpm755 /usr/doc/sgml-common-$SGMLCOMMONVER
148cp -fav \
149  COPYING AUTHORS INSTALL NEWS README ChangeLog \
150  /usr/doc/sgml-common-$SGMLCOMMONVER
151
152####################### Install docbooks ############################
153
154# Extract source:
155cd $TMP
156mkdir sgml-dtd
157cd sgml-dtd
158# Debian handily package all docbooks past and present in one archive
159# but they version number the archive with the latest version.
160tar xvf $CWD/sources/docbook_*orig*.tar.*z*
161cd docbook* || exit 1
162chown -R root:root .
163find . \
164  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
165  -exec chmod 755 {} \; -o \
166  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
167  -exec chmod 644 {} \;
168
169
170###############
171## sgml-dtd3 ##
172###############
173
174( cd docbook-$SGMLDTD3VER
175  pwd
176
177 # Remove the ENT definitions from the catalog file:
178  sed -i -e '/ISO 8879/d' docbook.cat
179 # Replace the DTDDECL catalog entry, which is not supported by Linux SGML tools,
180 # with the SGMLDECL catalog entry
181  sed -i -e 's|DTDDECL "-//OASIS//DTD Docbook V3.1//EN"|SGMLDECL|g' docbook.cat
182
183  # Install:
184  mkdir -vpm755 /etc/sgml
185   mkdir -vpm755 /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER
186   install -vpm644 docbook.cat /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog
187   install -vpm644 *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/
188
189   # Update SGML catalog:
190   install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD3VER.cat \
191     /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog
192   install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD3VER.cat \
193     /etc/sgml/sgml-docbook.cat
194
195# Use only the most current 3.x version of DocBook SGML DTD:
196cat >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog << "EOF"
197  -- Begin Single Major Version catalog changes --
198
199PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd"
200
201  -- End Single Major Version catalog changes --
202EOF
203
204  # Copy docs:
205  mkdir -vpm755 /usr/doc/sgml-dtd-$SGMLDTD3VER
206  cp -fav \
207    ChangeLog *.txt \
208    /usr/doc/sgml-dtd-$SGMLDTD3VER/ 
209)
210
211###############
212## sgml-dtd4 ##
213###############
214# For reference:
215# http://cblfs.cross-lfs.org/index.php/DocBook_SGML_DTD-4.x
216# http://www.linuxfromscratch.org/blfs/view/svn/pst/sgml-dtd.html
217
218
219( cd docbook-$SGMLDTD4VER
220  pwd
221
222  # Remove the ENT definitions from the catalog file:
223  sed -i -e '/ISO 8879/d' -e '/gml/d' docbook.cat
224
225  # Install:
226  mkdir -vpm755 /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER
227  install -vpm644 docbook.cat /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog
228  cp -fav *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER
229  # Update SGML catalog:
230  install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD4VER.cat \
231    /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog
232  install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD4VER.cat \
233    /etc/sgml/sgml-docbook.cat
234
235  # Use only the most current 4.x version of DocBook SGML DTD :
236  # When you upgrade sgml-dtd4, put the PREVIOUS version number in
237  # with the lines below.
238cat << EOF >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog
239  -- Begin Single Major Version catalog changes --
240EOF
241for i in 4.4 4.3 4.2 4.1 4.0; do
242cat << EOF >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog
243PUBLIC "-//OASIS//DTD DocBook V${i}//EN" "docbook.dtd"
244EOF
245done
246cat << EOF >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog
247
248  -- End Single Major Version catalog changes --
249EOF
250
251  # Copy docs:
252  mkdir -vpm755 /usr/doc/sgml-dtd4-$SGMLDTD4VER
253  cp -fav \
254    README \
255    /usr/doc/sgml-dtd4-$SGMLDTD4VER/
256
257)
258
259####################### Build OpenSP ############################
260
261# Extract source:
262cd $TMP
263mkdir opensp && cd opensp
264rpm2cpio $CWD/sources/opensp-${OPENSPVER}*.src.rpm | cpio -div || exit 1
265tar xvf OpenSP-$OPENSPVER.tar.gz
266cd OpenSP-$OPENSPVER || exit 1
267chown -R root:root .
268find . \
269  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
270  -exec chmod 755 {} \; -o \
271  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
272  -exec chmod 644 {} \;
273
274sed -i 's:32,:253,:' lib/Syntax.cxx
275sed -i 's:LITLEN          240 :LITLEN          8092:' unicode/{gensyntax.pl,unicode.syn}
276
277# Stop OpenJade from segfaulting:
278patch --verbose -p1 < ../opensp-sigsegv.patch || exit 1
279# Inconsistency between help & man page:
280patch --verbose -p1 < ../opensp-manpage.patch || exit 1
281patch --verbose -p1 < ../opensp-nodeids.patch || exit 1
282
283# Configure without optimisation.  OpenSP & OpenJade
284# are sensitive to optimisations, resulting in segfaults,
285# particularly on the ARM platform.  Apparently -O1 will work but
286# let's just leave it as is.
287#
288# This is configured not to build the documentation.  If anybody really needs
289# it, let me know and I'll adjust the build script - it's just a PITA to
290# get working.
291./configure \
292  --prefix=/usr \
293  --libdir=/usr/lib${LIBDIRSUFFIX} \
294  --mandir=/usr/man \
295  --datadir=/usr/share \
296  --infodir=/usr/info \
297  --disable-dependency-tracking \
298  --disable-static \
299  --disable-doc-build \
300  --enable-http \
301  --enable-default-catalog=/etc/sgml/catalog \
302  --enable-default-search-path=/usr/share/sgml \
303  || exit 1
304
305# Build:
306make pkgdatadir=/usr/share/sgml/OpenSP-$OPENSPVER || exit 1
307
308# Install:
309make install DESTDIR=/ || exit 1
310
311# This allows OpenJade to link with OpenSP.
312( cd /usr/lib${LIBDIRSUFFIX} && ln -vsf libosp.so libsp.so )
313
314# Rename sx to sgml2xml & create symlinks:
315mv -f /usr/bin/osx /usr/bin/osgml2xml
316( cd /usr/bin ; ln -vfs osgml2xml osx )
317
318# Create symlinks to binaries:
319( cd /usr/bin
320  for file in nsgmls sgmlnorm spam spent sgml2xml ; do
321     rm -fv $file
322     ln -vfs o$file $file
323  done
324)
325
326# Fix man pages:
327# Sorry, but OpenSP needs xmlto installed to create its man pages and documentation.
328# Due to build dependency order, we build xmlto later on.  I did try and move xmlto earlier
329# in the build but didn't get the build order correct. If anybody REALLY misses this documentation,
330# email mozes@slackware.com and I'll have another go at adjusting the build order.
331#
332# Building man pages has been disabled with ./configure --disable-doc-build.
333#
334#( cd /usr/man/man1
335#  mv -fv osx.1 osgml2xml.1
336#  ln -vfs osgml2xml.1 osx.1
337#  for file in nsgmls sgmlnorm spam spent sgml2xml ; do
338#     rm -f ${file}.1*
339#     ln -vfs o${file}.1 ${file}.1
340#  done
341#)
342
343# Rename docs directory:
344mv -fv /usr/doc/OpenSP /usr/doc/OpenSP-$OPENSPVER
345
346####################### Build OpenJade ############################
347# Reference:
348#  http://cblfs.cross-lfs.org/index.php/OpenJade
349
350# Extract source:
351cd $TMP
352tar xvf $CWD/sources/openjade-${OPENJADEVER}.tar.*z*
353cd openjade-${OPENJADEVER} || exit 1
354chown -R root:root .
355find . \
356  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
357  -exec chmod 755 {} \; -o \
358  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
359  -exec chmod 644 {} \;
360
361# Apply patches:
362sed -i "s/iostream.h/iostream/g" style/MultiLineInlineNote.cxx
363
364# GCC 4.6 patch:
365xz -dc $CWD/sources/openjade-1.3.2-gcc46.patch.xz | patch --verbose -p1 || exit 1
366
367# Install the old Perl 4 'getopts' function.  This has been deprecated in Perl 5.16
368# and since it seems that OpenJade isn't being actively released by upstream, we'll
369# work around by supplying it to OpenJade directly.  It's only a build-time fix anyway
370# so it's ok to have a dirty work-around:
371xz -dc $CWD/sources/openjade-1.3-getopts.pl.xz > getopts.pl
372
373# Configure without optimisation.
374# OpenSP & OpenJade are sensitive to optimisations and can result
375# in segfaults with anything other than O2 - particularly on the ARM
376# platform.
377./configure \
378  --prefix=/usr \
379  --libdir=/usr/lib${LIBDIRSUFFIX} \
380  --enable-splibdir=/usr/lib${LIBDIRSUFFIX} \
381  --disable-static \
382  --mandir=/usr/man \
383  --infodir=/usr/info \
384  --disable-static \
385  --enable-http \
386  --enable-default-catalog=/etc/sgml/catalog \
387  --enable-default-search-path=/usr/share/sgml \
388  --datadir=/usr/share/sgml/openjade-$OPENJADEVER \
389  || exit 1
390
391# Build (setting the perl library to be the PWD so it finds the old 'getopts.pl'):
392make PERL5LIB=$PWD || exit 1
393
394# Install:
395mkdir -p /etc/sgml
396make install || exit 1
397make install-man || exit 1
398( cd /usr/bin && ln -vfs openjade jade )
399( cd /usr/man/man1 && ln -vfs openjade.1 jade.1 )
400ln -vsf libogrove.so /usr/lib${LIBDIRSUFFIX}/libgrove.so
401ln -vsf libospgrove.so /usr/lib${LIBDIRSUFFIX}/libspgrove.so
402ln -vsf libostyle.so /usr/lib${LIBDIRSUFFIX}/libstyle.so
403install -vpm644 dsssl/catalog /usr/share/sgml/openjade-$OPENJADEVER
404install -vpm644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/openjade-$OPENJADEVER
405
406# Update SGML catalog:
407install-catalog --add /etc/sgml/openjade-$OPENJADEVER.cat \
408  /usr/share/sgml/openjade-$OPENJADEVER/catalog
409install-catalog --add /etc/sgml/sgml-docbook.cat \
410  /etc/sgml/openjade-$OPENJADEVER.cat
411
412# Update system configuration:
413echo "SYSTEM \"http://www.oasis-open.org/docbook/xml/${XMLDTDVER}/docbookx.dtd\" \
414    \"/usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/docbookx.dtd\"" >> \
415    /usr/share/sgml/openjade-${OPENJADEVER}/catalog
416
417# Copy docs:
418mkdir -vpm755 /usr/doc/openjade-$OPENJADEVER
419cp -fav \
420  COPYING NEWS README VERSION \
421  doc/* dsssl/README.jadetex pubtext jadedoc \
422  /usr/doc/openjade-$OPENJADEVER
423
424####################### Build dsssl-stylesheets ####################
425
426# Extract source:
427cd $TMP
428mkdir docbook-dsssl-$DSSSLSTYLESHEETSVER
429cd docbook-dsssl-$DSSSLSTYLESHEETSVER
430tar xvf $CWD/sources/docbook-dsssl-$DSSSLSTYLESHEETSVER.tar.*z* || exit 1
431tar xvf $CWD/sources/docbook-dsssl-doc-$DSSSLSTYLESHEETSVER.tar.*z* || exit 1
432cd docbook-dsssl-$DSSSLSTYLESHEETSVER || exit 1
433chown -R root:root .
434find . \
435  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
436  -exec chmod 755 {} \; -o \
437  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
438  -exec chmod 644 {} \;
439
440# Install:
441install -pm755 bin/collateindex.pl /usr/bin
442install -pm644 bin/collateindex.pl.1 /usr/man/man1
443# Eeek!  Debian trim this down but we'll leave it for the moment:
444mkdir -vpm755 /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/common
445cp -fav * /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER
446
447# Update catalog:
448install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \
449  /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/catalog
450install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \
451  /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/common/catalog
452install-catalog --add /etc/sgml/sgml-docbook.cat \
453  /etc/sgml/dsssl-docbook-stylesheets.cat
454
455# Copy docs:
456mkdir -vpm755 /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER
457cp -fav \
458  WhatsNew VERSION RELEASE-NOTES.txt README ChangeLog BUGS \
459  /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER
460cp -fav \
461  frames/README \
462  /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/README.frames
463
464####################### Build docbook-utils ########################
465
466# docbook-utils requires some of the docbook docs to be installed
467# prior to being built.
468
469# Extract source:
470cd $TMP
471mkdir docbook-utils && cd docbook-utils
472rpm2cpio $CWD/sources/docbook-utils-${DOCBOOKUTILSVER}*.src.rpm | cpio -div || exit 1
473tar xvf docbook-utils-$DOCBOOKUTILSVER.tar.gz
474cd docbook-utils-$DOCBOOKUTILSVER || exit 1
475chown -R root:root .
476find . \
477  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
478  -exec chmod 755 {} \; -o \
479  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
480  -exec chmod 644 {} \;
481
482# Apply patches:
483for i in \
484  docbook-utils-spaces.patch \
485  docbook-utils-2ndspaces.patch \
486  docbook-utils-w3mtxtconvert.patch \
487  docbook-utils-grepnocolors.patch \
488  docbook-utils-sgmlinclude.patch \
489  docbook-utils-rtfmanpage.patch \
490  docbook-utils-papersize.patch \
491  docbook-utils-nofinalecho.patch \
492  docbook-utils-newgrep.patch ; do
493    patch --verbose -p1 < ../$i
494done || exit 1
495
496# Configure:
497CFLAGS="$SLKCFLAGS" \
498CXXFLAGS="$SLKCFLAGS" \
499CPPFLAGS="$SLKCFLAGS" \
500./configure \
501  --prefix=/usr \
502  --sysconfdir=/etc \
503  --localstatedir=/var \
504  --mandir=/usr/man \
505  || exit 1
506
507# Build:
508make || exit 1
509
510# Install:
511make install htmldir=/usr/doc/docbook-utils-$DOCBOOKUTILSVER/html || exit 1
512
513# grep-2.7 demands [[:space:]] instead of [:space:]
514if ! fgrep '[[:space:]]' /usr/bin/jw ; then
515  sed -i "s/\[:space:\]/\[\[:space:\]\]/g" /usr/bin/jw
516fi
517
518# db2html is not just a symlink, as it has to create the output directory:
519rm -f /usr/bin/db2html
520install -vpm755 ../db2html /usr/bin
521install -vpm644 ../gdp-both.dsl /usr/share/sgml/docbook/utils-$DOCBOOKUTILSVER/docbook-utils.dsl
522
523# Make binary symlinks:
524( cd /usr/bin
525  for util in dvi html pdf ps rtf ; do
526     rm -f db2$util
527     ln -vfs docbook2$util db2$util
528  done
529)
530
531# Make man page symlinks:
532( cd /usr/man/man1
533  for util in dvi html pdf ps rtf ; do
534     rm -f db2$util.1*
535     ln -vfs jw.1 db2$util.1
536  done
537)
538
539# Copy docs:
540mkdir -vpm755 /usr/doc/docbook-utils-$DOCBOOKUTILSVER
541cp -fav \
542  AUTHORS NEWS README TODO \
543  /usr/doc/docbook-utils-$DOCBOOKUTILSVER
544
545############################
546## xml-dtd / docbook-xml  ##
547############################
548
549# Extract source:
550cd $TMP
551mkdir xml-dtd-$XMLDTDVER
552cd xml-dtd-$XMLDTDVER
553unzip $CWD/sources/docbook-xml-$XMLDTDVER.zip || exit 1
554chown -R root:root .
555find . \
556  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
557  -exec chmod 755 {} \; -o \
558  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
559  -exec chmod 644 {} \;
560
561# Install 4.x catalog:
562mkdir -vpm755 /usr/share/xml/docbook/xml-dtd-$XMLDTDVER
563cp -fav docbook.cat *.dtd *.mod ent/ \
564  /usr/share/xml/docbook/xml-dtd-$XMLDTDVER
565
566# Use the Unicode-4 entities from sgml-common to fix errors such as
567# "1D6C2" is not a character number in the document character set
568( cd /usr/share/xml/docbook/xml-dtd-$XMLDTDVER/ent
569  rm -fv isogrk4.ent
570  ln -vfs ../../../../sgml/xml-iso-entities-*.*/ISOgrk4.ent isogrk4.ent )
571
572# Create config files:
573mkdir -vpm755 /etc/xml
574
575# This code is taken directly from:
576# http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html#DocBook
577#
578# Populate /etc/xml/docbook:
579#
580if [ ! -e /etc/xml/docbook ]; then
581    xmlcatalog --noout --create /etc/xml/docbook
582fi &&
583xmlcatalog --noout --add "public" \
584    "-//OASIS//DTD DocBook XML V${XMLDTDVER}//EN" \
585    "http://www.oasis-open.org/docbook/xml/${XMLDTDVER}/docbookx.dtd" \
586    /etc/xml/docbook &&
587xmlcatalog --noout --add "public" \
588    "-//OASIS//DTD DocBook XML CALS Table Model V${XMLDTDVER}//EN" \
589    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/calstblx.dtd" \
590    /etc/xml/docbook &&
591xmlcatalog --noout --add "public" \
592    "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
593    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/soextblx.dtd" \
594    /etc/xml/docbook &&
595xmlcatalog --noout --add "public" \
596    "-//OASIS//ELEMENTS DocBook XML Information Pool V${XMLDTDVER}//EN" \
597    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/dbpoolx.mod" \
598    /etc/xml/docbook &&
599xmlcatalog --noout --add "public" \
600    "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V${XMLDTDVER}//EN" \
601    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/dbhierx.mod" \
602    /etc/xml/docbook &&
603xmlcatalog --noout --add "public" \
604    "-//OASIS//ELEMENTS DocBook XML HTML Tables V${XMLDTDVER}//EN" \
605    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/htmltblx.mod" \
606    /etc/xml/docbook &&
607xmlcatalog --noout --add "public" \
608    "-//OASIS//ENTITIES DocBook XML Notations V${XMLDTDVER}//EN" \
609    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/dbnotnx.mod" \
610    /etc/xml/docbook &&
611xmlcatalog --noout --add "public" \
612    "-//OASIS//ENTITIES DocBook XML Character Entities V${XMLDTDVER}//EN" \
613    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/dbcentx.mod" \
614    /etc/xml/docbook &&
615xmlcatalog --noout --add "public" \
616    "-//OASIS//ENTITIES DocBook XML Additional General Entities V${XMLDTDVER}//EN" \
617    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}/dbgenent.mod" \
618    /etc/xml/docbook &&
619xmlcatalog --noout --add "rewriteSystem" \
620    "http://www.oasis-open.org/docbook/xml/${XMLDTDVER}" \
621    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}" \
622    /etc/xml/docbook &&
623xmlcatalog --noout --add "rewriteURI" \
624    "http://www.oasis-open.org/docbook/xml/${XMLDTDVER}" \
625    "file:///usr/share/xml/docbook/xml-dtd-${XMLDTDVER}" \
626    /etc/xml/docbook
627
628#
629# Populate /etc/xml/catalog:
630#
631if [ ! -e /etc/xml/catalog ]; then
632    xmlcatalog --noout --create /etc/xml/catalog
633fi &&
634xmlcatalog --noout --add "delegatePublic" \
635    "-//OASIS//ENTITIES DocBook XML" \
636    "file:///etc/xml/docbook" \
637    /etc/xml/catalog &&
638xmlcatalog --noout --add "delegatePublic" \
639    "-//OASIS//DTD DocBook XML" \
640    "file:///etc/xml/docbook" \
641    /etc/xml/catalog &&
642xmlcatalog --noout --add "delegateSystem" \
643    "http://www.oasis-open.org/docbook/" \
644    "file:///etc/xml/docbook" \
645    /etc/xml/catalog &&
646xmlcatalog --noout --add "delegateURI" \
647    "http://www.oasis-open.org/docbook/" \
648    "file:///etc/xml/docbook" \
649    /etc/xml/catalog
650
651# Rewrites for older docbooks.  This allows older docbooks to be referenced.
652# It means, however, that you __*shouldn't* have these older docbooks__
653# installed on your system;
654# so if you just keep the Slackware linuxdoc-tools package you'll be fine:
655#
656for DTDVERSION in 4.1.2 4.2 4.3 4.4
657do
658  xmlcatalog --noout --add "public" \
659    "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
660    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
661    /etc/xml/docbook
662  xmlcatalog --noout --add "rewriteSystem" \
663    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
664    "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \
665    /etc/xml/docbook
666  xmlcatalog --noout --add "rewriteURI" \
667    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
668    "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \
669    /etc/xml/docbook
670  xmlcatalog --noout --add "delegateSystem" \
671    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
672    "file:///etc/xml/docbook" \
673    /etc/xml/catalog
674  xmlcatalog --noout --add "delegateURI" \
675    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
676    "file:///etc/xml/docbook" \
677    /etc/xml/catalog
678done
679
680# Copy docs:
681mkdir -pm755 /usr/doc/xml-dtd-$XMLDTDVER
682cp -favv \
683  ChangeLog README \
684  /usr/doc/xml-dtd-$XMLDTDVER
685
686###############################
687## docbook-xsl (stylesheets) ##
688###############################
689
690# Extract source:
691cd $TMP
692mkdir docbook-style-xsl && cd docbook-style-xsl
693rpm2cpio $CWD/sources/docbook-style-xsl-${XSLSTYLESHEETSVER}*.src.rpm | cpio -div || exit 1
694tar xvf docbook-xsl-$XSLSTYLESHEETSVER.tar.bz2
695# This unpacks atop of the main tree:
696tar xvf docbook-xsl-doc-$XSLSTYLESHEETSVER.tar.bz2
697
698# Enter unpacked sources:
699cd docbook-xsl-$XSLSTYLESHEETSVER || exit 1
700
701chown -R root:root .
702find . \
703  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
704  -exec chmod 755 {} \; -o \
705  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
706  -exec chmod 644 {} \;
707
708# Apply patches:
709for i in \
710  docbook-xsl-pagesetup.patch \
711  docbook-xsl-marginleft.patch \
712  docbook-xsl-newmethods.patch \
713  docbook-xsl-non-constant-expressions.patch \
714  docbook-xsl-list-item-body.patch \
715  docbook-xsl-mandir.patch ; do
716   patch --verbose -p1 < ../$i
717done || exit 1
718
719# Install:
720mkdir -vpm755 /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER
721cp -fav \
722 VERSION common eclipse extensions fo highlighting html \
723 htmlhelp images javahelp lib manpages params profiling \
724 slides template tools website wordml xhtml             \
725 /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER
726# Some Linux distributions have this here, so we install a compatibility symlink:
727# (this convoluted way of doing it is for makepkg's benefit)
728mkdir -vpm755 /usr/share/xml/docbook/stylesheet
729( cd /usr/share/xml/docbook/stylesheet
730  rm -fv docbook-xsl
731  ln -vfs ../xsl-stylesheets-$XSLSTYLESHEETSVER docbook-xsl )
732
733# Some stylesheets will look for VERSION.xsl rather than VERSION.
734# They are the same in the sources, so make a compatibility symlink:
735if [ ! -r /usr/share/xml/docbook/stylesheet/docbook-xsl/VERSION.xsl ]; then
736  ( cd /usr/share/xml/docbook/stylesheet/docbook-xsl ; ln -sf VERSION VERSION.xsl )
737fi
738
739# Create config files:
740if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi
741if [ ! -f /etc/xml/catalog ]; then
742  xmlcatalog --noout --create /etc/xml/catalog
743fi
744
745# Configure system:
746xmlcatalog --noout --add "rewriteSystem" \
747  "http://docbook.sourceforge.net/release/xsl/$XSLSTYLESHEETSVER" \
748  "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \
749  /etc/xml/catalog
750
751xmlcatalog --noout --add "rewriteURI" \
752  "http://docbook.sourceforge.net/release/xsl/$XSLSTYLESHEETSVER" \
753  "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \
754  /etc/xml/catalog
755
756xmlcatalog --noout --add "rewriteSystem" \
757  "http://docbook.sourceforge.net/release/xsl/current" \
758  "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \
759  /etc/xml/catalog
760
761xmlcatalog --noout --add "rewriteURI" \
762  "http://docbook.sourceforge.net/release/xsl/current" \
763  "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \
764  /etc/xml/catalog
765
766# Copy docs:
767mkdir -vpm755 /usr/doc/docbook-xsl-$XSLSTYLESHEETSVER
768cp -fav doc/* README* RELEASE-NOTES* NEWS* \
769         /usr/doc/docbook-xsl-$XSLSTYLESHEETSVER
770
771####################### Build xmlto ################################
772
773# Extract source:
774cd $TMP
775mkdir xmlto && cd xmlto
776#tar xvf $CWD/sources/xmlto-$XMLTOVER.tar.*z*
777rpm2cpio $CWD/sources/xmlto-${XMLTOVER}*.src.rpm | cpio -div || exit 1
778tar xvvf xmlto-$XMLTOVER.tar.*z*
779cd xmlto-$XMLTOVER || exit 1
780chown -R root:root .
781find . \
782  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
783  -exec chmod 755 {} \; -o \
784  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
785  -exec chmod 644 {} \;
786
787# Configure:
788./configure \
789  --prefix=/usr \
790  --sysconfdir=/etc \
791  --localstatedir=/var \
792  || exit 1
793
794# Build:
795make || exit 1
796
797# Install:
798make install || exit 1
799
800# Copy docs:
801mkdir -vpm755 /usr/doc/xmlto-$XMLTOVER
802cp -fav \
803  AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README \
804  /usr/doc/xmlto-$XMLTOVER
805
806####################### Build SGMLSPL ##############################
807
808# Extract source:
809cd $TMP
810tar xvf $CWD/sources/libsgmls-perl_$SGMLSPLVER.orig.tar.*z* || exit 1
811cd libsgmls-perl-$SGMLSPLVER.orig
812chown -R root:root .
813find . \
814  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
815  -exec chmod 755 {} \; -o \
816  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
817  -exec chmod 644 {} \;
818tar xvvf $CWD/sources/libsgmls-perl_$SGMLSPLVER-*.debian.tar.xz || exit 1
819
820# Apply patches from Debian:
821cat debian/patches/series | while read dpf ; do patch -p1 --verbose < debian/patches/$dpf || exit 1 ; done || exit 1
822
823# Configure:
824perl Makefile.PL INSTALLDIRS=vendor || exit 1
825sed -i 's?/share/man?/man/?g' Makefile
826
827# Build:
828make OPTIMIZE="$SLKCFLAGS" || exit 1
829
830# Install:
831make install PREFIX=/usr
832sed 's?usr/share/doc/sgmls-doc/?usr/doc/sgmlspl-'"$SGMLSPLVER"'/?g' sgmlspl.1 > /usr/man/man1/sgmlspl.1
833mv -fv /usr/bin/sgmlspl{.pl,}
834
835# Copy docs:
836mkdir -vpm755 /usr/doc/sgmlspl-$SGMLSPLVER
837cp -fav \
838  BUGS COPYING README TODO \
839  /usr/doc/sgmlspl-$SGMLSPLVER
840cp -fav \
841  DOC/HTML/{SGMLSpm,sgmlspl} \
842  /usr/doc/sgmlspl-$SGMLSPLVER
843
844####################### Build linuxdoc-tools ########################
845
846# Extract source:
847cd $TMP
848mkdir linuxdoc-tools && cd linuxdoc-tools
849#rpm2cpio $CWD/sources/linuxdoc-tools-${LINUXDOCTOOLSVER}*.src.rpm | cpio -div || exit 1
850#tar xvf linuxdoc-tools_$LINUXDOCTOOLSVER.tar.gz
851tar xvf $CWD/sources/linuxdoc-tools_$LINUXDOCTOOLSVER.tar.xz
852cd linuxdoc-tools-$LINUXDOCTOOLSVER || exit 1
853
854chown -R root:root .
855find . \
856  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
857  -exec chmod 755 {} \; -o \
858  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
859  -exec chmod 644 {} \;
860
861# Remove Tex from the $PATH so that we don't build formats of the linuxdoc-tools
862# guide which don't work with tetex-3.  These do work with texlive, but Slackware doesn't
863# ship that, and just how many alternate versions of the documentation do we need anyway? :-)
864OPATH=$PATH
865export PATH=$( echo $PATH | sed -e 's?:/usr/share/texmf/bin??g' -e 's?/usr/share/texmf/bin:??g' )
866
867# Apply patches (these were originally taken from the Fedora SRPM but broken out later
868# when the 'original' source from Debian began to be used)
869for i in \
870  linuxdoc-tools-0.9.13-letter.patch.xz \
871  linuxdoc-tools-0.9.20-lib64.patch.xz ; do
872    xzcat $CWD/sources/$i | patch -p1 || exit 1
873done || exit 1
874
875# Find out what our Vendor perl directory is:
876eval $(perl '-V:installvendorlib')
877mkdir -p $PKG/$installvendorlib
878
879# Configure:
880CFLAGS="$SLKCFLAGS" \
881CXXFLAGS="$SLKCFLAGS" \
882CPPFLAGS="$SLKCFLAGS" \
883./configure \
884  --prefix=/usr \
885  --with-perllibdir=$installvendorlib \
886  --mandir=/usr/man \
887  --with-installed-nsgmls \
888  --infodir=/usr/info \
889  || exit 1
890#  --with-installed-iso-entities \
891#  --with-texdir=/usr/share/texmf/tex/latex/ \
892
893# Adjust doc dir location:
894sed -i 's?share/doc/linuxdoc-tools?doc/linuxdoc-tools-'"$LINUXDOCTOOLSVER"'?g' Makefile
895
896( cd entity-map && autoconf && ./configure --prefix=/usr )
897
898# Build serial.  This does build in parallel but
899# I find linuxdoc-tools to be fragile between versions:
900make \
901   perl5libdir=$PKG/$installvendorlib \
902   OPTIMIZE="$SLKCFLAGS" \
903   PERL=/usr/bin/perl \
904   DESTDIR=/ \
905   LINUXDOCDOC=/usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER || exit 1
906
907# Install:
908make install \
909   PERL=/usr/bin/perl \
910   perl5libdir=$PKG/$installvendorlib \
911   DESTDIR=/ \
912   LINUXDOCDOC=/usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER || exit 1
913
914# Install info page:
915cat debian/linuxdoc-tools.info-base doc/guide.info > /usr/info/linuxdoc-sgml.info
916
917# This package contains a number of programs.
918# We maintain our own change log for this package.  Since the package name is
919# 'linuxdoc-tools', let's put our changelog into here:
920install -vpm644 $CWD/ChangeLog.txt /usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER/Slackware-ChangeLog.txt
921
922# Restore $PATH:
923export PATH=$OPATH
924
925####################### Build gnome-doc-utils #######################
926
927# Extract source:
928cd $TMP
929tar xvf $CWD/sources/gnome-doc-utils-$GNOMEDOCUTILSVER.tar.*z*
930cd gnome-doc-utils-* || exit 1
931
932chown -R root:root .
933find . \
934 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
935 -exec chmod 755 {} \; -o \
936 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
937 -exec chmod 644 {} \;
938
939# Configure:
940CFLAGS="$SLKCFLAGS" \
941CXXFLAGS="$SLKCFLAGS" \
942CPPFLAGS="$SLKCFLAGS" \
943./configure \
944  --prefix=/usr \
945  --libdir=/usr/lib${LIBDIRSUFFIX} \
946  --sysconfdir=/etc \
947  --localstatedir=/var \
948  --mandir=/usr/man \
949  --disable-scrollkeeper \
950  --enable-build-utils \
951  --build=$ARCH-slackware-linux$HOSTTARGET || exit 1
952
953# No parallel build here because it doesn't work:
954make || exit 1
955
956# Install:
957make install DESTDIR=/ || exit 1
958
959# Copy docs:
960mkdir -p $PKG/usr/doc/gnome-doc-utils-$GNOMEDOCUTILSVER
961cp -fav \
962  AUTHORS ChangeLog COPYING* INSTALL NEWS README \
963  /usr/doc/gnome-doc-utils-$GNOMEDOCUTILSVER
964
965####################### Build gtk-doc ###############################
966
967# Extract source:
968cd $TMP
969tar xvf $CWD/sources/gtk-doc-$GTKDOCVER.tar.*z*
970cd gtk-doc-$GTKDOCVER || exit 1
971chown -R root:root .
972find . \
973  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
974  -exec chmod 755 {} \; -o \
975  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
976  -exec chmod 644 {} \;
977
978# Configure:
979CFLAGS="$SLKCFLAGS" \
980CXXFLAGS="$SLKCFLAGS" \
981CPPFLAGS="$SLKCFLAGS" \
982./configure \
983  --prefix=/usr || exit 1
984
985# Build:
986make || exit 1
987
988# Install:
989make install || exit 1
990
991# Copy docs:
992mkdir -vpm755 /usr/doc/gtk-doc-$GTKDOCVER
993cp -fav \
994  AUTHORS COPYING INSTALL MAINTAINERS NEWS README TODO \
995  /usr/doc/gtk-doc-$GTKDOCVER
996
997####################### Build docbook2X ###############################
998
999cd $TMP
1000
1001# Build supporting PERL libraries first:
1002( mkdir XML-NamespaceSupport && cd XML-NamespaceSupport
1003  rpm2cpio $CWD/sources/perl-XML-NamespaceSupport-*.src.rpm | cpio -di
1004  tar xvf XML-NamespaceSupport-*.tar.gz
1005  cd XML-NamespaceSupport* || exit 1
1006  perl Makefile.PL INSTALLDIRS=vendor
1007  # Make sure the man pages go where we want them:
1008  fgrep -lr -- '/share/man/' . | xargs sed -i 's?/share/man/?/man/?g'
1009  make || exit 1
1010  make test || exit 1
1011  make pure_install || exit 1 || exit 1 ) || exit 1
1012
1013( mkdir perl-XML-SAX-Base && cd perl-XML-SAX-Base
1014  rpm2cpio $CWD/sources/perl-XML-SAX-Base-*.src.rpm | cpio -di
1015  tar xvf XML-SAX-Base-*z
1016  cd XML-SAX-Base-* || exit 1
1017  perl Makefile.PL INSTALLDIRS=vendor
1018  fgrep -lr -- '/share/man/' . | xargs sed -i 's?/share/man/?/man/?g'
1019  make || exit 1
1020  make test || exit 1
1021  make pure_install || exit 1 ) || exit 1
1022
1023( mkdir XML-SAX && cd XML-SAX
1024  rpm2cpio $CWD/sources/perl-XML-SAX-[0-9]*.src.rpm | cpio -di
1025  tar xvf XML-SAX-*nopatents.tar*
1026  cd XML-SAX-* || exit 1
1027  patch -p1 < ../perl-XML-SAX-0.99-rt20126.patch || exit 1
1028  # Answer Y to updating ParserDetails.ini:
1029  yes | perl Makefile.PL INSTALLDIRS=vendor
1030  fgrep -lr -- '/share/man/' . | xargs sed -i 's?/share/man/?/man/?g'
1031  make || exit 1
1032  make test || exit 1
1033  make pure_install || exit 1
1034  # We need to make a ParserDetails.ini file, as suggested here:
1035  # http://perl-xml.sourceforge.net/faq/#parserdetails.ini
1036  perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()" ) || exit 1
1037
1038# Build docbook2X:
1039# Extract source:
1040tar xvf $CWD/sources/docbook2x*.orig.tar.xz
1041cd docbook2X-* || exit 1
1042chown -R root:root .
1043find . \
1044  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
1045  -exec chmod 755 {} \; -o \
1046  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
1047  -exec chmod 644 {} \;
1048
1049# Apply patches:
1050tar xvvf $CWD/sources/docbook2x*debian*z || exit 1
1051for i in \
1052   01_fix_static_datadir_evaluation.patch \
1053   02_fix_418703_dont_use_abbreviated_sfnet_address.patch \
1054   03_fix_420153_filename_whitespace_handling.patch \
1055   04_fix_442782_preprocessor_declaration_syntax.patch \
1056   05_fix_439214_error_on_missing_refentry.patch \
1057   06_fix_man_typo.patch ; do
1058    patch --verbose -p1 < debian/patches/$i || exit 1
1059done
1060
1061# Configure:
1062CFLAGS="$SLKCFLAGS" \
1063CXXFLAGS="$SLKCFLAGS" \
1064CPPFLAGS="$SLKCFLAGS" \
1065./configure \
1066   --prefix=/usr \
1067   --mandir=/usr/man \
1068   --infodir=/usr/info \
1069   --docdir=/usr/doc/docbook2X-$DOCBOOK2XVER \
1070   --sysconfdir=/etc \
1071   --localstatedir=/var \
1072   --disable-maintainer-mode \
1073   --disable-dependency-tracking \
1074   --program-transform-name="s/^docbook2/docbook2x-/" \
1075   --with-html-xsl \
1076   --build=$ARCH-slackware-linux$HOSTTARGET || exit 1
1077
1078# Build:
1079make || exit 1
1080
1081# Install:
1082make install || exit 1
1083mv -fv /usr/share/doc/docbook2X /usr/doc/docbook2X-$DOCBOOK2XVER
1084
1085# Copy docs:
1086mkdir -vpm755 /usr/doc/docbook2X-$DOCBOOK2XVER
1087cp -fav \
1088   AUTHORS COPYING ChangeLog NEWS README THANKS TODO \
1089   /usr/doc/docbook2X-$DOCBOOK2XVER
1090
1091#######################################################################
1092
1093# Install the package description:
1094rm -rf /install
1095mkdir -vpm755 /install
1096install -vpm644 $CWD/slack-desc /install
1097#EOF
Note: See TracBrowser for help on using the repository browser.