#!/bin/sh VERSION=0.95.0 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-2} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" fi CWD=`pwd` PKG=/tmp/package-lesstif rm -rf $PKG cd /tmp rm -rf lesstif-$VERSION tar xjvf $CWD/lesstif-$VERSION.tar.bz2 cd lesstif-$VERSION chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; CFLAGS="$SLKCFLAGS" \ ./configure \ --enable-shared \ --enable-static \ --enable-build-21 \ --enable-build-Xlt \ --enable-build-Xbae \ --enable-xbae-24bit \ --enable-xbae-row-heights \ --disable-debug \ --prefix=/usr/X11R6 \ --libdir=/usr/lib64 \ $ARCH-slackware-linux make # I'm taking these out to see if anyone cares # --enable-build-12 # --enable-build-20 # This seems to break the compile now. # --enable-production make install DESTDIR=$PKG mv $PKG/usr/X11R6/lib/lib* $PKG/usr/lib64 ( cd $PKG/usr/doc ; rm -rf lesstif-$VERSION ; ln -sf /usr/X11R6/LessTif lesstif-$VERSION ) mkdir -p $PKG/usr/X11R6/lib/X11/config mv $PKG/usr/lib64/LessTif $PKG/usr/X11R6/lib/ cp -a $PKG/usr/X11R6/lib/LessTif/config/* $PKG/usr/X11R6/lib/X11/config ( cd $PKG/usr/X11R6/lib/X11/config ; mv host.def host.def-lesstif ) ( cd $PKG/usr/X11R6/lib/X11 ; cp -a mwm /etc/X11 ; rm -rf mwm ; ln -sf ../../../../etc/X11/mwm . ) # Look out for this one, too: mkdir $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG gzip -9 usr/X11R6/man/*/* makepkg -l y -c n ../lesstif-$VERSION-$ARCH-$BUILD.tgz