mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
libraries/libsndfile: Updated for version 1.0.17
This commit is contained in:
parent
8263279216
commit
2a60e343c5
1 changed files with 29 additions and 22 deletions
|
@ -18,36 +18,41 @@
|
|||
# Modified by Eric Hameleers
|
||||
# - apply a patch if compiling against FLAC > 1.1.2
|
||||
|
||||
PKGNAME=libsndfile
|
||||
PRGNAM=libsndfile
|
||||
VERSION=1.0.17
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-1}
|
||||
BUILD=${BUILD:-2}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PKGNAME
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP || exit 1
|
||||
rm -rf $PKGNAME-$VERSION
|
||||
tar -xvzf $CWD/$PKGNAME-$VERSION.tar.gz || exit 1
|
||||
cd $PKGNAME-$VERSION || exit 1
|
||||
# Apply patch for flac > 1.1.2 where the API changed:
|
||||
if [ $(flac -v | cut -f2 -d' ' | tr -d '.') -gt 112 ]; then
|
||||
patch -p1 < $CWD/${PKGNAME}_flac.patch || exit 1
|
||||
fi
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION
|
||||
tar -xvzf $CWD/$PRGNAM-$VERSION.tar.gz
|
||||
cd $PRGNAM-$VERSION
|
||||
chown -R root:root .
|
||||
chmod -R a-s,u+w,go+r-w .
|
||||
|
||||
# Apply patch for flac > 1.1.2 where the API changed:
|
||||
if [ $(flac -v | cut -f2 -d' ' | tr -d '.') -gt 112 ]; then
|
||||
patch -p1 < $CWD/${PRGNAM}_flac.patch || exit 1
|
||||
fi
|
||||
|
||||
CFLAGS="$SLKCFLAGS" \
|
||||
CXXFLAGS="$SLKCFLAGS" \
|
||||
./configure \
|
||||
|
@ -55,25 +60,27 @@ CXXFLAGS="$SLKCFLAGS" \
|
|||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
--mandir=/usr/man \
|
||||
--docdir=/usr/doc/$PKGNAME-$VERSION \
|
||||
--htmldir=/usr/doc/$PKGNAME-$VERSION/html \
|
||||
|| exit 1
|
||||
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
||||
--htmldir=/usr/doc/$PRGNAM-$VERSION/html \
|
||||
--enable-static=no \
|
||||
--build=$ARCH-slackware-linux \
|
||||
--host=$ARCH-slackware-linux
|
||||
|
||||
make || exit 1
|
||||
make install DESTDIR=$PKG || exit 1
|
||||
make
|
||||
make install DESTDIR=$PKG
|
||||
|
||||
( cd $PKG
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
||||
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
|
||||
)
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PKGNAME-$VERSION
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
|
||||
$PKG/usr/doc/$PKGNAME-$VERSION
|
||||
$PKG/usr/doc/$PRGNAM-$VERSION
|
||||
# The --htmldir switch isn't working as of version 1.0.17
|
||||
mv $PKG/usr/share/doc/libsndfile1-dev/html/ $PKG/usr/doc/$PKGNAME-$VERSION
|
||||
mv $PKG/usr/share/doc/libsndfile1-dev/html/ $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
rm -rf $PKG/usr/share/doc
|
||||
cat $CWD/$PKGNAME.SlackBuild > $PKG/usr/doc/$PKGNAME-$VERSION/$PKGNAME.SlackBuild
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
( cd $PKG/usr/man
|
||||
find . -type f -exec gzip -9 {} \;
|
||||
|
@ -84,4 +91,4 @@ mkdir -p $PKG/install
|
|||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAME-$VERSION-$ARCH-$BUILD$TAG.tgz
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
|
||||
|
|
Loading…
Reference in a new issue