#!/bin/bash CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-xine-lib rm -rf $PKG mkdir -p $PKG/usr # Version on the tarball VERSION=1.1.6 # Version used in the source directory to cd into DIRVER=1.1.6 # Version used for the Slackware package PKGVER=1.1.6 # I would use "-march=i486 -mtune=i686" here as usual, but with XINE it's all or nothing. # I'd rather have it work well for the i686/Athlon crowd than suck for everyone. # Anybody have any idea what will work ok on sparc? I doubt a v8 could # handle it, but at least it will decode. # If you actually have a sparc fast enough, and you actually want # to watch DVD's on it, change mcpu=v9. You'll need an ultrasparc # of some kind. ARCH=${ARCH:-sparc} #TARGET=${TARGET:-$ARCH-pc-linux-gnu} TARGET=${TARGET:-$ARCH-bobware-linux-gnu} BUILD=1_slack10.2 cd $TMP rm -rf xine-lib-$VERSION tar xjvf $CWD/xine-lib-$VERSION.tar.bz2 || exit 1 cd xine-lib-$DIRVER ( cd src/libffmpeg/libavcodec/sparc; patch -p0 < $CWD/visfix.patch; ) chown -R root:root . find . -perm 664 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; XINE_BUILD=$TARGET \ ./configure \ --prefix=/usr \ --mandir=/usr/man \ --with-w32-path=/usr/lib/codecs \ --disable-vis \ CFLAGS="-m32 -mcpu=v8 -mtune=v9" make -j2 || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/lib/codecs ( cd $PKG find . | xargs file | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded ) for manpagedir in $PKG/usr/man/man? ; do if [ -d $manpagedir ]; then ( cd $manpagedir ; gzip -9 *.? ) fi done mkdir -p $PKG/usr/doc/xine-lib-$VERSION cp -a \ ABOUT-NLS AUTHORS COPYING CREDITS NEWS README TODO \ doc/README* \ doc/faq/faq.txt \ doc/hackersguide \ $PKG/usr/doc/xine-lib-$VERSION # redundant rm -rf $PKG/usr/share/doc rm $PKG/usr/doc/xine-lib-$VERSION/hackersguide/Makefile* rm $PKG/usr/doc/xine-lib-$VERSION/hackersguide/*sgml rm $PKG/usr/doc/xine-lib-$VERSION/hackersguide/*fig rm -rf $PKG/usr/doc/xine-lib-$VERSION/man mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $TMP/package-xine-lib makepkg -l y -c n ../xine-lib-$PKGVER-$ARCH-$BUILD.tgz