#!/bin/sh # # Slackware build script for kazehakase # BuildRequires: Mozilla, Gnutls # Distribution: Slackware Linux 11.0 # Packager baldelario ~at~ gmail ~dot~ com # http://www.slacky.it # Source location: http://kazehakase.sourceforge.jp/ CWD=`pwd` if ["$TMP" = ""]; then TMP=/tmp fi PKG=$TMP/package-kazehakase NAME=kazehakase VERSION=0.4.7 TARGET=i486 ARCH=${ARCH:-i486} BUILD=1bj # If GCC version is 3.3.x, then use -mcpu; otherwise use -mtune if [ x`gcc --version | grep GCC | awk '{print $3}' | cut -c 1-3` = x3.3 ]; then GCCFLAG=mcpu else GCCFLAG=mtune fi if [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -${GCCFLAG}=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -${GCCFLAG}=i686" elif [ "$ARCH" = "iP4" ]; then SLKCFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer -${GCCFLAG}=i686 " elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2" fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi echo "| Start SlackBuild $NAME-$VERSION |" cd $TMP rm -rf $NAME-$VERSION tar xzvf $CWD/$NAME-$VERSION.tar.gz cd $NAME-$VERSION sed -i "s|Icon=kazehakase-icon.png|Icon=/usr/share/pixmaps/kazehakase-icon.png|g" data/kazehakase.desktop chown -R root:root . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var/lib \ --with-gecko-engine=seamonkey \ --program-prefix="" \ --program-suffix="" \ --build=$TARGET-slackware-linux make make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ ABOUT-NLS AUTHORS COPYING COPYING.README INSTALL README TODO \ $PKG/usr/doc/$NAME-$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 ) mv $PKG/usr/share/man $PKG/usr find $PKG/usr/man -type f -exec gzip -9 {} \; mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/slack-desc > $PKG/usr/doc/$NAME-$VERSION/slack-desc cat $CWD/$NAME.SlackBuild > $PKG/usr/doc/$NAME-$VERSION/$NAME.SlackBuild cd $PKG requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz if [ "$1" = "--cleanup" ]; then rm -rf $TMP/$NAME-$VERSION rm -rf $PKG fi