#!/bin/sh # Heavily based on the Slackware 13.0 SlackBuild # http://festvox.org # Packager Andrea Sciucca Gohanz ( gohanz at infinito.it) # http://www.slacky.it CWD=`pwd` TMP=${TMP:-/usr/share} NAME=speech_tools PKG=/tmp/txz/package/$NAME VERSION=1.2.96-beta ARCH=${ARCH:-i686} BUILD=4as SOURCE=http://festvox.org/packed/festival/latest/$NAME-$VERSION.tar.gz if [ ! -e $NAME-$VERSION.tar.gz ]; then wget -c $SOURCE fi if [ ! -d $TMP ]; then mkdir -p $TMP fi if [ ! -d $PKG ]; then mkdir -p $PKG fi cd $TMP tar xvzf $CWD/$NAME-$VERSION.tar.gz echo -e "\E[0;32m+-------------------------------+\E[0;0m" echo -e "\E[0;32m| Start SlackBuild Speech Tools |\E[0;0m" echo -e "\E[0;32m+-------------------------------+\E[0;0m" cd $NAME # Patch the source to get work with gcc4.3 # Many thanks Gentoo folks! :) patch -p1 < $CWD/speech-tools-1.2.96_beta-gcc43.patch ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ --program-prefix= \ --program-suffix= make mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a \ INSTALL README \ $PKG/usr/doc/$NAME-$VERSION mkdir -p $PKG/usr/bin find $TMP/$NAME/bin/ -perm -755 -exec cp {} $PKG/usr/bin \; mkdir -p $PKG/usr/share/$NAME/config mkdir -p $PKG/usr/share/$NAME/lib/siod mkdir -p $PKG/usr/lib cp -a $TMP/$NAME/lib/lib* $PKG/usr/lib cp -a $TMP/$NAME/lib/lib* $PKG/usr/share/$NAME/lib cp -a $TMP/$NAME/lib/siod/* $PKG/usr/share/$NAME/lib/siod cp -a -r $TMP/$NAME/config/* $PKG/usr/share/$NAME/config cp -a -r $TMP/$NAME/base_class $PKG/usr/share/$NAME cp -a -r $TMP/$NAME/include $PKG/usr/share/$NAME mkdir -p $PKG/usr/share/$NAME/example_data cp -a $TMP/$NAME/lib/example_data/* $PKG/usr/share/$NAME/example_data ( cd $PKG find -iname 'Makefile' -exec rm -f {} \; find -iname 'config.in' -exec rm -f {} \; find -iname '*.c*' -exec rm -f {} \; find -iname '*.o' -exec rm -f {} \; ) ( 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 find . | xargs file | grep "current ar archive" | cut -f 1 -d : | xargs strip -g 2> /dev/null ) 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 chown -R root:root . requiredbuilder -y -v -s $CWD $PKG makepkg -l y -c n $CWD/$NAME-1.2.96_beta-$ARCH-$BUILD.txz