#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-kdemultimedia # Set the config option variables if they are not already set: if [ -r ../KDE.options ]; then . ../KDE.options fi # The global options may be overridden here (if needed): if [ -r ./local.options ]; then . ./local.options fi if [ -e /var/log/packages/xine*.tgz ]; then cat << EOF You /REALLY/ want to remove xine packages before compiling this. Otherwise when you play an mp3: 1) if artsd is running in a terminal as a normal user, it segfaults 2) if it's been ran by KDE with realtime priority, system hardlock Press CTRL-C to cancel, or enter to continue anyway. EOF read fi rm -rf $PKG mkdir -p $PKG/opt/kde # I hear from Debian that the kernel is actually correct here, and that it's # KDE that has the bug. All I know is that this kludges it, and nothing else # seems to run into this. It's not enough to get me to patch the kernel in # a permanent way, that's for sure. # # If you can figure out who's officially responsible and what the fix really # is, please tell them. If that's me, I'm waiting for the clue-stick. if [ "$ARCH" = "i386" \ -o "$ARCH" = "i486" \ -o "$ARCH" = "i586" \ -o "$ARCH" = "i686" ]; then if ! grep -q "ifndef __STRICT_ANSI__" /usr/include/asm/byteorder.h ; then ( cd /usr/include/asm zcat $CWD/ugly-kernel-patch.diff.gz | patch -p1 --verbose --backup --suffix=.orig ) fi fi # Avoid a version number in .la files: if [ -d /usr/lib64/qt ]; then QTDIR=/usr/lib64/qt fi cd $TMP echo "Building kdemultimedia-$VERSION.tar.bz2..." tar xjvf $CWD/kdemultimedia-$VERSION.tar.bz2 cd $TMP/kdemultimedia-$VERSION LDFLAG=-L/usr/lib64 \ CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=/opt/kde \ --with-xinerama \ --disable-debug \ --program-prefix="" \ --with-vorbis=/usr/lib64 \ --with-cdparanoia=/usr/lib64 \ $TARGET-slackware-linux make $NUMJOBS make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/kdemultimedia-$VERSION cp -a AUTHORS COPYING INSTALL README $PKG/usr/doc/kdemultimedia-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc ( 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 ) if [ -d $PKG/opt/kde/man ]; then gzip -9 $PKG/opt/kde/man/man?/* fi cd $PKG makepkg -l y -c n ../kdemultimedia-$VERSION-$ARCH-$BUILD.tgz