Browse Source

ap/xalan-j: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 12 years ago
parent
commit
229791c2cd
  1. 55
      ap/xalan-j/xalan-j.SlackBuild
  2. 49
      ap/xalan-j/xalan.sh

55
ap/xalan-j/xalan-j.SlackBuild

@ -1,26 +1,28 @@
#!/bin/bash
# Build script for Slackware
# Damien Goutte-Gattat "gouttegd" <dgouttegattat at incenp.org>
# Copyright (C) 2008,2010 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications, is
# permitted provided that the following conditions are met:
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# notice, this list of conditions and the following disclaimer.
#
# 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.
# 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.
#
# Latest Xalan-J sourcecode is available at:
# http://xml.apache.org/
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest Xalan-J sourcecode is available at: <http://xalan.apache.org/>.
#
# Depends: l/apache-xml-resolver
@ -28,18 +30,18 @@
NAMESRC=${NAMESRC:-xalan-j}
VERSION=${VERSION:-2.7.1}
ARCHIVE=${ARCHIVE:-${NAMESRC}_${VERSION//./_}-bin.zip}
WGET=${WGET:-ftp://mir1.ovh.net/ftp.apache.org/dist/xml/xalan-j/$ARCHIVE}
WGET=${WGET:-http://apache.cict.fr/xml/xalan-j/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-xalan-j}
BUILD=${BUILD:-2GGD}
NAMEPKG=${NAMEPKG:-xalan-j}
BUILD=${BUILD:-3GGD}
ARCH=${ARCH:-noarch}
TARGET=${TARGET:-i486}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -56,7 +58,8 @@ fi
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=${NAMESRC}_${VERSION//./_}
@ -73,10 +76,10 @@ done
install -m 755 $CWD/xalan.sh $PKG/usr/bin/xalan
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMETGZ-$VERSION
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 LICENSE.txt NOTICE.txt readme.html \
$PKG/usr/doc/$NAMETGZ-$VERSION
cp -r docs samples $PKG/usr/doc/$NAMETGZ-$VERSION
$PKG/usr/doc/$NAMEPKG-$VERSION
cp -r docs samples $PKG/usr/doc/$NAMEPKG-$VERSION
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
@ -86,7 +89,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

49
ap/xalan-j/xalan.sh

@ -1,26 +1,45 @@
#!/bin/sh
#!/bin/bash
DB_EXT=/usr/share/xml/docbook/xsl-stylesheets-1.73.2/extensions/xalan27.jar
DB_EXT=/usr/share/xml/docbook/xsl-stylesheets-1.75.1/extensions/xalan27.jar
LIBS=/usr/lib/apache-xml:/usr/lib/apache-xml/*:$DB_EXT
PROGRAM_CLASS=org.apache.xalan.xslt.Process
RESOLVER_CLASS=org.apache.xml.resolver.tools.CatalogResolver
OPTS="-ENTITYRESOLVER $RESOLVER_CLASS -URIRESOLVER $RESOLVER_CLASS"
if [ ! "$1" ]; then
while true ; do
case "$1" in
-n|--nocatalog)
OPTS=""
shift
;;
-h|--help)
java -cp $LIBS $PROGRAM_CLASS
exit 0
;;
-e|--extra-libs)
LIBS="$2:$LIBS"
shift 2
;;
--)
shift
break
;;
*)
break
;;
esac
done
if [ -z "$1" ]; then
java -cp $LIBS $PROGRAM_CLASS
exit 1
fi
case "$1" in
-n|--nocatalog)
OPTS=""
shift
;;
-h|--help)
java -cp $LIBS $PROGRAM_CLASS
exit 0
;;
esac
JAVAOPTS="-cp $LIBS"
if [ "x$http_proxy" != x ]; then
proxy_host=`echo $http_proxy | cut -d: -f1,2`
proxy_port=`echo $http_proxy | cut -d: -f3`
JAVAOPTS="$JAVAOPTS -Dhttp.proxyHost=$proxy_host -Dhttp.proxyPort=$proxy_port"
fi
java -cp $LIBS $PROGRAM_CLASS $OPTS $@
java $JAVAOPTS $PROGRAM_CLASS $OPTS $@

Loading…
Cancel
Save