#!/bin/sh # Ported from tix.build # Build/install Tix the way Slackware's binary package is made: # Set initial variables: CWD=`pwd` PKG=/tmp/package-tix VERSION=8.1.4 ARCH=${ARCH:-x86_64} BUILD=${BUILD:-1} if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64" LIBSUFFIX=64 fi rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf tix-$VERSION tar xzvf $CWD/tix-$VERSION.tar.gz cd tix-$VERSION ( cd unix LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr --enable-shared \ --with-tclconfig=/usr/lib$LIBSUFFIX \ --with-tkconfig=/usr/lib$LIBSUFFIX \ --with-tclinclude=/usr/include \ --with-tkinclude=/usr/include cd tk8.4 #./configure --prefix=/usr \ # --with-tcl=../../../tcl8.4.11 \ # --with-tk=../../../tk8.4.11 #make install #make clean LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr --enable-shared \ --with-tclconfig=/usr/lib$LIBSUFFIX \ --with-tkconfig=/usr/lib$LIBSUFFIX \ --with-tclinclude=/usr/include \ --with-tkinclude=/usr/include mkdir -p $PKG/usr/bin mkdir -p $PKG/usr/lib$LIBSUFFIX mkdir -p $PKG/usr/man make install prefix=$PKG/usr libdir=$PKG/usr/lib$LIBSUFFIX LIB_DIR=$PKG/usr/lib$LIBSUFFIX cd .. make install prefix=$PKG/usr libdir=$PKG/usr/lib$LIBSUFFIX LIB_DIR=$PKG/usr/lib$LIBSUFFIX if [ $LIBSUFFIX = 64 ]; then rm -rf $PKG/usr/lib # Shouldn't be here at all fi ) chown -R root.root $PKG/usr/bin ( 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 ) mkdir -p $PKG/usr/doc/tix-$VERSION cp -a \ ABOUT.* README.* Roadmap.html TODO.html Version license.terms \ docs/BinInst.* docs/et.* docs/FAQ.* docs/Files.* docs/Install.* \ docs/Release* docs/Uni* docs/html \ $PKG/usr/doc/tix-$VERSION chmod 644 $PKG/usr/doc/tix-$VERSION/* gzip -9 $PKG/usr/man/man?/* mv $PKG/usr/man/mann/tixwish.1.gz $PKG/usr/man/man1 # Gets installed to the wrong man directory for some reason... chmod 755 $PKG/usr/lib64/*.{la,so} mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../tix-$VERSION-$ARCH-$BUILD.tgz # Clean up the extra stuff: if [ "$1" = "--cleanup" ]; then rm -rf /tmp/tix-$VERSION rm -rf $PKG fi