#!/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/opt/kde # Avoid a version number in .la files: if [ -d /usr/lib64/qt ]; then QTDIR=/usr/lib64/qt fi cd $TMP echo "Building kdelibs-$VERSION.tar.bz2..." tar xjvf $CWD/kdelibs-$VERSION.tar.bz2 cd kdelibs-$VERSION chown -R root.root . zcat $CWD/kdelibs-openssl64.diff.gz | patch -p1 --verbose LDFLAGS="-L/usr/lib/samba" \ CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=/opt/kde \ --enable-libsuffix=64 \ --with-ssl-dir=/usr \ --with-xinerama \ --disable-debug \ --disable-libfam \ --enable-dnotify \ --program-prefix="" \ --program-suffix="" \ $TARGET-slackware-linux make $NUMJOBS 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 # This has been requested 1,000,000 times, and I'm tending to agree now :) mkdir -p $PKG/install cat << EOF > $PKG/install/doinst.sh #!/bin/sh # Add KDE library directory to /etc/ld.so.conf: if fgrep /opt/kde/lib64 etc/ld.so.conf 1> /dev/null 2> /dev/null ; then true else echo "/opt/kde/lib64" >> etc/ld.so.conf fi EOF 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 ../kdelibs-$VERSION-$ARCH-$BUILD.tgz