#!/bin/sh # Set initial variables: VERSION=4.2.6 ARCH=${ARCH:-x86_64} BUILD=1 CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi PKG=$TMP/package-zsh rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf zsh-$VERSION tar xjvf $CWD/zsh-$VERSION.tar.bz2 tar xjvf $CWD/zsh-$VERSION-doc.tar.bz2 cd zsh-$VERSION chown -R root:root . CFLAGS="-O2" \ ./configure \ --prefix=/usr \ --libdir=/usr/lib64 \ $ARCH-slackware-linux make -j4 make install DESTDIR=$PKG mv $PKG/usr/bin $PKG ( cd $PKG/bin ; ln -sf zsh zsh-$VERSION ) ( 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/etc ( cd $PKG/etc ; ln -sf profile zprofile ) gzip -9 $PKG/usr/man/man?/*.? mkdir $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh mkdir -p $PKG/usr/doc/zsh-$VERSION/html-docs cp -a INSTALL LICENCE META-FAQ README $PKG/usr/doc/zsh-$VERSION cp -a Doc/*.html $PKG/usr/doc/zsh-$VERSION/html-docs mkdir -p $PKG/usr/info cp -a Doc/*info* $PKG/usr/info gzip -9 $PKG/usr/info/* mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/zsh-$VERSION-$ARCH-$BUILD.tgz