[arch-commits] Commit in brltty/trunk (4 files)

Giovanni Scafora giovanni at archlinux.org
Sat Jul 18 23:26:41 UTC 2009


    Date: Saturday, July 18, 2009 @ 19:26:41
  Author: giovanni
Revision: 46609

upgpkg: brltty 4.0-2
    Added rc.d script and config file

Added:
  brltty/trunk/brltty
  brltty/trunk/brltty-4.0-api-socket-dir.patch
  brltty/trunk/brltty.conf
Modified:
  brltty/trunk/PKGBUILD

---------------------------------+
 PKGBUILD                        |   32 +++++++++++++----
 brltty                          |   68 ++++++++++++++++++++++++++++++++++++++
 brltty-4.0-api-socket-dir.patch |   13 +++++++
 brltty.conf                     |    2 +
 4 files changed, 107 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-07-18 23:17:08 UTC (rev 46608)
+++ PKGBUILD	2009-07-18 23:26:41 UTC (rev 46609)
@@ -4,22 +4,38 @@
 
 pkgname=brltty
 pkgver=4.0
-pkgrel=1
+pkgrel=2
 pkgdesc="Braille display driver for Linux/Unix"
 arch=('i686' 'x86_64')
 url="http://mielke.cc/brltty"
 license=('GPL' 'LGPL')
 depends=('libxaw' 'at-spi>=1.26.0' 'gpm>=1.20.6' 'icu>=4.2' 'python>=2.6.2')
 makedepends=('pyrex')
-options=('!makeflags')
-source=(http://mielke.cc/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz)
-md5sums=('2862727384a1308dbff3031efb85c41e')
+backup=(etc/brltty.conf etc/conf.d/brltty.conf)
+options=('!makeflags' '!emptydirs')
+source=(http://mielke.cc/${pkgname}/releases/${pkgname}-${pkgver}.tar.gz
+        brltty-4.0-api-socket-dir.patch
+        brltty
+        brltty.conf)
+md5sums=('2862727384a1308dbff3031efb85c41e'
+         '865062603a4fcdaa34949d0a9de7d743'
+         '831ebaf0c56091702929c68805d20c4f'
+         'a8ab8b3dd059e96e1734bc9cdcf844fc')
 
 build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
-  CFLAGS+="${CFLAGS} -D_GNU_SOURCE"  ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man \
-   --enable-gpm  --disable-java-bindings|| return 1
+  # Gentoo patch
+  patch -Np1 -i ${srcdir}/brltty-4.0-api-socket-dir.patch || return 1
+  CFLAGS+="${CFLAGS} -D_GNU_SOURCE" \
+  ./configure --prefix=/usr \
+              --sysconfdir=/etc \
+              --mandir=/usr/share/man \
+              --localstatedir=/var \
+              --enable-gpm \
+              --disable-java-bindings
   make || return 1
-  make INSTALL_ROOT="${pkgdir}" install || return 1
+  make INSTALL_ROOT="${pkgdir}" install
+  install -D -m 755 ${srcdir}/brltty ${pkgdir}/etc/rc.d/brltty
+  install -D -m 644 ${srcdir}/brltty.conf ${pkgdir}/etc/conf.d/brltty.conf
+  install -D -m 644 Documents/brltty.conf ${pkgdir}/etc/brltty.conf
 }
-

Added: brltty
===================================================================
--- brltty	                        (rev 0)
+++ brltty	2009-07-18 23:26:41 UTC (rev 46609)
@@ -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


Property changes on: brltty/trunk/brltty
___________________________________________________________________
Added: svn:executable
   + *

Added: brltty-4.0-api-socket-dir.patch
===================================================================
--- brltty-4.0-api-socket-dir.patch	                        (rev 0)
+++ brltty-4.0-api-socket-dir.patch	2009-07-18 23:26:41 UTC (rev 46609)
@@ -0,0 +1,13 @@
+--- a/common.mk	2009-07-19 00:44:37.000000000 -0700
++++ b/common.mk	2009-07-19 00:44:37.000000000 -0700
+@@ -74,8 +74,9 @@
+ install-apihdr-directory:
+ 	$(INSTALL_DIRECTORY) $(INSTALL_APIHDR_DIRECTORY)
+ 
++INSTALL_API_SOCKET_DIRECTORY = $(INSTALL_ROOT)$(API_SOCKET_DIRECTORY)
+ install-apisoc-directory:
+-	-$(INSTALL_DIRECTORY) -m 1777 $(API_SOCKET_DIRECTORY)
++	-$(INSTALL_DIRECTORY) -m 1777 $(INSTALL_API_SOCKET_DIRECTORY)
+ 
+ clean::
+ 	-rm -f *.$O *.auto.h *.auto.c core implib.a

Added: brltty.conf
===================================================================
--- brltty.conf	                        (rev 0)
+++ brltty.conf	2009-07-18 23:26:41 UTC (rev 46609)
@@ -0,0 +1,2 @@
+# Specify any arguments to pass to brltty here.
+brltty_args=""
\ No newline at end of file




More information about the arch-commits mailing list