From da7d84cf61ac024c7a195aca353ec226aed270b1 Mon Sep 17 00:00:00 2001 From: Andrea Sacchetti Picchio Date: Fri, 15 Dec 2023 22:52:59 +0900 Subject: ham/dsdcc: Added (Digital Speech Decoder). Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- ham/dsdcc/README | 26 ++++++++++ ham/dsdcc/dsdcc.SlackBuild | 116 +++++++++++++++++++++++++++++++++++++++++++++ ham/dsdcc/dsdcc.info | 10 ++++ ham/dsdcc/slack-desc | 19 ++++++++ 4 files changed, 171 insertions(+) create mode 100644 ham/dsdcc/README create mode 100644 ham/dsdcc/dsdcc.SlackBuild create mode 100644 ham/dsdcc/dsdcc.info create mode 100644 ham/dsdcc/slack-desc (limited to 'ham') diff --git a/ham/dsdcc/README b/ham/dsdcc/README new file mode 100644 index 0000000000..3b0218b31f --- /dev/null +++ b/ham/dsdcc/README @@ -0,0 +1,26 @@ +Digital Speech Decoder (DSD) rewritten as a C++ library: + +- A purely C++ library with a single decoder object at its central + point +- Works by pushing new samples to the decoder at the upper level rather + than pulling it from the underlying filesystem at the lowest level. + This facilitates integration with software using it as a true library. + This comes especially handy for projects in Qt that cannot afford + using pthreads on their own like gr-dsd does. In fact the main drive + for this is to integrate it in a plugin of SDRangel. +- Works by polling to get possible new MBE or audio samples after new + samples have been pushed to the decoder +- Option to output audio samples as L+R (stereo) samples with L=R as + this may facilitate integration +- A binary that uses this library is provided for integration with + other commands that run in a shell. So basically it works only with + input / output files possibly being stdin / stdout to be integrated + in a pipe command. There is no direct usage of audio devices nor + fancy side reading from or writing to .wav or .mbe files. +- mbelib usage is optional at compile time. Without mbelib only the raw + MBE samples can be extracted to be processed outside of DSDcc with + the help of a hardware dongle for example thus lifting the POSSIBLE + COPYRIGHT VIOLATIONS + +For enabling MBE set the environment variable MBE=yes, this require +mbelib installed in your system. diff --git a/ham/dsdcc/dsdcc.SlackBuild b/ham/dsdcc/dsdcc.SlackBuild new file mode 100644 index 0000000000..157384df4d --- /dev/null +++ b/ham/dsdcc/dsdcc.SlackBuild @@ -0,0 +1,116 @@ +#!/bin/bash + +# Slackware build script for dsdcc + +# Copyright 2023 Andrea Sacchetti Picchio Italy +# 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=dsdcc +VERSION=${VERSION:-1.9.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} +NUMJOBS=${NUMJOBS:-" -j$(expr $(nproc) + 1) "} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +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" + LIBDIRSUFFIX="64" +elif [ "$ARCH" = "aarch64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP + +rm -rf $PRGNAM-$VERSION +unzip $CWD/$PRGNAM-$VERSION.zip +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 {} \; + +[ "${MBE:-no}" == "yes" ] && OPT_BUILD="-DUSE_MBELIB=ON" + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS -lserialdv" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -lserialdv" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DLIB_SUFFIX=${LIBDIRSUFFIX} \ + -DMAN_INSTALL_DIR=/usr/man \ + -DLIBSERIALDV_INCLUDE_DIR=/usr/include/serialdv \ + -DLIBSERIALDV_LIBRARY=/usr/lib$LIBDIRSUFFIX \ + $OPT_BUILD \ + -DCMAKE_BUILD_TYPE=Release .. + make $NUMJOBS + make install/strip DESTDIR=$PKG +cd .. + +# Fix (it seems that LIB_SUFFIX is not taken into account) +[ -d $PKG/usr/lib -a ! -e $PKG/usr/lib$LIBDIRSUFFIX ] && mv $PKG/usr/lib $PKG/usr/lib$LIBDIRSUFFIX + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + Readme.md messagefile.md CHANGELOG \ + $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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/ham/dsdcc/dsdcc.info b/ham/dsdcc/dsdcc.info new file mode 100644 index 0000000000..2e491540ad --- /dev/null +++ b/ham/dsdcc/dsdcc.info @@ -0,0 +1,10 @@ +PRGNAM="dsdcc" +VERSION="1.9.5" +HOMEPAGE="https://github.com/f4exb/dsdcc/" +DOWNLOAD="https://github.com/f4exb/dsdcc/archive/v1.9.5/dsdcc-1.9.5.zip" +MD5SUM="eda48bb29bddffec3338300159952f68" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="mbelib serialDV" +MAINTAINER="Andrea Sacchetti Picchio" +EMAIL="andrea dot sacchettipicchio at gmail dot com" diff --git a/ham/dsdcc/slack-desc b/ham/dsdcc/slack-desc new file mode 100644 index 0000000000..555b0b1152 --- /dev/null +++ b/ham/dsdcc/slack-desc @@ -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------------------------------------------------------| +dsdcc: dsdcc (Digital Speech Decoder (DSD) C++ library ) +dsdcc: +dsdcc: For now we have: +dsdcc: - DMR/MOTOTRBO: ETSI two slot TDMA standard. +dsdcc: - D-Star: by Icom for Amateur Radio customers. +dsdcc: - dPMR: ETSI narrowband FDMA standard (similar to NXDN 2400). +dsdcc: - Yaesu System Fusion (YSF): by Yaesu for Amateur Radio customers. +dsdcc: +dsdcc: +dsdcc: Homepage: https://github.com/f4exb/dsdcc/ +dsdcc: -- cgit v1.2.3-65-gdbad