#!/bin/sh CWD=`pwd` PKG=/tmp/package-x3270 TARBVER=332p1 VERSION=3.3.2p1 ARCH=${ARCH:-x86_64} BUILD=1 rm -rf $PKG mkdir -p $PKG cd /tmp rm -rf x3270-$VERSION tar xjvf $CWD/x3270-$TARBVER.tar.bz2 cd x3270-3.3 chown -R root:root . find . -perm 777 -exec chmod 755 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; ./configure \ --prefix=/usr/X11R6 make make install DESTDIR=$PKG find $PKG -name fonts.dir -exec rm {} \; mkdir -p $PKG/etc/X11/app-defaults cat X3270.xad > $PKG/etc/X11/app-defaults/X3270 ( 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/X11R6/man/man{1,5} for file in x3270-script.man x3270.man x3270if.man ; do cat $file | gzip -9c > $PKG/usr/X11R6/man/man1/`basename $file .man`.1.gz done cat ibm_hosts.man | gzip -9c > $PKG/usr/X11R6/man/man5/ibm_hosts.5.gz mkdir -p $PKG/usr/doc/x3270-$VERSION cp -a \ README* Examples html \ $PKG/usr/doc/x3270-$VERSION mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n ../x3270-$VERSION-$ARCH-$BUILD.tgz