summaryrefslogtreecommitdiff
path: root/extra/brltty
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/brltty
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/brltty')
-rw-r--r--extra/brltty/PKGBUILD48
-rwxr-xr-xextra/brltty/brltty68
-rw-r--r--extra/brltty/brltty-4.2-S_ISCHR.patch11
-rw-r--r--extra/brltty/brltty.conf2
4 files changed, 129 insertions, 0 deletions
diff --git a/extra/brltty/PKGBUILD b/extra/brltty/PKGBUILD
new file mode 100644
index 000000000..431cf11ec
--- /dev/null
+++ b/extra/brltty/PKGBUILD
@@ -0,0 +1,48 @@
+# $Id: PKGBUILD 102193 2010-12-06 16:20:30Z andrea $
+# Contributor: Jan de Groot <jgc@archlinux.org>
+# Contributor: Giovanni Scafora <giovanni@archlinux.org>
+
+pkgname=brltty
+pkgver=4.2
+pkgrel=3
+pkgdesc="Braille display driver for Linux/Unix"
+arch=('i686' 'x86_64')
+url="http://mielke.cc/brltty"
+license=('GPL' 'LGPL')
+depends=('libxaw' 'at-spi' 'gpm' 'icu' 'python2' 'tcl' 'atk' 'libxtst')
+makedepends=('pyrex' 'bluez')
+optdepends=('bluez: bluetooth support')
+backup=(etc/brltty.conf etc/conf.d/brltty.conf)
+options=('!makeflags' '!emptydirs')
+source=(http://mielke.cc/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz
+ 'brltty-4.2-S_ISCHR.patch'
+ 'brltty'
+ 'brltty.conf')
+md5sums=('192af5e634210616928496645e392097'
+ '5954b289efaf2ff17676d06de9a88854'
+ '831ebaf0c56091702929c68805d20c4f'
+ 'a8ab8b3dd059e96e1734bc9cdcf844fc')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ CFLAGS+="${CFLAGS} -D_GNU_SOURCE" \
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --enable-gpm \
+ --disable-java-bindings \
+ --disable-caml-bindings \
+ PYTHON=/usr/bin/python2
+
+ patch -Np1 -i ${srcdir}/brltty-4.2-S_ISCHR.patch
+ 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/extra/brltty/brltty b/extra/brltty/brltty
new file mode 100755
index 000000000..5ed21a52d
--- /dev/null
+++ b/extra/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/extra/brltty/brltty-4.2-S_ISCHR.patch b/extra/brltty/brltty-4.2-S_ISCHR.patch
new file mode 100644
index 000000000..eddac9616
--- /dev/null
+++ b/extra/brltty/brltty-4.2-S_ISCHR.patch
@@ -0,0 +1,11 @@
+diff -up brltty-4.2/Programs/sys_linux.c.BAD brltty-4.2/Programs/sys_linux.c
+--- brltty-4.2/Programs/sys_linux.c.BAD 2010-05-21 09:04:10.003122084 -0400
++++ brltty-4.2/Programs/sys_linux.c 2010-05-21 09:04:19.376198268 -0400
+@@ -23,6 +23,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <sys/ioctl.h>
++#include <sys/stat.h>
+ #include <linux/kd.h>
+
+ #ifdef HAVE_LINUX_INPUT_H
diff --git a/extra/brltty/brltty.conf b/extra/brltty/brltty.conf
new file mode 100644
index 000000000..94115e1d5
--- /dev/null
+++ b/extra/brltty/brltty.conf
@@ -0,0 +1,2 @@
+# Specify any arguments to pass to brltty here.
+brltty_args="" \ No newline at end of file