Subversion Repositories HelenOS-doc

Compare Revisions

No changes between revisions

Ignore whitespace Rev 2 → Rev 3

/design/trunk/tools/toolchain
0,0 → 1,68
#!/bin/bash
 
# DocBook Toolchain for ${PLATFORM}
# by Sergey Bondari <bondari@itbs.cz>
 
 
check_error() {
if [ "$1" -ne "0" ]; then
echo
echo "Script failed: $2"
exit
fi
}
 
DOCBOOKXSL_VERSION="1.69.1"
FOP_VERSION="0.20.5"
 
DOCBOOKXSL="docbook-xsl-${DOCBOOKXSL_VERSION}.tar.bz2"
FOP="fop-${FOP_VERSION}-src.tar.gz"
JIMI="jimi-1.0.jar"
 
DOCBOOKXSL_SOURCE="http://helenos.itbs.cz/tools/"
JIMI_SOURCE="http://helenos.itbs.cz/tools/"
FOP_SOURCE="http://ftp.sh.cvut.cz/MIRRORS/apache/xmlgraphics/fop/"
 
 
WORKDIR=`pwd`
 
DOCBOOKXSLDIR="${WORKDIR}/docbook-xsl-${DOCBOOKXSL_VERSION}"
FOPDIR="${WORKDIR}/fop-${FOP_VERSION}"
 
echo ">>> Downloading tarballs"
 
if [ ! -f "${DOCBOOKXSL}" ]; then
wget -c "${DOCBOOKXSL_SOURCE}${DOCBOOKXSL}"
check_error $? "Error downloading DOCBOOK XSL."
fi
 
if [ ! -f "${FOP}" ]; then
wget -c "${FOP_SOURCE}${FOP}"
check_error $? "Error downloading FOP."
fi
 
if [ ! -f "${JIMI}" ]; then
wget -c "${JIMI_SOURCE}${JIMI}"
check_error $? "Error downloading JIMI."
fi
 
echo ">>> Unpacking tarballs"
tar -jxvf "${DOCBOOKXSL}"
check_error $? "Error unpacking DOCBOOK XSL."
 
tar -zxvf "${FOP}"
check_error $? "Error unpacking FOP."
 
rm -rf "docbook-xsl"
mv ${DOCBOOKXSLDIR} "docbook-xsl"
check_error $? "Rename failed."
 
rm -rf "fop"
mv ${FOPDIR} "fop"
check_error $? "Rename failed."
 
cp ${JIMI} fop/lib
check_error $? "Cannot inject JIMI to FOP."
 
echo
echo ">>> Done."
Property changes:
Added: svn:executable
+*
\ No newline at end of property
/design/trunk/src/index.xml
0,0 → 1,16
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<book>
<title>HelenOS DocBook</title>
 
<chapter>
<title>Installation</title>
 
<section>
<title>Section #1</title>
 
<para>Hello world!</para>
</section>
</chapter>
</book>
/design/trunk/Makefile
0,0 → 1,67
#
# Copyright (C) 2006 Sergey Bondari
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# - The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
 
 
# Use xsltproc as XSL processor
XSLT = xsltproc
 
TOOLCHAIN_DIR = tools/
 
# DocBook XSL package
DOCBOOK_DIR = $(TOOLCHAIN_DIR)docbook-xsl/
 
# FOP - Apache XML graphics package
FOP_DIR=$(TOOLCHAIN_DIR)fop/
FOP=$(FOP_DIR)fop.sh
 
# Output folders
BUILD_HTML_DIR = build/html/
BUILD_PDF_DIR = build/pdf/
 
 
 
all: html pdf
 
build: clean all
 
html:
mkdir -p $(BUILD_HTML_DIR)
xsltproc --output $(BUILD_HTML_DIR)index.html $(DOCBOOK_DIR)html/docbook.xsl src/index.xml
 
pdf:
mkdir -p $(BUILD_PDF_DIR)
xsltproc --output $(BUILD_PDF_DIR)index.fo $(DOCBOOK_DIR)fo/docbook.xsl src/index.xml
 
$(FOP) -q -fo $(BUILD_PDF_DIR)index.fo -pdf $(BUILD_PDF_DIR)index.pdf
 
distclean: clean
 
clean:
rm -rf build