# Packaged by Didier Spaier <didier~at~slint~dot~fr>

pkgname=$(pwd|sed "s,.*/,,")
pkgver=0.5
pkgrel=6slint
source=("speechd-up-0.5.tar.xz" "speechd-up.conf" "rc.speechd-up" "README.speechd-up" "SpeakupDesktopKeys" "SpeakupLaptopKeys")
docs=("gpl.texi" "fdl.texi" "speechd-up.texi" "README.speechd-up" "SpeakupDesktopKeys" "SpeakupLaptopKeys")
options=("nosrcpack" "noautodotnew")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (interface between Speech Dispatcher and Speakup)"
"SpeechD-Up provides speech on the console, linking the speakup Linux"
"driver and the Speech Dispatcher software. This allows to use on the"
"console the voices associated with the installed synthesizers managed"
"by Speech Dispatcher."
)
dotnew=('/etc/speechd-up.conf')
build() {
  cd $SRC/$pkgname-$pkgver || return 1
#  sed -i s/volume/volume/ options.c > typo
#  mv typo options.c
  #patches from Debain
  while read p; do
   patch -p1 --verbose < $startdir/patches/"$p" || exit 1
  done < $startdir/patches/series
  autoreconf -vif
  ./configure \
  --prefix=/usr \
  --sysconfdir=/etc \
  --build=$ARCH-slackware-linux
  make speechd-up
  mkdir -p $PKG/usr/bin
  mkdir -p $PKG/etc/rc.d
  cp speechd-up $PKG/usr/bin/
  cp $SRC/speechd-up.conf $PKG/etc/
  cp $SRC/rc.speechd-up $PKG/etc/rc.d/
}
