summaryrefslogtreecommitdiff
path: root/libraries/rxtx/rxtx.SlackBuild
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2011-07-19 21:05:22 -0300
committerRobby Workman <rworkman@slackbuilds.org>2011-07-21 22:52:13 -0500
commit7e73a9b6ba4c5c5c0801769a20a7723254318cb8 (patch)
treef2d55859f0c865e16f9354824237e7058a5a4e71 /libraries/rxtx/rxtx.SlackBuild
parent7bd2bdca9849bfe950f211b53bb36c2307dbca10 (diff)
downloadslackbuilds-7e73a9b6ba4c5c5c0801769a20a7723254318cb8.tar.gz
libraries/rxtx: Updated for version 2.2pre2.
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'libraries/rxtx/rxtx.SlackBuild')
-rw-r--r--libraries/rxtx/rxtx.SlackBuild55
1 files changed, 35 insertions, 20 deletions
diff --git a/libraries/rxtx/rxtx.SlackBuild b/libraries/rxtx/rxtx.SlackBuild
index 916390a4c5..4f275d6c69 100644
--- a/libraries/rxtx/rxtx.SlackBuild
+++ b/libraries/rxtx/rxtx.SlackBuild
@@ -1,22 +1,35 @@
#!/bin/sh
# Slackware build script for rxtx
-# Written by David Spencer <nobbutl@yahoo.co.uk>
-# This script is dedicated to the public domain
+# Copyright 2011 David Spencer, Baildon, West Yorkshire, U.K.
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, 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.
+#
+# 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.
PRGNAM=rxtx
-VERSION=2.0_7pre2
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-2.2pre2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-SRCVER=$(echo $VERSION | sed 's/_/-/')
-
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
fi
@@ -54,9 +67,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$SRCVER
-tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
-cd $PRGNAM-$SRCVER
+rm -rf $PRGNAM-$VERSION
+unzip $CWD/$PRGNAM-$VERSION.zip
+cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -64,13 +77,20 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Patch JDK and kernel version tests, and add DESTDIR support
-cat $CWD/rxtx.patch | patch -p1
+# Disable obsolete UTS_RELEASE check
+# http://mailman.qbang.org/pipermail/rxtx/2009-September/5399616.html
+patch -d src <$CWD/im-20090910.patch
+# Enumerate all serial ports (notably ttyACM*)
+# http://git.debian.org/?p=pkg-java/rxtx.git;a=commit;h=3302001ca24b671e75d43c9febd771e709a759e7
+patch -p1 <$CWD/ttyACM_port.patch
+# Add DESTDIR support to 'make install'
+patch -p1 <$CWD/destdir.patch
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
- --libdir=/usr/lib${LIBDIRSUFFIX}
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux
make
make install DESTDIR=$PKG
@@ -78,14 +98,9 @@ make install DESTDIR=$PKG
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-mkdir -p $PKG/$JAVA_HOME/lib/
-cat << EOF > $PKG/$JAVA_HOME/lib/javax.comm.properties
-Driver=gnu.io.RXTXCommDriver
-EOF
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog INSTALL PORTING README README.JRE \
+ AUTHORS COPYING ChangeLog INSTALL PORTING README \
SerialPortInstructions.txt TODO \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild