#!/bin/sh # written by fae PKGNAME=xvidcore VERSION=1.1.3 URL=http://downloads.xvid.org/downloads/xvidcore-$VERSION.tar.gz ARCH=i686 BUILD=1X TARGET=${TARGET:-i486} TMP=${TMP:-/tmp} CWD=`pwd` PKG=$TMP/package-$PKGNAME if [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi # This is optional - it will halt script execution if anything goes wrong. set -e if [ ! -e $CWD/$PKGNAME-$VERSION.tar.gz ]; then echo "Download sources for $PKGNAME..." wget -c $URL -P $CWD fi rm -rf $PKG mkdir -p $PKG cd $TMP tar -zxvf $CWD/$PKGNAME-$VERSION.tar.gz cd $PKGNAME-$VERSION chown -R root.root * find . -perm 777 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 555 -exec chmod 755 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 775 -exec chmod 755 {} \; echo "Building $PKGNAME package..." cd build/generic CFLAGS=$SLKCFLAGS ./configure --prefix=/usr --sysconfdir=/etc \ $TARGET-slackware-linux make make install DESTDIR=$PKG cd $PKG find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null mkdir -p $PKG/install cat << DESC >> $PKG/install/slack-desc |-----handy-ruler------------------------------------------------------| xvidcore: xvidcore (xvid library) xvidcore: xvidcore: XviD is an ISO MPEG-4 compliant video codec, so designed to xvidcore: compress/decompress digital video. It's a open source project, which xvidcore: is developed and maintained by a handful of skilled and interested xvidcore: engineers from all over the world. xvidcore: xvidcore: xvidcore: xvidcore: Package prepared by Outlaw ( outlaw@irc.pl ) xvidcore: DESC makepkg -l y -c n $CWD/$PKGNAME-$VERSION-$ARCH-$BUILD.tgz rm -rf $TMP/$PKGNAME-$VERSION