Merge branch 'master' into processing

This commit is contained in:
Chrys 2017-07-25 10:30:33 +02:00
commit 6d09973d44
7 changed files with 16 additions and 73 deletions

@ -0,0 +1 @@
Subproject commit fcefe65ecd6812b7a39d8f6a4bf44805c2a9717a

@ -0,0 +1 @@
Subproject commit 0537ad1a8b9f73e6d58775ffc08f7625bc601fa3

View File

@ -1,53 +0,0 @@
# Maintainer: Storm Dragon <stormdragon2976@gmail.com>
# Maintainer: Chrys <mail@chrys.de>
_gitname='fenrir'
pkgname="${_gitname}-git"
pkgver=v0.2.5.g33af5b6
pkgrel=3
pkgdesc='A user space console screen reader written in python3'
arch=('any')
url='https://github.com/chrys87/${_pkgname}'
license=('MIT')
depends=('python' 'python-daemonize' 'python-evdev')
optdepends=('brltty: For Braille support'
'gstreamer: for soundicons via gstreamer'
'sox: The default sound driver'
'python-espeak: TTS support'
'python-pyenchant: for spell check functionality'
'speech-dispatcher: TTS support')
makedepends=('git')
provides=('fenrir')
conflicts=('fenrir')
install="$pkgname".install
source=("git+https://github.com/chrys87/${_gitname}.git"
'fenrir-git.install')
md5sums=('SKIP'
'1387fd3851040d03816e2fb6b8fa631f')
pkgver()
{
cd "$srcdir/$_gitname"
local ver="$(git describe --tags)"
echo "${ver//-/.}"
}
package()
{
cd "$srcdir/$_gitname"
install -m755 -d "$pkgdir/opt/fenrir"
install -m755 -d "$pkgdir/usr/share/fenrir/scripts"
install -m755 -d "$pkgdir/usr/share/fenrir/tools"
install -m644 -D "config/keyboard/desktop.conf" "$pkgdir/etc/fenrir/keyboard/desktop.conf"
install -m644 -D "config/keyboard/laptop.conf" "$pkgdir/etc/fenrir/keyboard/laptop.conf"
install -m644 -D "config/punctuation/default.conf" "$pkgdir/etc/fenrir/punctuation/default.conf"
install -m644 -D "config/settings/settings.conf" "$pkgdir/etc/fenrir/settings/settings.conf"
install -d "$pkgdir/usr/share/sounds/fenrir"
install -m644 -D "autostart/systemd/fenrir.service" "$pkgdir/usr/lib/systemd/system/fenrir.service"
cp -a src/fenrir/* "$pkgdir/opt/fenrir"
cp -a config/scripts/* "$pkgdir/usr/share/fenrir/scripts"
cp -a tools/* "$pkgdir/usr/share/fenrir/tools"
cp -a config/sound/* "$pkgdir/usr/share/sounds/fenrir"
}
# vim: set ts=2 sw=2 et:

View File

@ -1,15 +0,0 @@
post_install() {
ln -s /opt/fenrir/fenrir-daemon /usr/bin/fenrir
_alert
}
_alert() {
cat << EOF
To have fenrir start at boot:
sudo systemctl enable fenrir
Pulseaudio users may want to run
/usr/share/fenrir/tools/configure-pulseaudio
once as their user account and once as root.
EOF
}

1
contrib/rpm/howto.txt Normal file
View File

@ -0,0 +1 @@
https://stackoverflow.com/questions/880227/what-is-the-minimum-i-have-to-do-to-create-an-rpm-file

View File

@ -88,6 +88,7 @@ Evdev is the low level input device framework for Linux.
Dependency's:
* Python-evdev >=0.6.3
* pyudev
* loaded uinput kernel module
* exclusive access to the input devices
Read permission to the following files and services:
@ -109,7 +110,8 @@ Dependency's:
* Python-dbus
Read permission to the following files and services:
* /sys/devices/virtual/tty/tty0/active
* /dev/vcsa[1-64] ([[https://linux.die.net/man/4/vcsa|VCSA manpage]])
* /dev/tty[1 - 64]
* /dev/vcsa[1 - 64] ([[https://linux.die.net/man/4/vcsa|VCSA manpage]])
* read Systemd DBUS
===== Braille Drivers =====

View File

@ -165,7 +165,12 @@ class driver():
self.env['runtime']['debug'].writeDebugOut('VCSA:updateWatchdog:' + str(e),debug.debugLevel.ERROR)
def updateCharMap(self, screen):
tty = open('/dev/tty' + screen, 'rb')
self.charmap = {}
try:
tty = open('/dev/tty' + screen, 'rb')
except Exception as e:
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:' + str(e),debug.debugLevel.ERROR)
return
GIO_UNIMAP = 0x4B66
VT_GETHIFONTMASK = 0x560D
himask = array("H", (0,))
@ -179,9 +184,10 @@ class driver():
unimapdesc = array("B", pack("@HP", sz, unipairs.buffer_info()[0]))
ioctl(tty.fileno(), GIO_UNIMAP, unimapdesc)
break
except IOError as e:
if e.errno != errno.ENOMEM:
raise
except Exception as e:
tty.close()
self.env['runtime']['debug'].writeDebugOut('VCSA:updateCharMap:' + str(e),debug.debugLevel.ERROR)
return
sz *= 2
tty.close()
ncodes, = unpack_from("@H", unimapdesc)