From 5499fd6bc60da89d77aab476aa6ddaf73760b245 Mon Sep 17 00:00:00 2001 From: rafael2k Date: Mon, 19 Jan 2009 13:05:51 +0000 Subject: soundmodem added git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2088 370017ae-e619-0410-ac65-c121f96126d4 --- media/radio/soundmodem/Manifest | 3 + media/radio/soundmodem/soundmodem.SlackBuild | 154 +++++++++++++++++++++++++++ 2 files changed, 157 insertions(+) create mode 100644 media/radio/soundmodem/Manifest create mode 100644 media/radio/soundmodem/soundmodem.SlackBuild (limited to 'media') diff --git a/media/radio/soundmodem/Manifest b/media/radio/soundmodem/Manifest new file mode 100644 index 00000000..00dffd4a --- /dev/null +++ b/media/radio/soundmodem/Manifest @@ -0,0 +1,3 @@ +DIST soundmodem-0.11.tar.gz 469630 MD5 2ec25c8720e1d06cde5b426bac624bb9 RMD160 ef08a32eb0c986f73b2803ae20b1e36979f5c4e3 SHA1 2596069bd97fe085b612676ec43e84fc11276e0a SHA256 2e0daa9fb6bf173413c9810255afef6b2e3d7fec3043236c8a96a251c98cc804 SHA512 da29669ac86cfc2b05f2c3ed986fd5b830b18f29cfa4ea187858afda0150b85394e00d6310753ea86174683c5168ebbfffcfb4da9b97f70b7b0c1438ecfefc47 +MKBUILD soundmodem.mkbuild 5046 MD5 b8ad0744f0e830208f0326576347dda8 RMD160 5539fb2848d294075a214f44fae6aa6df5a9155d SHA1 6ee4748b27d4fd9a290bd51c70afbf9423581884 SHA256 649c00e6458c50189c5ac3ba2e0007c8d9d75cd02b3698a4d2ca063789daaf49 SHA512 0470a1970a1bc10d0fe50adb4ce5b6184b9f53d2a2f4a96129c5d1c7d723b4f713a758fc57e223979ec9f755bbfe2d5ebf6358e7eeaf9f0cb9cac9dae169a4c1 +SLACKBUILD soundmodem.SlackBuild 4905 MD5 7d45a9c0962d03e880f63dedf4c01d0c RMD160 c75776abebaf75175761b9fdd54d84368e6b4359 SHA1 a1c3728302b8ee17b291668f14ff2110f8268835 SHA256 28888624bbf42a75efca9ca09350f1c915de27d7c7cc56ab1caf374ef7634b8b SHA512 c70ddaf854716a15eb97d8c15538d3897ea15b8a3b5a80df6318152d7bb81b0b607af97b83274f95777d33bc518a8503316d231a6f9bc647f8587d309818a92e diff --git a/media/radio/soundmodem/soundmodem.SlackBuild b/media/radio/soundmodem/soundmodem.SlackBuild new file mode 100644 index 00000000..9d1c35ad --- /dev/null +++ b/media/radio/soundmodem/soundmodem.SlackBuild @@ -0,0 +1,154 @@ +#!/bin/bash +# +# soundmodem.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. +# +# soundmodem.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# +# slackbuild for soundmodem, by Rafael Diniz +# requires: +# tested: soundmodem-0.11 +# + +# Look for slackbuildrc +if [ -f ~/.slackbuildrc ]; then + source ~/.slackbuildrc +elif [ -f /etc/slackbuildrc ]; then + source /etc/slackbuildrc +fi + +# Set variables +CWD="$(pwd)" +SRC_NAME="soundmodem" +PKG_NAME="soundmodem" +ARCH=${ARCH:=i486} +SRC_VERSION=${VERSION:=0.11} +PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" +BUILD=${BUILD:=1rd} +SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME +TMP=${TMP:=/tmp} +PKG=${PKG:=$TMP/package-$PKG_NAME} +REPOS=${REPOS:=$TMP} +PREFIX=${PREFIX:=/usr} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:=""} +NUMJOBS=${NUMJOBS:="-j4"} + +# Set system libraries' path and optmization flags based on $ARCH +LIBDIR="$PREFIX/lib" + +if [ "$ARCH" = "i386" ]; then + SLKCFLAGS="-O2 -march=i386 -mtune=i686" +elif [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686" +elif [ "$ARCH" = "s390" ]; then + SLKCFLAGS="-O2" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIR="$PREFIX/lib64" + LDFLAGS="-L/lib64 -L/usr/lib64" +fi + +# Set error codes (used by createpkg) +ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 +ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 +ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 +ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; + +# Clean up any leftovers of previous builds +rm -rf "$PKG_WORK" 2> /dev/null +rm -rf "$PKG" 2> /dev/null + +# Create directories if necessary +mkdir -p "$SRC_DIR" || exit $ERROR_MKDIR +mkdir -p "$PKG" || exit $ERROR_MKDIR +mkdir -p "$REPOS" || exit $ERROR_MKDIR +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR + +# Dowload source if necessary +SRC="$SRC_NAME-$VERSION.tar.gz" +URL="http://www.baycom.org/~tom/ham/soundmodem/$SRC" + +if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then + wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET +fi + +# Untar +cd "$PKG_WORK" +tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" +cd "$PKG_SRC" + +# Configure +CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ./configure \ + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF + +# Compile +make $NUMJOBS || exit $ERROR_MAKE + +# Install +make install DESTDIR="$PKG" || exit $ERROR_INSTALL + +# Strip binaries +( cd "$PKG" + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null +) + +# Install documentation +DOCS="NEWS TODO README AUTHORS INSTALL ChangeLog MAINTAINERS COPYING LICENSE SIGNATURE readme.*" +mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done + +# Add package description (slack-desc) +mkdir -p "$PKG/install" || exit $ERROR_MKDIR +cat << EODESC > "$PKG/install/slack-desc" +# 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 ':'. + + |-----handy-ruler---------------------------------------------------| +soundmodem: soundmodem by Slack.Sarava +soundmodem: +soundmodem: This software allows a standard PC soundcard to be +soundmodem: used as a packet radio "modem". The whole processing +soundmodem: is done on the main processor CPU. +soundmodem: +soundmodem: +soundmodem: made by Thomas Sailer, HB9JNX/AE4WA +soundmodem: +soundmodem: http://www.baycom.org/~tom/ham/soundmodem/ +soundmodem: +EODESC + +# Build the package +cd "$PKG" +makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG + +# Delete source and build directories if requested +if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then + rm -rf "$PKG_WORK" "$PKG" +fi -- cgit v1.2.3