Initial commit
This commit is contained in:
170
CubicSDR/CubicSDR.SlackBuild
Executable file
170
CubicSDR/CubicSDR.SlackBuild
Executable file
@@ -0,0 +1,170 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Slackware build script for CubicSDR
|
||||
|
||||
# Copyright 2022 Alan Aversa USA
|
||||
# Copyright 2023 Sergei Fedosoff <eleksir@gmail.com>
|
||||
#
|
||||
# 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.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=CubicSDR
|
||||
VERSION=${VERSION:-0.2.7}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i586 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# 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}
|
||||
|
||||
if [ "$ARCH" = "i586" ]; then
|
||||
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC -mfpmath=sse -msse -msse2 -msse3 -msse4 -msse4.1 -msse4.2 -mavx -mavx2"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
mkdir $PRGNAM-$VERSION
|
||||
cd $PRGNAM-$VERSION
|
||||
|
||||
# static wxWidgets
|
||||
|
||||
STATICWXWIDGETS_DESTDIR=$TMP/$PRGNAM-$VERSION/wxWidgets-staticlib
|
||||
mkdir -p $STATICWXWIDGETS_DESTDIR
|
||||
|
||||
VERWXWIDGETS=${VERWXWIDGETS:-3.1.5}
|
||||
|
||||
tar xf $CWD/wxWidgets-$VERWXWIDGETS.tar.bz2
|
||||
cd wxWidgets-$VERWXWIDGETS
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
./autogen.sh
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS -std=c++0x" \
|
||||
./configure \
|
||||
--with-opengl \
|
||||
--disable-shared \
|
||||
--enable-monolithic \
|
||||
--with-libjpeg \
|
||||
--with-libtiff \
|
||||
--with-libpng \
|
||||
--with-zlib \
|
||||
--disable-sdltest \
|
||||
--enable-unicode \
|
||||
--enable-display \
|
||||
--enable-propgrid \
|
||||
--disable-webview \
|
||||
--disable-webviewwebkit \
|
||||
--disable-tests \
|
||||
--with-x \
|
||||
--with-gtk=3 \
|
||||
--with-xtest \
|
||||
--with-libiconv \
|
||||
--enable-commondlg \
|
||||
--enable-tooltips \
|
||||
--enable-richtooltip \
|
||||
--enable-markup \
|
||||
--enable-accel \
|
||||
--prefix="$STATICWXWIDGETS_DESTDIR"
|
||||
|
||||
make -j$(nproc)
|
||||
make install
|
||||
|
||||
cd ..
|
||||
|
||||
# build CubicSDR
|
||||
|
||||
tar xf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
|
||||
-DwxWidgets_CONFIG_EXECUTABLE=$STATICWXWIDGETS_DESTDIR/bin/wx-config \
|
||||
-DUSE_HAMLIB=ON \
|
||||
-DUSE_SOAPY_SDR=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release ..
|
||||
make -j$(nproc)
|
||||
make install DESTDIR=$PKG
|
||||
cd ..
|
||||
|
||||
# Package everything
|
||||
|
||||
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
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
cat $CWD/slack-required > $PKG/install/slack-required
|
||||
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|
||||
12
CubicSDR/CubicSDR.info
Normal file
12
CubicSDR/CubicSDR.info
Normal file
@@ -0,0 +1,12 @@
|
||||
PRGNAM="CubicSDR"
|
||||
VERSION="0.2.7"
|
||||
HOMEPAGE="https://github.com/cjcliffe/CubicSDR/"
|
||||
DOWNLOAD="https://github.com/cjcliffe/CubicSDR/archive/0.2.7/CubicSDR-0.2.7.tar.gz \
|
||||
https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2"
|
||||
MD5SUM="6e4cfeab14d9ec54daaed6079a5312ae \
|
||||
8b2ac42364a02bb5f3df22e1b1a517e5"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES="SoapySDR liquid-dsp"
|
||||
MAINTAINER="Sergei Fedosoff"
|
||||
EMAIL="eleksir@gmail.com"
|
||||
9
CubicSDR/README
Normal file
9
CubicSDR/README
Normal file
@@ -0,0 +1,9 @@
|
||||
CubicSDR is the software portion of Software Defined Radio. By using
|
||||
hardware that converts RF spectrum into a digital stream we are able to
|
||||
build complex radios to do many types of functions in software instead
|
||||
of traditional hardware.
|
||||
|
||||
Paired with a supported hardware receiver, you can use CubicSDR to
|
||||
explore the RF world around you. Discover Satellite transmissions,
|
||||
Amateur Radio, Rail, Aeronautical, Shortwave, or any number of possible
|
||||
signals floating through the air.
|
||||
3
CubicSDR/doinst.sh
Normal file
3
CubicSDR/doinst.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
if [ -x /usr/bin/update-desktop-database ]; then
|
||||
/usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
|
||||
fi
|
||||
19
CubicSDR/slack-desc
Normal file
19
CubicSDR/slack-desc
Normal file
@@ -0,0 +1,19 @@
|
||||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
CubicSDR: CubicSDR (Software-Defined Radio Application)
|
||||
CubicSDR:
|
||||
CubicSDR: CubicSDR is the software portion of Software Defined Radio. By using
|
||||
CubicSDR: hardware that converts RF spectrum into a digital stream we are able
|
||||
CubicSDR: to build complex radios to do many types of functions in software
|
||||
CubicSDR: instead of traditional hardwre.
|
||||
CubicSDR:
|
||||
CubicSDR: Paired with a supported hardware receiver, you can use CubicSDR to
|
||||
CubicSDR: explore the RF world around you. Discover Satellite transmissions,
|
||||
CubicSDR: Amateur Radio, Rail, Areonautical, Shortwave, or any number of
|
||||
CubicSDR: possible signals floating through the air.
|
||||
4
CubicSDR/slack-required
Normal file
4
CubicSDR/slack-required
Normal file
@@ -0,0 +1,4 @@
|
||||
SoapySDR
|
||||
liquid-dsp
|
||||
SoapyHackRF
|
||||
hamlib
|
||||
Reference in New Issue
Block a user