#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-koffice # 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 /opt/kde/lib${LIBDIRSUFFIX}/qt3 ]; then QTDIR=/opt/kde/lib${LIBDIRSUFFIX}/qt3 fi cd $TMP echo "Building koffice-$VERSION.tar.bz2..." rm -rf koffice-$VERSION tar xjvf $CWD/koffice-$VERSION.tar.bz2 || exit 1 cd koffice-$VERSION || exit 1 if [ -r $CWD/apply-patches.sh ]; then . $CWD/apply-patches.sh fi chown -R root:root . find . -perm 664 -exec chmod 644 {} \; CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=/opt/kde \ --sysconfdir=/etc/opt/kde \ --with-xinerama \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$TARGET-slackware-linux make $NUMJOBS || exit 1 make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/koffice-$VERSION cp -a \ AUTHORS COPYING COPYING.LIB INSTALL README koffice.lsm \ $PKG/usr/doc/koffice-$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 ../koffice-$VERSION-$ARCH-$BUILD.txz