#!/bin/bash ## src2pkg script for: festival-suite ## Auto-generated by src2pkg-1.7 ## src2pkg Copyright 2005-2007 Gilbert Ashley SOURCE_NAME='festival-suite-2.0.tar.bz2' NAME='festival-suite' VERSION='2.0' ARCH='i486' BUILD='1' PRE_FIX='usr' # Any extra options go here # EXTRA_CONFIGS='' # STD_FLAGS='-O2 -march=i486 -mtune=i686' # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # do_all_processes can substitute these 16 steps: pre_process find_source # make_dirs # unpack_source # fix_source_perms # configure_source # compile_source # fake_install # cleanup an old directory if [ -d /usr/lib/festival-suite-2.0 ] ; then echo -n $BLUE"Cleaning up old build"$NORMAL rm -rf /usr/lib/festival-suite-2.0 echo $GREEN" Done"$NORMAL fi # unpack the tarball directly where it will be used echo -n $BLUE"Unpacking sources in /usr/lib"$NORMAL cd /usr/lib && tar xf $CWD/festival-suite-2.0.tar.bz2 echo $GREEN" Done"$NORMAL # fix the package perms echo -n $BLUE"Correcting permissions in the sources"$NORMAL cd /usr/lib/festival-suite-2.0 ; find . -type d -exec chmod 755 {} \; find . -perm 666 -perm 664 -perm 600 -exec chmod 644 {} \; find . -perm 444 -perm 440 -perm 400 -exec chmod 644 {} \; find . -perm 555 -perm 511 -exec chmod 755 {} \; find . -perm 777 -perm 775 -perm 754 -perm 711 -exec chmod 755 {} \; find . -perm 2775 -perm 2755 -exec chmod 755 {} \; echo $GREEN" Done"$NORMAL # build the speech_tools first echo $BLUE"Building the speech_tools"$NORMAL cd /usr/lib/festival-suite-2.0/speech_tools ; ./configure make # then build festival echo $BLUE"Building the festival"$NORMAL cd /usr/lib/festival-suite-2.0/festival ; ./configure make # make package directories echo $BLUE"Preparing the festival package content"$NORMAL mkdir -p /usr/lib/festival-suite-2.0/PKG/install mkdir -p /usr/lib/festival-suite-2.0/PKG/usr/bin mkdir -p /usr/lib/festival-suite-2.0/PKG/usr/lib/festival-suite-2.0 # now move the whole thing to package it cd /usr/lib/festival-suite-2.0 ; mv festival /usr/lib/festival-suite-2.0/PKG/usr/lib/festival-suite-2.0 mv speech_tools /usr/lib/festival-suite-2.0/PKG/usr/lib/festival-suite-2.0 # add a wrapper for /usr/bin $BLUE"Creating the festival wrapper for /usr/bin"$NORMAL cp $CWD/festival.wrapper /usr/lib/festival-suite-2.0/PKG/usr/bin/festival chown root:root /usr/lib/festival-suite-2.0/PKG/usr/bin/festival chmod 755 /usr/lib/festival-suite-2.0/PKG/usr/bin/festival # create some docs mkdir -p /usr/lib/festival-suite-2.0/PKG/usr/doc/festival-suite-2.0 cp /usr/lib/festival-suite-2.0/README /usr/lib/festival-suite-2.0/PKG/usr/doc/festival-suite-2.0/ # add the database file cp $CWD/slack-desc /usr/lib/festival-suite-2.0/PKG/install #$BLUE"Correcting permission in the package tree"$NORMAL #PKG_DIR=/usr/lib/festival-suite-2.0/PKG/ #fix_pkg_perms #strip_bins echo -n $BLUE"Creating the compressed package"$NORMAL cd /usr/lib/festival-suite-2.0/PKG makepkg -l n -c y $CWD/festival-suite-2.0-i486-1.tgz echo $GREEN" Done!"$NORMAL echo -n $BLUE"Removing sources"$NORMAL rm -rf /usr/lib/festival-suite-2.0 echo $GREEN" Done!"$NORMAL #fix_pkg_perms #strip_bins #create_docs #compress_man_pages #make_description #make_doinst #make_package #post_process # src2pkg - Copyright 2005-2007 Gilbert Ashley ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # EXTRA_CONFIGS='' PRE_FIX='' DOCLIST='' # MAKE_COMMAND='' INSTALL_LINE='' # SHELL_INSTALL='YES' CORRECT_PERMS='NO'