|
|
|
@ -23,14 +23,14 @@
|
|
|
|
|
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
|
|
|
# |
|
|
|
|
# Latest antlr3 sourcecode is available at: <http://www.antlr3.org/>. |
|
|
|
|
# |
|
|
|
|
# Depends: d/apache-maven |
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-antlr3} |
|
|
|
|
VERSION=${VERSION:-3.5.2} |
|
|
|
|
NAMESRC=${NAMESRC:-antlr} |
|
|
|
|
VERSION=${VERSION:-3.4} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://github.com/antlr/antlr3/archive/$VERSION.tar.gz} |
|
|
|
|
WGET=${WGET:-https://github.com/antlr/antlr3/archive/$ARCHIVE} |
|
|
|
|
JAR=${JAR:-antlr-$VERSION-complete.jar} |
|
|
|
|
WJAR=${WJAR:-http://www.antlr3.org/download/$JAR} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-antlr3} |
|
|
|
@ -74,12 +74,16 @@ x86_64)
|
|
|
|
|
;; |
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
# Get and verify the source archive |
|
|
|
|
# Get and verify the source archive and the Java archive |
|
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 |
|
|
|
|
if [ ! -r $JAR ]; then |
|
|
|
|
wget -c -O $JAR.part "$WJAR" |
|
|
|
|
mv $JAR.part $JAR |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $ARCHIVE.sha1 $JAR.sha1 |
|
|
|
|
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1) |
|
|
|
|
|
|
|
|
|
# Extract |
|
|
|
@ -88,15 +92,14 @@ echo "Building $ARCHIVE..."
|
|
|
|
|
tar xf $CWD/$ARCHIVE |
|
|
|
|
cd $NAME |
|
|
|
|
|
|
|
|
|
# Compile and install antlr3 Java executable |
|
|
|
|
mvn -N install |
|
|
|
|
mvn -Dgpg.skip=true -DskipTests=true |
|
|
|
|
install -D -m 644 antlr-complete/target/antlr-complete-$VERSION.jar \ |
|
|
|
|
$PKG/usr/lib/antlr/antlr-complete-$VERSION.jar |
|
|
|
|
# Don't compile the Java executable, this piece of crap cannot be |
|
|
|
|
# built properly (is it Antlr's fault, Maven's fault, or both, |
|
|
|
|
# I don't care). |
|
|
|
|
install -D -m 644 $CWD/$JAR $PKG/usr/lib/antlr/$JAR |
|
|
|
|
mkdir -p $PKG/usr/bin |
|
|
|
|
cat > $PKG/usr/bin/antlr3 <<EOF |
|
|
|
|
#!/bin/sh |
|
|
|
|
exec java -jar /usr/lib/antlr/antlr-complete-$VERSION.jar "\$@" |
|
|
|
|
exec java -jar /usr/lib/antlr/$JAR "\$@" |
|
|
|
|
EOF |
|
|
|
|
chmod 755 $PKG/usr/bin/antlr3 |
|
|
|
|
|
|
|
|
@ -111,12 +114,10 @@ chmod 755 $PKG/usr/bin/antlr3
|
|
|
|
|
--disable-static $FLAG64 |
|
|
|
|
make -j $JOBS |
|
|
|
|
make install-strip DESTDIR=$PKG |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
install -m 644 AUTHORS COPYING NEWS README $PKG/usr/doc/$NAMEPKG-$VERSION |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
# Install the documentation |
|
|
|
|
mkdir -p $PKG/usr/doc/$NAME |
|
|
|
|
install -m 644 README.txt $PKG/usr/doc/$NAME |
|
|
|
|
|
|
|
|
|
# Copy slack-desc file |
|
|
|
|
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc |
|
|
|
|
|
|
|
|
|