diff options
author | root <root@rshg054.dnsready.net> | 2012-03-27 00:01:20 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-27 00:01:20 +0000 |
commit | c8729cab8302ab82e01135a22fb9fa9704f1559b (patch) | |
tree | f272d52815dcaf543aaf60177bdfc7d28e22e201 /staging/brltty | |
parent | cf507a0dbf5ee8258e49256049b420ac8e191387 (diff) |
Tue Mar 27 00:01:20 UTC 2012
Diffstat (limited to 'staging/brltty')
-rw-r--r-- | staging/brltty/PKGBUILD | 47 | ||||
-rwxr-xr-x | staging/brltty/brltty | 68 | ||||
-rw-r--r-- | staging/brltty/brltty.conf | 2 | ||||
-rw-r--r-- | staging/brltty/brltty.install | 20 |
4 files changed, 137 insertions, 0 deletions
diff --git a/staging/brltty/PKGBUILD b/staging/brltty/PKGBUILD new file mode 100644 index 000000000..34a8d63cc --- /dev/null +++ b/staging/brltty/PKGBUILD @@ -0,0 +1,47 @@ +# $Id: PKGBUILD 154313 2012-03-26 03:27:31Z eric $ +# Maintainer: +# Contributor: Jan de Groot <jgc@archlinux.org> +# Contributor: Giovanni Scafora <giovanni@archlinux.org> + +pkgname=brltty +pkgver=4.3 +pkgrel=5 +pkgdesc="Braille display driver for Linux/Unix" +arch=('i686' 'x86_64') +url="http://mielke.cc/brltty" +license=('GPL' 'LGPL') +depends=('libxaw' 'at-spi2-core' 'gpm' 'icu' 'python2' 'tcl' 'atk' 'libxtst' 'pyrex') +makedepends=('bluez') +optdepends=('bluez: bluetooth support') +backup=(etc/brltty.conf etc/conf.d/brltty.conf) +options=('!makeflags' '!emptydirs') +install=brltty.install +source=(http://mielke.cc/$pkgname/releases/$pkgname-$pkgver.tar.gz + 'brltty' + 'brltty.conf') +md5sums=('5ada573f88df32b6150db3b9a620e20b' + '831ebaf0c56091702929c68805d20c4f' + 'a8ab8b3dd059e96e1734bc9cdcf844fc') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --with-screen-driver=a2 \ + --enable-gpm \ + --disable-java-bindings \ + --disable-caml-bindings \ + PYTHON=/usr/bin/python2 + + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir" install + install -D -m755 "$srcdir/brltty" "$pkgdir/etc/rc.d/brltty" + install -D -m644 "$srcdir/brltty.conf" "$pkgdir/etc/conf.d/brltty.conf" + install -D -m644 Documents/brltty.conf "$pkgdir/etc/brltty.conf" +} diff --git a/staging/brltty/brltty b/staging/brltty/brltty new file mode 100755 index 000000000..5ed21a52d --- /dev/null +++ b/staging/brltty/brltty @@ -0,0 +1,68 @@ +#!/bin/bash + +daemon_name=brltty + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/$daemon_name.conf + +get_pid() { + pidof -o %PPID $daemon_name +} + +case "$1" in + start) + stat_busy "Starting $daemon_name daemon" + + PID=$(get_pid) + if [ -z "$PID" ]; then + [ -f /var/run/$daemon_name.pid ] && rm -f /var/run/$daemon_name.pid + # RUN + $daemon_name $brltty_args + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + echo $(get_pid) > /var/run/$daemon_name.pid + add_daemon $daemon_name + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping $daemon_name daemon" + PID=$(get_pid) + # KILL + [ ! -z "$PID" ] && kill $PID &> /dev/null + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/$daemon_name.pid &> /dev/null + rm_daemon $daemon_name + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking $daemon_name status"; + ck_status $daemon_name + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 diff --git a/staging/brltty/brltty.conf b/staging/brltty/brltty.conf new file mode 100644 index 000000000..94115e1d5 --- /dev/null +++ b/staging/brltty/brltty.conf @@ -0,0 +1,2 @@ +# Specify any arguments to pass to brltty here. +brltty_args=""
\ No newline at end of file diff --git a/staging/brltty/brltty.install b/staging/brltty/brltty.install new file mode 100644 index 000000000..952ae58ff --- /dev/null +++ b/staging/brltty/brltty.install @@ -0,0 +1,20 @@ +post_install () { + getent group brlapi &>/dev/null || groupadd -r brlapi + if [ ! -e /etc/brlapi.key ]; then + mcookie >/etc/brlapi.key + chmod 0640 /etc/brlapi.key + chgrp brlapi /etc/brlapi.key + echo "Please add your user to the brlapi group." + fi +} + +post_upgrade () { + post_install +} + +post_remove () { + getent group brlapi >/dev/null 2>&1 && groupdel brlapi + if [ -e /etc/brlapi.key ]; then + rm -f /etc/brlapi.key + fi +} |