#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-kdelibs # 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 rm -rf $PKG mkdir -p $PKG/usr # Avoid a version number in .la files: if [ -d /usr/lib$LIBSUFFIX/qt ]; then QTDIR=/usr/lib$LIBSUFFIX/qt fi cd $TMP echo "Building kdelibs-$VERSION.tar.bz2..." tar xjvf $CWD/kdelibs-$VERSION.tar.bz2 || exit 1 cd kdelibs-$VERSION || exit 1 chown -R root:root . zcat $CWD/kdelibs-utempter.diff.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 zcat $CWD/post-3.5.7-kdelibs-kdecore.diff.gz | patch -p0 --verbose --backup --suffix=.orig || exit 1 if [ $LIBSUFFIX ]; then sed -i s%/usr/lib/utempter%/usr/lib$LIBSUFFIX/utempter% kdecore/kpty.cpp || exit 1 fi CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=/usr \ --libdir=/usr/lib$LIBSUFFIX \ --sysconfdir=/etc/kde \ --with-ssl-dir=/usr \ --with-xinerama \ --disable-debug \ --enable-dnotify \ --program-prefix="" \ --program-suffix="" \ --build=$TARGET-$DISTRO-linux make $NUMJOBS || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/kdelibs-$VERSION cp -a \ AUTHORS COMPILING COMPILING.html COPYING COPYING.BSD COPYING.LIB DEBUG INSTALL KDE2PORTING.html KDE3PORTING.html NAMING README kdelibs.lsm \ $PKG/usr/doc/kdelibs-$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/usr/man ]; then gzip -9 $PKG/usr/man/man?/* fi cd $PKG makepkg -l y -c n ../kdelibs-$VERSION-$PKGARCH-$BUILD.tgz