#!/bin/bash ############################################################################### # Script: linuxdoc-tools.build # Purpose: Build & install all components that form the linuxdoc-tools # Slackware Package. # Author: by Stuart Winter # with the docbook build code by Jerome Pinot # and some script code taken from Debian, Red Hat/Fedora & # Linux From Scratch documentation # http://www.linuxfromscratch.org/blfs/view/svn/index.html # thanks guys! :-) ############################################################################### # Bundled package versions: SGMLDTD3VER=3.1 SGMLDTD4VER=4.5 XMLDTDVER=4.5 XSLSTYLESHEETSVER=1.72.0 DSSSLSTYLESHEETSVER=1.79 LINUXDOCTOOLSVER=0.9.21 SGMLCOMMONVER=0.6.3 OPENJADEVER=1.3.2 OPENSPVER=1.5.2 GTKDOCVER=1.8 SGMLSPLVER=1.03ii XMLTOVER=0.0.18 ASCIIDOCVER=8.2.1 DOCBOOKUTILSVER=0.6.14 # Determine the general CFLAGS for the known architectures: case $ARCH in arm) export SLKCFLAGS="-O2 -march=armv3 -mtune=xscale" ;; i486) export SLKCFLAGS="-O2 -march=i486 -mtune=i686" ;; s390) export SLKCFLAGS="-O2" ;; x86_64) export SLKCFLAGS="-O2 -fPIC" ;; esac # The build order is purposive -- don't modify it unless you know # what you're doing. ####################### Build AsciiDoc ############################## # Extract source: cd $TMP tar zxvvf $CWD/sources/asciidoc-$ASCIIDOCVER.tar.gz cd asciidoc-$ASCIIDOCVER chown -R root:root . chmod -R og-w . # Install: install -vpm755 asciidoc.py /usr/bin/asciidoc install -vpm755 a2x /usr/bin mkdir -vpm755 /etc/asciidoc/filters mkdir -vpm755 /usr/share/asciidoc cp -favv *.conf /etc/asciidoc # This weird looking way of making a symlink is for makepkg's benefit: ( cd /etc/asciidoc ln -vfs ../../usr/share/asciidoc/stylesheets . ) cp -fav filters/{code-filter.conf,code-filter.py} /etc/asciidoc/filters/ install -vpm644 doc/asciidoc.1 /usr/man/man1 cp -fav images/ stylesheets/ /usr/share/asciidoc/ find /etc/asciidoc -type f -print0 | xargs -0 chmod 644 # Copy docs: mkdir -vpm755 /usr/doc/asciidoc-$ASCIIDOCVER cp -fav BUGS CHANGELOG COPY* README \ /usr/doc/asciidoc-$ASCIIDOCVER/ ####################### Build sgml-common ############################ # Extract source. We're using a source RPM since it contains a number of # patches that we need: cd $TMP rpm2tgz $CWD/sources/sgml-common-${SGMLCOMMONVER}*.src.rpm tar zxvvf sgml-common-*src.tgz cd sgml-common-$SGMLCOMMONVER-* # The real source archive is stored inside the source RPM, you see: tar zxvvf sgml-common-$SGMLCOMMONVER.tgz cd sgml-common-$SGMLCOMMONVER chown -R root:root . chmod -R og-w . # Apply patches (these are included in the source rpm): patch -p1 < ../sgml-common-umask.patch || exit 1 patch -p1 < ../sgml-common-xmldir.patch || exit 1 patch -p1 < ../sgml-common-quotes.patch || exit 1 # Hacks from the spec file: tar zxvvf ../sgml-common-automake.tar.gz patch -p1 < ../sgml-common-automake.patch || exit 1 patch -p1 < ../sgml-common-0.6.3-docdir.patch || exit 1 # Configure: aclocal automake --add-missing --copy ./configure \ --prefix=/usr \ --mandir=/usr/man \ --infodir=/usr/info \ --with-docdir=/usr/doc \ --sysconfdir=/etc || exit 1 # Build & install: make -j 10 -e 'mkdir_p=mkdir -p' install || exit 1 # Create catalog: install-catalog --add /etc/sgml/sgml-ent.cat \ /usr/share/sgml/sgml-iso-entities-8879.1986/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/sgml-ent.cat # Copy docs: mkdir -vpm755 /usr/doc/sgml-common-$SGMLCOMMONVER cp -fav COPYING AUTHORS INSTALL NEWS README ChangeLog ../sgml-common-CHANGES \ /usr/doc/sgml-common-$SGMLCOMMONVER ####################### Install docbooks ############################ ############### ## sgml-dtd3 ## ############### # Extract source: cd $TMP mkdir sgml-dtd3 cd sgml-dtd3 unzip $CWD/sources/docbk31.zip chown -R root.root . chmod -R og-w . # Remove the ENT definitions from the catalog file: sed -i -e '/ISO 8879/d' docbook.cat # Replace the DTDDECL catalog entry, which is not supported by Linux SGML tools, # with the SGMLDECL catalog entry sed -i -e 's|DTDDECL "-//OASIS//DTD Docbook V3.1//EN"|SGMLDECL|g' docbook.cat # Install: mkdir -vpm755 /etc/sgml mkdir -vpm755 /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER install -vpm644 docbook.cat /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog install -vpm644 *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/ # Update SGML catalog: install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD3VER.cat \ /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD3VER.cat \ /etc/sgml/sgml-docbook.cat # Use only the most current 3.x version of DocBook SGML DTD: cat >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD3VER/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//Davenport//DTD DocBook V3.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF # Copy docs: mkdir -vpm755 /usr/doc/sgml-dtd-$SGMLDTD3VER cp -fav ChangeLog *.txt \ /usr/doc/sgml-dtd-$SGMLDTD3VER/ ############### ## sgml-dtd4 ## ############### # Extract source: cd $TMP mkdir sgml-dtd4 cd sgml-dtd4 unzip $CWD/sources/docbook-$SGMLDTD4VER.zip chown -R root.root . chmod -R og-w . # Remove the ENT definitions from the catalog file: sed -i -e '/ISO 8879/d' \ -e '/gml/d' docbook.cat # Install: mkdir -vpm755 /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER install -vpm644 docbook.cat /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog cp -fav *.dtd *.mod *.dcl /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER # Update SGML catalog: install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD4VER.cat \ /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog install-catalog --add /etc/sgml/sgml-docbook-dtd-$SGMLDTD4VER.cat \ /etc/sgml/sgml-docbook.cat # Use only the most current 4.x version of DocBook SGML DTD : # When you upgrade sgml-dtd4, put the PREVIOUS version number in # with the lines below. cat >> /usr/share/sgml/docbook/sgml-dtd-$SGMLDTD4VER/catalog << "EOF" -- Begin Single Major Version catalog changes -- PUBLIC "-//OASIS//DTD DocBook V4.4//EN" "docbook.dtd" PUBLIC "-//OASIS//DTD DocBook V4.3//EN" "docbook.dtd" PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "docbook.dtd" PUBLIC "-//OASIS//DTD DocBook V4.1//EN" "docbook.dtd" PUBLIC "-//OASIS//DTD DocBook V4.0//EN" "docbook.dtd" -- End Single Major Version catalog changes -- EOF # Copy docs: mkdir -vpm755 /usr/doc/sgml-dtd4-$SGMLDTD4VER cp -fav ChangeLog README \ /usr/doc/sgml-dtd4-$SGMLDTD4VER/ ############################ ## xml-dtd / docbook-xml ## ############################ # Extract source: cd $TMP mkdir xml-dtd-$XMLDTDVER cd xml-dtd-$XMLDTDVER unzip $CWD/sources/docbook-xml-$XMLDTDVER.zip chown -R root.root . chmod -R og-w . # Install 4.x catalog: mkdir -vpm755 /usr/share/xml/docbook/xml-dtd-$XMLDTDVER cp -fav docbook.cat *.dtd *.mod ent/ \ /usr/share/xml/docbook/xml-dtd-$XMLDTDVER # Create config files: mkdir -vpm755 /etc/xml # This code is taken directly from: # http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html#DocBook # # Populate /etc/xml/docbook: # if [ ! -e /etc/xml/docbook ]; then xmlcatalog --noout --create /etc/xml/docbook fi && xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V$XMLDTDVER//EN" \ "http://www.oasis-open.org/docbook/xml/$XMLDTDVER/docbookx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML CALS Table Model V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/calstblx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/soextblx.dtd" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Information Pool V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/dbpoolx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/dbhierx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ELEMENTS DocBook XML HTML Tables V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/htmltblx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Notations V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/dbnotnx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Character Entities V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/dbcentx.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "public" \ "-//OASIS//ENTITIES DocBook XML Additional General Entities V$XMLDTDVER//EN" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER/dbgenent.mod" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/$XMLDTDVER" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \ /etc/xml/docbook && xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/$XMLDTDVER" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \ /etc/xml/docbook # # Populate /etc/xml/catalog: # if [ ! -e /etc/xml/catalog ]; then xmlcatalog --noout --create /etc/xml/catalog fi && xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//ENTITIES DocBook XML" \ "file:///etc/xml/docbook" \ /etc/xml/catalog && xmlcatalog --noout --add "delegatePublic" \ "-//OASIS//DTD DocBook XML" \ "file:///etc/xml/docbook" \ /etc/xml/catalog && xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ /etc/xml/catalog && xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/" \ "file:///etc/xml/docbook" \ /etc/xml/catalog # Rewrites for older docbooks. This allows older docbooks to # be referenced. It means, however, that you __*shouldn't* have these older docbooks__ # installed on your system; so if you just keep the Slackware linuxdoc-tools package # you'll be fine: for DTDVERSION in 4.1.2 4.2 4.3 4.4 do xmlcatalog --noout --add "public" \ "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \ /etc/xml/docbook xmlcatalog --noout --add "rewriteSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \ /etc/xml/docbook xmlcatalog --noout --add "rewriteURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \ "file:///usr/share/xml/docbook/xml-dtd-$XMLDTDVER" \ /etc/xml/docbook xmlcatalog --noout --add "delegateSystem" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ /etc/xml/catalog xmlcatalog --noout --add "delegateURI" \ "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \ "file:///etc/xml/docbook" \ /etc/xml/catalog done # Copy docs: mkdir -pm755 /usr/doc/xml-dtd-$XMLDTDVER cp -favv ChangeLog README \ /usr/doc/xml-dtd-$XMLDTDVER ####################### ## xsl-stylesheets ## ####################### # Extract source: cd $TMP mkdir xsl-stylesheets-$XSLSTYLESHEETSVER cd xsl-stylesheets-$XSLSTYLESHEETSVER tar jxvvf $CWD/sources/docbook-xsl-$XSLSTYLESHEETSVER.tar.bz2 tar jxvvf $CWD/sources/docbook-xsl-doc-$XSLSTYLESHEETSVER.tar.bz2 chown -R root.root . chmod -R og-w . cd docbook-xsl-$XSLSTYLESHEETSVER # Install: mkdir -vpm755 /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/{images/callouts,extensions,common,fo,html,htmlhelp/doc,javahelp,lib,template,xhtml,manpages,profiling,highlighting,roundtrip} cp -v common/*.dtd /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/common cp -v common/*.ent /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/common cp -v common/*.xml /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/common cp -v common/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/common cp -v fo/*.xml /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/fo cp -v fo/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/fo cp -v html/*.xml /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/html cp -v html/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/html cp -v htmlhelp/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/htmlhelp cp -v javahelp/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/javahelp cp -v lib/lib.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/lib cp -v template/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/template cp -v xhtml/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/xhtml cp -v manpages/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/manpages cp -v profiling/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/profiling cp -v highlighting/*.xml /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/highlighting cp -v highlighting/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/highlighting cp -v roundtrip/*.xml /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/roundtrip cp -v roundtrip/*.xsl /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/roundtrip cp -v images/*.gif /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/images cp -v images/*.png /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/images cp -v images/callouts/*.png /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/images/callouts cp -vr extensions/* /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/extensions cp -v VERSION /usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER/ # Create config files: 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://docbook.sourceforge.net/release/xsl/$XSLSTYLESHEETSVER" \ "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \ /etc/xml/catalog xmlcatalog --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/$XSLSTYLESHEETSVER" \ "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \ /etc/xml/catalog xmlcatalog --noout --add "rewriteSystem" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \ /etc/xml/catalog xmlcatalog --noout --add "rewriteURI" \ "http://docbook.sourceforge.net/release/xsl/current" \ "/usr/share/xml/docbook/xsl-stylesheets-$XSLSTYLESHEETSVER" \ /etc/xml/catalog # Copy docs: mkdir -vpm755 /usr/doc/xsl-stylesheets-$XSLSTYLESHEETSVER cp -fav doc/* /usr/doc/xsl-stylesheets-$XSLSTYLESHEETSVER ####################### Build xmlto ################################ # Extract source: cd $TMP tar jxvvf $CWD/sources/xmlto-$XMLTOVER.tar.bz2 cd xmlto-$XMLTOVER chown -R root:root . chmod -R og-w . # Configure: ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var || exit 1 # Build: make || exit 1 # Install: make install || exit 1 # Copy docs: mkdir -vpm755 /usr/doc/xmlto-$XMLTOVER cp -fav AUTHORS COPYING ChangeLog FAQ INSTALL NEWS README \ /usr/doc/xmlto-$XMLTOVER ####################### Build OpenSP ############################ # Extract source: cd $TMP tar zxvvf $CWD/sources/OpenSP-$OPENSPVER.tar.gz cd OpenSP-$OPENSPVER chown -R root:root . chmod -R og-w . sed -i 's:32,:253,:' lib/Syntax.cxx sed -i 's:LITLEN 240 :LITLEN 8092:' unicode/{gensyntax.pl,unicode.syn} # Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBSUFFIX \ --mandir=/usr/man \ --datadir=/usr/share \ --infodir=/usr/info \ --disable-dependency-tracking \ --disable-static \ --enable-http \ --enable-default-catalog=/etc/sgml/catalog \ --enable-default-search-path=/usr/share/sgml || exit 1 # Build: make pkgdatadir=/usr/share/sgml/OpenSP-$OPENSPVER || exit 1 # Install: make install || exit 1 # Rename sx to sgml2xml & create symlinks: mv -f /usr/bin/osx /usr/bin/osgml2xml ( cd /usr/bin ; ln -vfs osgml2xml osx ) mv -f /usr/man/man1/osx.1 /usr/man/man1/osgml2xml.1 ( cd /usr/man/man1 ; ln -vfs osgml2xml.1 osx.1 ) # Create symlinks to binaries: ( cd /usr/bin for file in nsgmls sgmlnorm spam spent sgml2xml ; do rm -f $file ln -vfs o$file $file done ) # Fix man pages: ( cd /usr/man/man1 for file in nsgmls sgmlnorm spam spent sgml2xml ; do rm -f ${file}.1* ln -vfs o${file}.1 ${file}.1 done ) # Rename docs directory: mv -fv /usr/doc/OpenSP /usr/doc/OpenSP-$OPENSPVER ####################### Build OpenJade ############################ # Extract source: cd $TMP tar zxvvf $CWD/sources/openjade-$OPENJADEVER.tar.gz cd openjade-$OPENJADEVER* chown -R root:root . chmod -R og-w . # Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBSUFFIX \ --disable-static \ --mandir=/usr/man \ --infodir=/usr/info \ --disable-static \ --enable-default-catalog=/etc/sgml/catalog \ --enable-default-search-path=/usr/share/sgml \ --datadir=/usr/share/sgml/openjade-$OPENJADEVER || exit 1 # Build: make || exit 1 # Install: mkdir -p /etc/sgml make install || exit 1 make install-man || exit 1 ( cd /usr/bin && ln -vfs openjade jade ) ( cd /usr/man/man1 && ln -vfs openjade.1 jade.1 ) ln -vsf libogrove.so /usr/lib$LIBSUFFIX/libgrove.so ln -vsf libospgrove.so /usr/lib$LIBSUFFIX/libspgrove.so ln -vsf libostyle.so /usr/lib$LIBSUFFIX/libstyle.so install -vpm644 dsssl/catalog /usr/share/sgml/openjade-$OPENJADEVER install -vpm644 dsssl/*.{dtd,dsl,sgm} /usr/share/sgml/openjade-$OPENJADEVER # Update SGML catalog: install-catalog --add /etc/sgml/openjade-$OPENJADEVER.cat \ /usr/share/sgml/openjade-$OPENJADEVER/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/openjade-$OPENJADEVER.cat # Copy docs: mkdir -vpm755 /usr/doc/openjade-$OPENJADEVER cp -fav COPYING NEWS README VERSION doc/* dsssl/README.jadetex pubtext jadedoc unicode \ /usr/doc/openjade-$OPENJADEVER # The original package has this file, but it has most of the world's documentation # too; we'll leave it in for the time being but I don't like it. # rm -f /usr/doc/openjade-$OPENJADEVER/doc/Makefile ####################### Build dsssl-stylesheets #################### # Extract source: cd $TMP mkdir docbook-dsssl-$DSSSLSTYLESHEETSVER cd docbook-dsssl-$DSSSLSTYLESHEETSVER tar jxvvf $CWD/sources/docbook-dsssl-$DSSSLSTYLESHEETSVER.tar.bz2 tar jxvvf $CWD/sources/docbook-dsssl-doc-$DSSSLSTYLESHEETSVER.tar.bz2 cd docbook-dsssl-$DSSSLSTYLESHEETSVER chown -R root.root . chmod -R og-w . # Install: install -pm755 bin/collateindex.pl /usr/bin install -pm644 bin/collateindex.pl.1 /usr/man/man1 # Eeek! Debian trim this down but we'll leave it for the moment: mkdir -vpm755 /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/common cp -fav * /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER # Update catalog: install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/catalog install-catalog --add /etc/sgml/dsssl-docbook-stylesheets.cat \ /usr/share/sgml/docbook/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/common/catalog install-catalog --add /etc/sgml/sgml-docbook.cat \ /etc/sgml/dsssl-docbook-stylesheets.cat # Copy docs: mkdir -vpm755 /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER cp -fav WhatsNew VERSION RELEASE-NOTES.txt README ChangeLog BUGS \ /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER cp -fav frames/README \ /usr/doc/dsssl-stylesheets-$DSSSLSTYLESHEETSVER/README.frames ####################### Build SGMLSPL ############################## # Extract source: cd $TMP tar zxvvf $CWD/sources/libsgmls-perl_$SGMLSPLVER.orig.tar.gz cd libsgmls-perl-$SGMLSPLVER.orig chown -R root:root . chmod -R og-w . zcat $CWD/sources/libsgmls-perl_$SGMLSPLVER-*.diff.gz | patch -p1 || exit 1 # Configure: perl Makefile.PL INSTALLDIRS=site || exit 1 sed -i 's?/share/man?/man/?g' Makefile # Build: make OPTIMIZE="$SLKCFLAGS" || exit 1 # Install: make install PREFIX=/usr sed 's?usr/share/doc/sgmls-doc/?usr/doc/sgmlspl-'"$SGMLSPLVER"'/?g' sgmlspl.1 > /usr/man/man1/sgmlspl.1 # Copy docs: mkdir -vpm755 /usr/doc/sgmlspl-$SGMLSPLVER cp -fav BUGS COPYING README TODO \ /usr/doc/sgmlspl-$SGMLSPLVER cp -fav DOC/HTML/{SGMLSpm,sgmlspl} \ /usr/doc/sgmlspl-$SGMLSPLVER ####################### Build docbook-utils ######################## # docbook-utils requires some of the docbook docs to be installed # prior to being built. # Extract source: cd $TMP rpm2tgz $CWD/sources/docbook-utils-${DOCBOOKUTILSVER}*.src.rpm tar zxvvf docbook-utils-*src.tgz cd docbook-utils-${DOCBOOKUTILSVER}* tar zxvvf docbook-utils-$DOCBOOKUTILSVER.tar.gz cd docbook-utils-$DOCBOOKUTILSVER chown -R root:root . chmod -R og-w . # Apply patches: patch -p1 < ../docbook-utils-spaces.patch || exit 1 # Configure: ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --mandir=/usr/man || exit 1 # Build: make || exit 1 # Install: make install htmldir=/usr/doc/docbook-utils-$DOCBOOKUTILSVER/html || exit 1 # db2html is not just a symlink, as it has to create the output directory: rm -f /usr/bin/db2html install -vpm755 ../db2html /usr/bin install -vpm644 ../gdp-both.dsl /usr/share/sgml/docbook/utils-$DOCBOOKUTILSVER/docbook-utils.dsl # Make binary symlinks: ( cd /usr/bin for util in dvi html pdf ps rtf ; do rm -f db2$util ln -vfs docbook2$util db2$util done ) # Make man page symlinks: ( cd /usr/man/man1 for util in dvi html pdf ps rtf ; do rm -f db2$util.1* ln -vfs jw.1 db2$util.1 done ) # Copy docs: mkdir -vpm755 /usr/doc/docbook-utils-$DOCBOOKUTILSVER cp -fav AUTHORS NEWS README TODO \ /usr/doc/docbook-utils-$DOCBOOKUTILSVER ####################### Build linuxdoc-tools ######################## # Extract source: cd $TMP tar zxvvf $CWD/sources/linuxdoc-tools_$LINUXDOCTOOLSVER*.tar.gz cd linuxdoc-tools-$LINUXDOCTOOLSVER chown -R root:root . chmod -R og-w . # Configure: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --infodir=/usr/info \ --with-installed-nsgmls || exit 1 # Build: make -i OPTIMIZE="$SLKCFLAGS" \ prefix=/usr \ mandir=/usr/man \ PERL=/usr/bin/perl \ LINUXDOCDOC=/usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER || exit 1 # Ensure that we install this into Perl's site_perl directory. Red Hat has # a 'vendor_perl' directory; Slackware doesn't: eval `perl '-V:installsitelib'` # Install: make prefix=/usr \ mandir=/usr/man \ bindir=/usr/bin \ PERL=/usr/bin/perl \ perl5libdir=/$installsitelib \ LINUXDOCDOC=/usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER \ install || exit 1 # This package contains a number of programs. # We maintain our own change log for this package. Since the package name is # 'linuxdoc-tools', let's put our changelog into here: install -vpm644 $CWD/ChangeLog.txt /usr/doc/linuxdoc-tools-$LINUXDOCTOOLSVER/Slackware-ChangeLog.txt ####################### Build gtk-doc ############################### # Extract source: cd $TMP tar jxvvf $CWD/sources/gtk-doc-$GTKDOCVER.tar.bz2 cd gtk-doc-$GTKDOCVER chown -R root:root . chmod -R og-w . # Configure: ./configure \ --prefix=/usr \ --enable-public-id || exit 1 # Install: make install || exit 1 # Copy docs: mkdir -vpm755 /usr/doc/gtk-doc-$GTKDOCVER cp -fav AUTHORS COPYING INSTALL MAINTAINERS NEWS README TODO \ /usr/doc/gtk-doc-$GTKDOCVER ####################################################################### # Install the package description: rm -rf /install mkdir -vpm755 /install install -vpm644 $CWD/slack-desc /install