|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2008,2010,2011,2012,2015,2016 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2008,2010-2012,2015,2016,2019 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -25,15 +25,15 @@
|
|
|
|
|
# Latest fop sourcecode is available at: |
|
|
|
|
# <http://xmlgraphics.apache.org/fop/>. |
|
|
|
|
# |
|
|
|
|
# Depends: ap/xalan-j |
|
|
|
|
# Depends: ap/docbook |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-fop} |
|
|
|
|
VERSION=${VERSION:-2.1} |
|
|
|
|
VERSION=${VERSION:-2.4} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-bin.tar.gz} |
|
|
|
|
WGET=${WGET:-http://mirrors.gigenet.com/apache/xmlgraphics/fop/binaries/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
HYPH_SRC=${HYPH_SRC:-offo-hyphenation-binary_v2.0.zip} |
|
|
|
|
HYPH_SRC=${HYPH_SRC:-offo-hyphenation-compiled.zip} |
|
|
|
|
HYPH_WGET=${HYPH_WGET:-http://downloads.sourceforge.net/offo/$HYPH_SRC} |
|
|
|
|
|
|
|
|
|
# Built package infos |
|
|
|
@ -67,8 +67,7 @@ fi
|
|
|
|
|
if [ ! -r $HYPH_SRC ]; then |
|
|
|
|
wget "$HYPH_WGET" |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
sha1sum -c $HYPH_SRC.sha1 |
|
|
|
|
sha256sum -c checksums |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Extract |
|
|
|
@ -79,19 +78,21 @@ cd $NAME
|
|
|
|
|
unzip $CWD/$HYPH_SRC |
|
|
|
|
|
|
|
|
|
# Install Java libraries |
|
|
|
|
mkdir -p $PKG/usr/lib/apache-xml |
|
|
|
|
mkdir -p $PKG/usr/lib/apache-fop |
|
|
|
|
install -m 644 \ |
|
|
|
|
lib/avalon-framework-api-4.3.1.jar \ |
|
|
|
|
lib/avalon-framework-impl-4.3.1.jar \ |
|
|
|
|
lib/batik-all-1.8.jar \ |
|
|
|
|
lib/commons-io-1.3.1.jar \ |
|
|
|
|
lib/commons-logging-1.0.4.jar \ |
|
|
|
|
lib/fontbox-1.8.5.jar \ |
|
|
|
|
lib/xml-apis-ext-1.3.04.jar \ |
|
|
|
|
lib/xmlgraphics-commons-2.1.jar \ |
|
|
|
|
offo-hyphenation-binary/fop-hyph.jar \ |
|
|
|
|
$PKG/usr/lib/apache-xml |
|
|
|
|
install -m 644 build/fop.jar $PKG/usr/lib/apache-xml/fop-$VERSION.jar |
|
|
|
|
fop/lib/batik-all-1.12.jar \ |
|
|
|
|
fop/lib/commons-io-1.3.1.jar \ |
|
|
|
|
fop/lib/commons-logging-1.0.4.jar \ |
|
|
|
|
fop/lib/fontbox-2.0.16.jar \ |
|
|
|
|
fop/lib/serializer-2.7.2.jar \ |
|
|
|
|
fop/lib/xalan-2.7.2.jar \ |
|
|
|
|
fop/lib/xercesImpl-2.12.0.jar \ |
|
|
|
|
fop/lib/xml-apis-1.4.01.jar \ |
|
|
|
|
fop/lib/xml-apis-ext-1.3.04.jar \ |
|
|
|
|
fop/lib/xmlgraphics-commons-2.4.jar \ |
|
|
|
|
offo-hyphenation-compiled/fop-hyph.jar \ |
|
|
|
|
$PKG/usr/lib/apache-fop |
|
|
|
|
install -m 644 fop/build/fop.jar $PKG/usr/lib/apache-fop/fop-$VERSION.jar |
|
|
|
|
|
|
|
|
|
# Install executable scripts |
|
|
|
|
install -D -m 755 $CWD/fop.sh $PKG/usr/bin/fop |
|
|
|
@ -100,16 +101,16 @@ install -m 755 $CWD/ttf2fop.sh $PKG/usr/bin/ttf2fop
|
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME/offo |
|
|
|
|
install -m 644 LICENSE README $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 KEYS LICENSE NOTICE README $PKG/usr/doc/$NAME |
|
|
|
|
mv javadocs $PKG/usr/doc/$NAME/apidocs |
|
|
|
|
mv examples $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 offo-hyphenation-binary/*.html $PKG/usr/doc/$NAME/offo |
|
|
|
|
cp -r offo-hyphenation-binary/{images,skin} $PKG/usr/doc/$NAME/offo |
|
|
|
|
mv fop/examples $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 offo-hyphenation-compiled/*.html $PKG/usr/doc/$NAME/offo |
|
|
|
|
cp -r offo-hyphenation-compiled/{images,skin} $PKG/usr/doc/$NAME/offo |
|
|
|
|
|
|
|
|
|
# Create metric files for some standard fonts |
|
|
|
|
mkdir -p $PKG/usr/share/fop/fonts |
|
|
|
|
( cd $PKG/usr/share/fop/fonts |
|
|
|
|
sh $CWD/ttf2fop.sh -l $PKG/usr/lib/apache-xml \ |
|
|
|
|
sh $CWD/ttf2fop.sh -l $PKG/usr/lib/apache-fop \ |
|
|
|
|
/usr/share/fonts/TTF/DejaVu* /usr/share/fonts/TTF/Liberation* \ |
|
|
|
|
> fonts.xml |
|
|
|
|
) |
|
|
|
@ -117,7 +118,7 @@ mkdir -p $PKG/usr/share/fop/fonts
|
|
|
|
|
# Install configuration file |
|
|
|
|
mkdir $PKG/etc |
|
|
|
|
xsltproc --stringparam fontspec $PKG/usr/share/fop/fonts/fonts.xml \ |
|
|
|
|
$CWD/merge-font-specs.xsl conf/fop.xconf | \ |
|
|
|
|
$CWD/merge-font-specs.xsl fop/conf/fop.xconf | \ |
|
|
|
|
xmllint --format - > $PKG/etc/fop.conf.new |
|
|
|
|
|
|
|
|
|
# Copy slack-desc and doinst.sh files |
|
|
|
|