l/swfdec: Updated for Slackware-13.1.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent 1b095adf30
commit cf4b13f12d
  1. 62
      l/swfdec/swfdec.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2008,2009 Damien Goutte-Gattat
# Copyright (C) 2008,2009,2010 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -24,6 +24,8 @@
#
# Latest swfdec sourcecode is available at:
# <http://swfdec.freedesktop.org/>.
#
# Recommends: gnome/libsoup
# Source package infos
NAMESRC=${NAMESRC:-swfdec}
@ -32,15 +34,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://swfdec.freedesktop.org/download/swfdec/0.8/$ARCHIVE}
# Built package infos
NAMETGZ=${NAMETGZ:-swfdec}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-i486}
TARGET=${TARGET:-i486}
NAMEPKG=${NAMEPKG:-swfdec}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i?86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -56,23 +59,26 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
if [ "$ARCH" = "i386" ]; then
CPUOPT="-O2 -march=i386 -mtune=i686"
elif [ "$ARCH" = "i486" ]; then
CPUOPT="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i586" ]; then
CPUOPT="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
CPUOPT="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
CPUOPT="-O2"
elif [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
fi
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget "$WGET"
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
@ -86,20 +92,16 @@ CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--disable-dependency-tracking \
--disable-gtk \
--disable-static
make -j 3
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
--disable-static \
--enable-gtk-doc
make -j $JOBS
make install-strip DESTDIR=$PKG
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 \
AUTHORS COPYING ChangeLog MAINTAINERS NEWS README \
install -m 644 AUTHORS COPYING ChangeLog MAINTAINERS NEWS README \
$PKG/usr/doc/$NAME
# Copy slack-desc file
@ -110,7 +112,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save