summaryrefslogtreecommitdiffstats
path: root/audio/kradio/kradio.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'audio/kradio/kradio.SlackBuild')
-rw-r--r--audio/kradio/kradio.SlackBuild39
1 files changed, 26 insertions, 13 deletions
diff --git a/audio/kradio/kradio.SlackBuild b/audio/kradio/kradio.SlackBuild
index 50ed5f7e92..a908ebf003 100644
--- a/audio/kradio/kradio.SlackBuild
+++ b/audio/kradio/kradio.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for kradio
@@ -23,27 +23,37 @@
# 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=kradio
-SRCNAM=kradio4
-VERSION=${VERSION:-4.0.8}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-5.0.0_beta1}
+SRCVER=$(echo $VERSION | tr _ - )
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# 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" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -61,9 +71,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
-cd $SRCNAM-$VERSION
+rm -rf ${PRGNAM}5-$SRCVER
+tar xvf $CWD/${PRGNAM}5-$SRCVER.tar.bz2
+cd ${PRGNAM}5-$SRCVER
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -71,6 +81,9 @@ 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 {} \;
+# stops bailing out with std::numeric_limits errors
+sed -i "1i #include <KF5/wtf/HashTraits.h>" src/soundformat.h
+
mkdir -p build
cd build
cmake -G "Unix Makefiles" \
@@ -92,7 +105,7 @@ install -m 0644 debian/*.1 $PKG/usr/man/man1
gzip -9 $PKG/usr/man/man1/*.?
mkdir -p $PKG/usr/doc
-mv $PKG/usr/share/doc/kradio4 $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/doc/${PRGNAM}5 $PKG/usr/doc/$PRGNAM-$VERSION
rm -rf $PKG/usr/share/doc
cp -a dot-lircrc.example $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
@@ -102,4 +115,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
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