#!/bin/sh # # $Id: smb4k.SlackBuild 177 2006-11-21 11:24:36 PM EST JohnB316 $ # CWD=`pwd` if [ "$TMP" = "" ]; then TMP=/tmp fi NAME=smb4k PKG=$TMP/package-$NAME # # These variables should be changed for the packager and the arguments # to be passed to the ./configure script. They will also be appended # to the end of the slack-desc file. # VL_PACKAGER=JohnB316 VERSION=0.7.4 ARCH=i586 BUILD=4vl58 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xjvf $CWD/$NAME-$VERSION.tar.bz2 cd $NAME-$VERSION chown -R root.root . export CFLAGS="-O2 -march=i586 -mtune=i686" export CXXFLAGS=$CFLAGS ./configure --prefix=/opt/kde \ --program-prefix="" \ --program-suffix="" \ --disable-debug \ i486-slackware-linux make make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ AUTHORS BUGS COPYING ChangeLog FAQ INSTALL README TODO \ $PKG/usr/doc/$NAME-$VERSION chmod 644 $PKG/usr/doc/$NAME-$VERSION/* if [ -d $PKG/usr/man ]; then gzip -9 $PKG/usr/man/*/* fi mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc # # append build information to the end of the slack-desc file # cat >> $PKG/install/slack-desc << EOF #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: `awk "/\.\/configure\ /" $TMP/$NAME-$VERSION/config.log` EOF 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 echo "Generating slapt-get dependencies..." requiredbuilder -v -y $PKG echo "Making package: $NAME-$VERSION..." makepkg -l y -c n $TMP/$NAME-$VERSION-$ARCH-$BUILD.tlz