[arch-commits] Commit in brltty/trunk (PKGBUILD brltty.install)

Ionut Biru ibiru at archlinux.org
Mon Feb 13 14:57:39 EST 2012


    Date: Monday, February 13, 2012 @ 14:57:38
  Author: ibiru
Revision: 150159

generate /etc/brlapi.key. FS#28401

Added:
  brltty/trunk/brltty.install
Modified:
  brltty/trunk/PKGBUILD

----------------+
 PKGBUILD       |    3 ++-
 brltty.install |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletion(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-02-13 18:05:27 UTC (rev 150158)
+++ PKGBUILD	2012-02-13 19:57:38 UTC (rev 150159)
@@ -5,7 +5,7 @@
 
 pkgname=brltty
 pkgver=4.3
-pkgrel=3
+pkgrel=4
 pkgdesc="Braille display driver for Linux/Unix"
 arch=('i686' 'x86_64')
 url="http://mielke.cc/brltty"
@@ -15,6 +15,7 @@
 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')

Added: brltty.install
===================================================================
--- brltty.install	                        (rev 0)
+++ brltty.install	2012-02-13 19:57:38 UTC (rev 150159)
@@ -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
+}



More information about the arch-commits mailing list