summaryrefslogtreecommitdiff
path: root/community/gnokii
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
committerroot <root@rshg054.dnsready.net>2013-08-13 01:33:19 -0700
commit7a65a910b77ad191d69881098c47f9b0c852d92e (patch)
tree9564e611af1442f8952a8cbddb3b0ad25ed71aab /community/gnokii
parent60da6abff6c9577a783d72865f11de7a585e912e (diff)
Tue Aug 13 01:31:08 PDT 2013
Diffstat (limited to 'community/gnokii')
-rw-r--r--community/gnokii/PKGBUILD60
-rw-r--r--community/gnokii/gnokii-config.patch12
-rw-r--r--community/gnokii/gnokii-lock.patch15
-rw-r--r--community/gnokii/gnokii.install3
4 files changed, 90 insertions, 0 deletions
diff --git a/community/gnokii/PKGBUILD b/community/gnokii/PKGBUILD
new file mode 100644
index 000000000..3d6580406
--- /dev/null
+++ b/community/gnokii/PKGBUILD
@@ -0,0 +1,60 @@
+# $Id: PKGBUILD 95469 2013-08-12 20:27:17Z bgyorgy $
+# Maintainer: Balló György <ballogyor+arch at gmail dot com>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Roman Kyrylych <roman@archlinux.org>
+# Contributor: Aurelien Foret <orelien@chez.com>
+
+pkgname=gnokii
+pkgver=0.6.31
+pkgrel=6
+pkgdesc="Tools and user space driver for use with mobile phones"
+arch=('i686' 'x86_64')
+url="http://www.gnokii.org/"
+license=('GPL')
+depends=('libusb-compat' 'libxpm' 'bluez-libs' 'libical' 'sqlite')
+makedepends=('gtk2' 'libmariadbclient' 'postgresql-libs' 'intltool')
+optdepends=('dialog: sendsms tool'
+ 'gtk2: xgnokii GUI'
+ 'libmariadbclient: smsd mysql backend'
+ 'postgresql-libs: smsd postgresql backend')
+backup=('etc/gnokiirc')
+options=('!libtool')
+install=$pkgname.install
+source=("http://www.gnokii.org/download/$pkgname/$pkgname-$pkgver.tar.bz2"
+ 'gnokii-config.patch'
+ 'gnokii-lock.patch')
+md5sums=('d9627f4a1152d3ea7806df4532850d5f'
+ 'b2961b52ac1f770c4704ccc50b64fde2'
+ '17b629db85a6bb2b98ca59941aa95295')
+
+build() {
+ cd $pkgname-$pkgver
+
+ # Set bindir location
+ patch -Np1 -i "$srcdir/gnokii-config.patch"
+
+ # Set lock path
+ patch -Np1 -i "$srcdir/gnokii-lock.patch"
+
+ ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin \
+ --disable-static --enable-security
+ make
+ pushd xgnokii
+ make
+ popd
+}
+
+package() {
+ cd $pkgname-$pkgver
+
+ make DESTDIR="$pkgdir" install
+ pushd xgnokii
+ make DESTDIR="$pkgdir" install
+ popd
+
+ # Install inital config file
+ install -Dm644 Docs/sample/gnokiirc "$pkgdir/etc/gnokiirc"
+
+ # Fix file permission
+ chmod 755 "$pkgdir/usr/bin/sendsms"
+}
diff --git a/community/gnokii/gnokii-config.patch b/community/gnokii/gnokii-config.patch
new file mode 100644
index 000000000..c10d19cec
--- /dev/null
+++ b/community/gnokii/gnokii-config.patch
@@ -0,0 +1,12 @@
+diff -Nura gnokii-0.6.31.orig/Docs/sample/gnokiirc gnokii-0.6.31/Docs/sample/gnokiirc
+--- gnokii-0.6.31.orig/Docs/sample/gnokiirc 2011-12-02 15:53:04.000000000 +0100
++++ gnokii-0.6.31/Docs/sample/gnokiirc 2012-02-18 12:49:26.957557504 +0100
+@@ -238,7 +238,7 @@
+ # In particular ensure that mgnokiidev is in this location, with
+ # permissions 4750, owned by root, group gnokii. Ensure you
+ # are in the gnokii group and that the group exists...
+-bindir = /usr/local/sbin/
++bindir = /usr/bin/
+
+ # Any entries in the following two sections will be set as environment
+ # variables when running the scripts.
diff --git a/community/gnokii/gnokii-lock.patch b/community/gnokii/gnokii-lock.patch
new file mode 100644
index 000000000..61bcfaf40
--- /dev/null
+++ b/community/gnokii/gnokii-lock.patch
@@ -0,0 +1,15 @@
+diff -Naur gnokii-0.6.31.orig/common/misc.c gnokii-0.6.31/common/misc.c
+--- gnokii-0.6.31.orig/common/misc.c 2011-12-02 15:53:04.000000000 +0100
++++ gnokii-0.6.31/common/misc.c 2013-08-12 18:38:41.021668458 +0200
+@@ -448,9 +448,9 @@
+
+ #define BUFFER_MAX_LENGTH 128
+ #if defined (__svr4__)
+-# define lock_path "/var/run/LCK.."
++# define lock_path "/var/run/lockdev/LCK.."
+ #else
+-# define lock_path "/var/lock/LCK.."
++# define lock_path "/var/lock/lockdev/LCK.."
+ #endif
+
+ /* Lock the device. Return allocated string with a lock name */
diff --git a/community/gnokii/gnokii.install b/community/gnokii/gnokii.install
new file mode 100644
index 000000000..e0ddf215d
--- /dev/null
+++ b/community/gnokii/gnokii.install
@@ -0,0 +1,3 @@
+post_install() {
+echo "Users need to be in 'lock' and 'uucp' groups to connect to devices"
+}