diff options
Diffstat (limited to 'source/l/libsamplerate')
-rwxr-xr-x | source/l/libsamplerate/libsamplerate.SlackBuild | 73 | ||||
-rw-r--r-- | source/l/libsamplerate/slack-desc | 19 |
2 files changed, 92 insertions, 0 deletions
diff --git a/source/l/libsamplerate/libsamplerate.SlackBuild b/source/l/libsamplerate/libsamplerate.SlackBuild new file mode 100755 index 00000000..cc4c5d50 --- /dev/null +++ b/source/l/libsamplerate/libsamplerate.SlackBuild @@ -0,0 +1,73 @@ +#!/bin/sh + +# Slackware build script for libsamplerate +# Written by paul wisehart paul@1ud2.com +# Modified by Robby Workman <rworkman@slackbuilds.org> + +PRGNAM=libsamplerate +VERSION=0.1.7 +BUILD=${BUILD:-1} + +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.?z* || exit 1 +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --disable-static \ + --localstatedir=/var \ + --build=$ARCH-slackware-linux + +make -j4 || exit 1 +make install DESTDIR=$PKG || exit 1 + +find $PKG | xargs 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 COPYING README doc/* $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.txz diff --git a/source/l/libsamplerate/slack-desc b/source/l/libsamplerate/slack-desc new file mode 100644 index 00000000..cf52161d --- /dev/null +++ b/source/l/libsamplerate/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 ':'. + + |-----handy-ruler------------------------------------------------------| +libsamplerate: libsamplerate (a Sample Rate Converter for audio) +libsamplerate: +libsamplerate: Secret Rabbit Code (aka libsamplerate) is a Sample Rate Converter for +libsamplerate: audio. One example of where such a thing would be useful is +libsamplerate: converting audio from the CD sample rate of 44.1kHz to the 48kHz +libsamplerate: sample rate used by DAT players. SRC is capable of arbitrary and time +libsamplerate: varying conversions. SRC provides a small set of converters to allow +libsamplerate: quality to be traded off against computation cost. +libsamplerate: +libsamplerate: libsamplerate home: http://www.mega-nerd.com/SRC/ +libsamplerate: |