2009-08-26 17:00:38 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
#####################################################################
|
|
|
|
# trackbuild.liunxdoc-tools
|
|
|
|
# by Stuart Winter <mozes@slackware.com>
|
|
|
|
# Preform a few pre-build requirements then launch the build script
|
|
|
|
# through slacktrack
|
|
|
|
# 31-Jul-2009
|
|
|
|
#####################################################################
|
|
|
|
|
|
|
|
# Known build requirements:
|
|
|
|
# a/unzip for the docbook stuff
|
|
|
|
# l/libxml2 for /usr/bin/xmlcatalogue
|
|
|
|
# a/rpm2tgz to unpack some SRPMs
|
|
|
|
# d/python for AsciiDoc
|
|
|
|
# l/libxslt
|
2011-04-25 15:37:00 +02:00
|
|
|
# l/seamonkey-solibs for rpm2cpio
|
2009-08-26 17:00:38 +02:00
|
|
|
# t/tetex (not required for a bootstrap build, but will be required
|
|
|
|
# later for a full build of this linuxdoc-tools package).
|
|
|
|
|
|
|
|
# Package info:
|
|
|
|
PKGNAM=linuxdoc-tools
|
|
|
|
|
2010-05-19 10:58:23 +02:00
|
|
|
# Automatically determine the architecture we're building on:
|
2009-08-26 17:00:38 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
2018-05-28 21:12:29 +02:00
|
|
|
i?86) export ARCH=i586 ;;
|
|
|
|
arm*) export ARCH=arm ;;
|
2009-08-26 17:00:38 +02:00
|
|
|
# Unless $ARCH is already set, use uname -m for all other archs:
|
2018-05-28 21:12:29 +02:00
|
|
|
*) export ARCH=$( uname -m ) ;;
|
2009-08-26 17:00:38 +02:00
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2018-05-28 21:12:29 +02:00
|
|
|
export PKGVERSION=0.9.72 # use the version of linuxdoc-tools as the package version.
|
2016-06-30 22:26:57 +02:00
|
|
|
BUILD=${BUILD:-5}
|
2009-08-26 17:00:38 +02:00
|
|
|
PKGEXT=${PKGEXT:-txz}
|
|
|
|
|
|
|
|
export CWD=$PWD
|
|
|
|
export PKGSTORE=/tmp
|
|
|
|
export TMP=/tmp/build-$PKGNAM/
|
|
|
|
rm -rf $TMP
|
|
|
|
|
|
|
|
####################### Clean up before build #####################
|
|
|
|
|
|
|
|
# It's best to clear this stuff up prior to the build.
|
|
|
|
# All of these directories (apart from /usr/share/xml/libglade) are
|
|
|
|
# created by this build script:
|
|
|
|
removepkg linuxdoc-tools
|
|
|
|
rm -rf /etc/{xml,sgml}
|
|
|
|
rm -rf /usr/share/doc/linuxdoc-tools
|
|
|
|
rm -rf /usr/share/sgml
|
2018-05-28 21:12:29 +02:00
|
|
|
rm -rf /etc/asciidoc # in case there are any '.conf.new' files remaining
|
2009-08-26 17:00:38 +02:00
|
|
|
rm -rf /usr/share/xml/{docbook,xml-iso-entities*} # can't wipe the entire dir because of libglade
|
|
|
|
rm -rf ~/.texmf-var/ # created by docbook-utils
|
2010-05-19 10:58:23 +02:00
|
|
|
rm -rf ~/.texlive* # incase you were using Texlive rather than Textex-3
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
####################################################################
|
|
|
|
|
|
|
|
######## WARNING ###################################################
|
|
|
|
# This will touch nearly every file on your expendable development
|
|
|
|
# box. You wouldn't try this on a production system, right?
|
|
|
|
######## WARNING ###################################################
|
|
|
|
|
|
|
|
# This the faster option, but not the safest. On a full Slackware
|
|
|
|
# installation, you'll find new files in this directory which have
|
|
|
|
# been 'touch'ed. The --touch-filesystem-first will not do this,
|
|
|
|
# but is slower. However, if you really want extra speed, copy
|
|
|
|
# this entire package source directory to a temporary location
|
|
|
|
# and run it from there.
|
|
|
|
# TFS="--touch-filesystem-faster"
|
|
|
|
|
|
|
|
TFS="--touch-filesystem-first"
|
|
|
|
|
|
|
|
# Launch the build script:
|
|
|
|
slacktrack $TFS \
|
|
|
|
--notidy \
|
|
|
|
--showdeps \
|
2018-05-28 21:12:29 +02:00
|
|
|
--run-after-withlog $CWD/postbuildfixes.sh \
|
2009-08-26 17:00:38 +02:00
|
|
|
-T $TMP \
|
|
|
|
-l $CWD/build.$ARCH.log \
|
|
|
|
-b $PKGSTORE \
|
2010-05-19 10:58:23 +02:00
|
|
|
-rYQOcp $PKGNAM-$PKGVERSION-$ARCH-$BUILD.$PKGEXT ./linuxdoc-tools.build
|
|
|
|
|
|
|
|
# Compress build log:
|
2011-04-25 15:37:00 +02:00
|
|
|
bzip2 -9fvz $CWD/build.$ARCH.log
|