2010-05-13 00:59:37 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Slackware build script for dvdstyler
|
|
|
|
|
2010-12-07 06:06:56 +01:00
|
|
|
# Written by ponce <matteo.bernardini@gmail.com>
|
2010-05-13 00:59:37 +02:00
|
|
|
|
|
|
|
PRGNAM=dvdstyler
|
|
|
|
SPRGNAM=DVDStyler
|
2012-08-21 17:45:33 +02:00
|
|
|
VERSION=${VERSION:-2.3rc2}
|
2010-05-13 00:59:37 +02:00
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
2010-06-04 07:11:30 +02:00
|
|
|
if [ -z "$ARCH" ]; then
|
|
|
|
case "$( uname -m )" in
|
|
|
|
i?86) ARCH=i486 ;;
|
|
|
|
arm*) ARCH=arm ;;
|
|
|
|
*) ARCH=$( uname -m ) ;;
|
|
|
|
esac
|
|
|
|
fi
|
|
|
|
|
2010-05-13 00:59:37 +02:00
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
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"
|
2010-06-04 07:11:30 +02:00
|
|
|
else
|
|
|
|
SLKCFLAGS="-O2"
|
|
|
|
LIBDIRSUFFIX=""
|
2010-05-13 00:59:37 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $SPRGNAM-$VERSION
|
|
|
|
tar xvf $CWD/$SPRGNAM-$VERSION.tar.bz2
|
|
|
|
cd $SPRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
|
|
|
find . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
|
|
-exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \;
|
|
|
|
|
2011-12-25 13:09:07 +01:00
|
|
|
# a header is renamed in ffmpeg-0.9 so check if applies
|
|
|
|
if [ -f /usr/include/libavfilter/buffersink.h ]; then
|
|
|
|
sed -i "s|vsink_buffer\.h|buffersink.h|" src/mediatrc_ffmpeg.cpp
|
|
|
|
fi
|
|
|
|
|
2012-08-21 17:45:33 +02:00
|
|
|
# This fixes build when gnome support is disabled
|
|
|
|
# http://sourceforge.net/tracker/?func=detail&aid=3559741&group_id=92301&atid=600266
|
|
|
|
patch -p0 < $CWD/dvdstyler-2.3rc2-nognome.patch
|
|
|
|
|
2012-04-01 16:09:15 +02:00
|
|
|
LDFLAGS="-ljpeg" \
|
2010-05-13 00:59:37 +02:00
|
|
|
CFLAGS="$SLKCFLAGS" \
|
|
|
|
CXXFLAGS="$SLKCFLAGS" \
|
|
|
|
./configure \
|
|
|
|
--prefix=/usr \
|
|
|
|
--libdir=/usr/lib${LIBDIRSUFFIX} \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--localstatedir=/var \
|
|
|
|
--mandir=/usr/man \
|
|
|
|
--docdir=/usr/doc/$PRGNAM-$VERSION \
|
|
|
|
--build=$ARCH-slackware-linux
|
|
|
|
|
|
|
|
make
|
|
|
|
make install DESTDIR=$PKG
|
|
|
|
|
2011-12-25 13:09:07 +01:00
|
|
|
# install a proper svg icon a remove the bad quality one
|
2011-12-23 03:47:56 +01:00
|
|
|
install -D -m0644 $CWD/$PRGNAM.svg $PKG/usr/share/pixmaps/$PRGNAM.svg
|
2011-12-25 13:09:07 +01:00
|
|
|
rm $PKG/usr/share/pixmaps/$PRGNAM.png
|
2010-05-13 00:59:37 +02:00
|
|
|
|
2010-05-19 08:40:38 +02:00
|
|
|
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
|
|
|
|
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
|
2010-05-13 00:59:37 +02:00
|
|
|
|
2010-09-21 02:30:48 +02:00
|
|
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
|
|
|
for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
|
2010-05-13 00:59:37 +02:00
|
|
|
|
|
|
|
cp -a AUTHORS COPYING ChangeLog INSTALL README TODO $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
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|