summaryrefslogtreecommitdiff
path: root/system/gpsd/gpsd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/gpsd/gpsd.SlackBuild')
-rw-r--r--system/gpsd/gpsd.SlackBuild26
1 files changed, 15 insertions, 11 deletions
diff --git a/system/gpsd/gpsd.SlackBuild b/system/gpsd/gpsd.SlackBuild
index 13c61d03e9..4ebde3fcb3 100644
--- a/system/gpsd/gpsd.SlackBuild
+++ b/system/gpsd/gpsd.SlackBuild
@@ -1,19 +1,17 @@
#!/bin/sh
# Slackware build script for gpsd
-# Written by David Spencer <nobbutl@yahoo.co.uk>
+# Written by David Spencer <baildon.research@googlemail.com>
# This script is dedicated to the public domain
PRGNAM=gpsd
-VERSION=2.39
+VERSION=2.94
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-# 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
@@ -40,14 +38,14 @@ fi
set -e
ENABLELIST=""
-set -- $ENABLE
+set -- $(echo $ENABLE | sed 's/,/ /g')
while [[ "$1" != "" ]]
do
ENABLELIST+=" --enable-$1"
shift
done
DISABLELIST=""
-set -- $DISABLE
+set -- $(echo $DISABLE | sed 's/,/ /g')
while [[ "$1" != "" ]]
do
DISABLELIST+=" --disable-$1"
@@ -64,8 +62,12 @@ chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Fixup the pkgconfig file templates
+# (force "pkg-config --libs libgps[d]" to return -L/usr/lib64 on x86_64)
patch -p1 < $CWD/gpsd-pkgconfig_templates.patch
+# Fix libusb detection (thanks Niels Horn!)
+sed "s|/usr/lib/libusb|/usr/lib$LIBDIRSUFFIX/libusb|" -i configure
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
@@ -75,16 +77,18 @@ CXXFLAGS="$SLKCFLAGS" \
--localstatedir=/var \
--mandir=/usr/man \
--enable-dbus \
+ --build=$ARCH-slackware-linux \
$ENABLELIST \
$DISABLELIST
make
-make install-strip DESTDIR=$PKG
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+# --no-print-directory prevents crazy gps-2.94-py2.6.egg-info install path
+# (thanks again Niels Horn!)
+make --no-print-directory install-strip DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $(find $PKG/usr/man -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING INSTALL README TODO $PKG/usr/doc/$PRGNAM-$VERSION