# Maintainer: Storm Dragon <storm_dragon@linux-a11y.org>
# Maintainer: Chrys <chrys@linux-a11y.org>
# Adapted to Slint by Didier Spaier <didier~slint~dot~fr>
pkgname='fenrir'
export commit=f5242f7
pkgver=git$commit
pkgrel=1slint
slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (A user space console screen reader written in python3)"
"Developers: Chrys (main coder), Storm Dragon and contributors."
"Home page: https://linux-a11y.org/index.php?page=fenrir-screenreader"
"Git repository:https://github.com/chrys87/fenrir"
)


docs=("CREDITS" "LICENCE" "README.fenrir" "fenrir-user-guide.html" "fenrir-user-guide.pdf")
url="https://linux-a11y.org/index.php?page=fenrir-screenreader"
license=('LGPL')
depends=('python' 'python-pyudev' 'python-daemonize' 'python-evdev' 'python-dbus' 'python-pyte')
optdepends=('brltty: For Braille support'
'gstreamer: for soundicons via gstreamer'
'socat: Control running Fenrir screenreader'
  'sox: The default sound driver'
  'python-espeak: TTS support'
  'python-pyenchant: for spell check functionality'
  'xclip: for copy to X session clipboard'
  'speech-dispatcher: TTS support')
makedepends=('python-setuptools')
install=fenrir.install

source=("fenrir-user-guide.html" "fenrir-user-guide.pdf")

build() {
  git clone https://github.com/chrys87/fenrir.git
  cd fenrir
  git checkout $commit
  patch -p1 --verbose < $startdir/customize_config_for_Slint || exit
  python3 setup.py install --force-settings --root="$PKG" --optimize=1
  mkdir -p $PKG/etc/rc.d $PKG/usr/doc/${pkgname}-${pkgver}
  mkdir -p $PKG/usr/share/fenrirscreenreader/scripts
  cp $startdir/switch-language__-__key_l.sh \
  $PKG/usr/share/fenrirscreenreader/scripts
  chmod -R 755 $PKG/usr/share/fenrirscreenreader/scripts
  cp $startdir/README.fenrir $PKG/usr/doc/${pkgname}-${pkgver}
  cp $startdir/rc.fenrir $PKG/etc/rc.d/
  chmod 644 $PKG/etc/rc.d/rc.fenrir
}

# vim: set ts=2 sw=2 et:
