#!/bin/sh # # $Id: scim.SlackBuild 2006-10-14 11:38:00 PM EDT JohnB316 $ # CWD=`pwd` NAME=fcitx TBNAME=scim-fcitx if [ "$TMP" = "" ]; then TMP=/tmp fi 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=3.1.1 ARCH=i586 BUILD=1vl59 if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP tar xjvf $CWD/$TBNAME.$VERSION.tar.bz2 || exit 1 cd $NAME chown -R root.root . if [ ! -r configure ]; then sh autogen.sh fi export CFLAGS="-O2 -march=i586 -mtune=i686" export CXXFLAGS=$CFLAGS ./configure --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var \ --program-prefix="" \ --program-suffix="" \ --with-libiconv-prefix=/usr \ --with-included-gettext \ --build=i486-slackware-linux || exit 1 make || exit 1 make install DESTDIR=$PKG || exit 1 mkdir -p $PKG/usr/doc/$TBNAME-$VERSION cp -a \ AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS \ $PKG/usr/doc/$TBNAME-$VERSION chmod 644 $PKG/usr/doc/$TBNAME-$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/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 for $NAME-$VERSION..." requiredbuilder -v -y $PKG echo "Making package: $TBNAME-$VERSION..." makepkg -l y -c n $TMP/$TBNAME-$VERSION-$ARCH-$BUILD.tlz