summaryrefslogtreecommitdiffstats
path: root/libraries/libindi-drivers/libindi-drivers.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libindi-drivers/libindi-drivers.SlackBuild')
-rw-r--r--libraries/libindi-drivers/libindi-drivers.SlackBuild74
1 files changed, 38 insertions, 36 deletions
diff --git a/libraries/libindi-drivers/libindi-drivers.SlackBuild b/libraries/libindi-drivers/libindi-drivers.SlackBuild
index c17a333835..50428f9309 100644
--- a/libraries/libindi-drivers/libindi-drivers.SlackBuild
+++ b/libraries/libindi-drivers/libindi-drivers.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libindi
-# Copyright 2018 Edward W. Koenig, Vancouver, WA, USA
+# Copyright 2018, 2022 Edward W. Koenig, Vancouver, WA, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,12 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libindi-drivers
-SRCNAM="libindi_3rdparty_"
-DRIVER=3rdparty
-VERSION=${VERSION:-1.6.2}
+SRCNAM="indi-3rdparty"
+VERSION=${VERSION:-2.0.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -37,7 +39,20 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+case "$ARCH" in
+ x86_64) ;;
+ arm*) ;;
+ *) echo "Unsupported ARCH '$ARCH'"; exit 1 ;;
+esac
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -61,9 +76,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $DRIVER
-tar xvf $CWD/$SRCNAM$VERSION.tar.gz
-cd $DRIVER
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
+cd $SRCNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -71,33 +86,23 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-# Note: Some drivers disabled since no buildscripts exist on SBo yet.
-# libqhy: SDK including firmware and drivers for QHY astronomy camaras.
-# libqsi: support for Quantum Scientific Imaging CCDs & Filter Wheels driver
-# libsbigudev: firmware for Santa Barbra Instruments Group line of CCDs & Filter Wheels
-# libinovasdk: support for i.Nova PLx series CCD/CMOS cameras driver
-# libfli: support for Finger Lakes Instruments CCD and Focuser driver
-# libapogee: support for Apogee Alta (U & E) line of CCDs
-# libfishcamp: support for Fishcamp Engineering's Starfish CMOS autoguider
-# libdspau: support for Realtek RTL2832U chip driven receivers
-#
-# These libraries, some included in the 3rdparty source, will be added as I create
-# the install scripts.
+sed -i '/#include <stdint.h>/a #include <cstddef>' indi-celestronaux/auxproto.h
+
+# Note: Some drivers (limesdr) disabled since no buildscripts exist on SBo yet.
+# There may be other runtime dependencies.
+
+# cmakelists bug preventing build of libmeadecam and libahp-gt? Well, skip
+# those drivers as well for now - and hope no one notices ;-)
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
-mkdir -p build
-cd build
+ mkdir -p build
+cd $TMP/$SRCNAM-$VERSION/build
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DWITH_QHY:OPTION=OFF \
- -DWITH_QSI:OPTION=OFF \
- -DWITH_SBIG:OPTION=OFF \
- -DWITH_INOVAPLX:OPTION=OFF \
- -DWITH_FLI:OPTION=OFF \
- -DWITH_APOGEE:OPTION=OFF \
- -DWITH_FISHCAMP:OPTION=OFF \
- -DWITH_RTLSDR:OPTION=OFF \
+ -DWITH_LIMESDR:OPTION=OFF \
+ -DWITH_TOUPBASE:OPTION=OFF \
+ -DWITH_AHP_GT:OPTION=OFF \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG
@@ -106,16 +111,13 @@ cd ..
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-# fixup udev rules in the wrong dir
-mv $PKG/etc/udev/rules.d/99-meadedsi.rules $PKG/lib/udev/rules.d/
-rm -rf $PKG/etc
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE