#!/bin/sh # Copyright (c) 2005 Carlos Corbacho # Distributed under the terms of the GNU General Public License, Version 2 # http://kplayer.sourceforge.net/ # Set initial variables: CWD=`pwd` PKG=/tmp/package-kplayer NAME=kplayer VERSION=0.6.2 ARCH=${ARCH:-i486} BUILD=1gtx if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf $NAME-$VERSION tar xjvf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION if [ ! -r configure ]; then make -f Makefile.dist fi CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/opt/kde \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux 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 "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS BUGS COPYING ChangeLog TODO README \ $PKG/usr/doc/$NAME-$VERSION chmod 644 $PKG/usr/doc/$NAME-$VERSION/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $CWD cp -a *.SlackBuild slack-desc $PKG/usr/doc/$NAME-$VERSION cd $PKG chown -R root:root . requiredbuilder -v -y -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf /tmp/$NAME-$VERSION rm -rf $PKG fi