diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/synce-odccm |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/synce-odccm')
-rw-r--r-- | community/synce-odccm/PKGBUILD | 32 | ||||
-rw-r--r-- | community/synce-odccm/dbus-error-fix.patch | 44 | ||||
-rwxr-xr-x | community/synce-odccm/synce-odccm.rc | 37 |
3 files changed, 113 insertions, 0 deletions
diff --git a/community/synce-odccm/PKGBUILD b/community/synce-odccm/PKGBUILD new file mode 100644 index 000000000..ff631dacf --- /dev/null +++ b/community/synce-odccm/PKGBUILD @@ -0,0 +1,32 @@ +# $Id: PKGBUILD 20945 2010-07-12 20:22:41Z spupykin $ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Contributor: SmackleFunky <smacklefunky@optusnet.com.au> + +pkgname=synce-odccm +pkgver=0.13 +pkgrel=4 +pkgdesc="provide a means of communication with a Windows CE device - daemon to communicate with a handheld device" +arch=('i686' 'x86_64') +url="http://synce.sourceforge.net/" +license=('GPL') +depends=('synce-libsynce' 'gnet' 'hal') +backup=(etc/dbus/system.d/odccm.conf) +source=(http://downloads.sourceforge.net/synce/odccm-$pkgver.tar.gz + synce-odccm.rc + dbus-error-fix.patch) +md5sums=('8f12585398f1a79518887d5f94cf122d' + '5759fb86bb2af46d632c3807616c8999' + '4eea398fe356fe0d8c57d65d6f24b3db') + +build() { + cd $srcdir/odccm-$pkgver + + patch -p1 <$srcdir/dbus-error-fix.patch + + ./configure --prefix=/usr + make || return 1 + make DESTDIR=$pkgdir install || return 1 + + install -D -m 644 $srcdir/odccm-$pkgver/src/odccm.conf $pkgdir/etc/dbus-1/system.d/odccm.conf + install -D -m 755 $srcdir/synce-odccm.rc $pkgdir/etc/rc.d/synce-odccm +} diff --git a/community/synce-odccm/dbus-error-fix.patch b/community/synce-odccm/dbus-error-fix.patch new file mode 100644 index 000000000..28af59372 --- /dev/null +++ b/community/synce-odccm/dbus-error-fix.patch @@ -0,0 +1,44 @@ +diff -wbBur odccm-0.13/src/odccm-device-manager.c odccm-0.13.my/src/odccm-device-manager.c +--- odccm-0.13/src/odccm-device-manager.c 2007-11-21 20:00:26.000000000 +0000 ++++ odccm-0.13.my/src/odccm-device-manager.c 2010-07-12 10:49:26.000000000 +0000 +@@ -485,9 +485,9 @@ + int result = 0; + + DBusError error; +- dbus_error_init (&error); + + /* Be sure it is a network interface */ ++ dbus_error_init (&error); + gchar *ifname = libhal_device_get_property_string (ctx, udi, "net.interface", + &error); + if (ifname == NULL) goto DONE; +@@ -495,11 +495,13 @@ + libhal_free_string (ifname); + + /* We'll then check some properties of its parent */ ++ dbus_error_init (&error); + gchar *parentname = libhal_device_get_property_string (ctx, udi, + "info.parent", &error); + if (parentname == NULL) goto DONE; + + /* Check the parent's device driver name (for usb-rndis-lite) */ ++ dbus_error_init (&error); + gchar *drvname = libhal_device_get_property_string (ctx, parentname, + "info.linux.driver", &error); + if (drvname != NULL) +@@ -509,6 +511,7 @@ + } + + /* Check pda.platform property (for usb-rndis-ng) */ ++ dbus_error_init (&error); + gchar *pdaplatform = libhal_device_get_property_string (ctx, parentname, + "pda.platform", &error); + if (pdaplatform != NULL) +@@ -626,6 +628,7 @@ + if (!libhal_ctx_set_dbus_connection (priv->hal_ctx, conn)) + goto OUT; + ++ dbus_error_init (&error); + if (!libhal_ctx_init (priv->hal_ctx, &error)) + { + func_name = "libhal_ctx_init"; diff --git a/community/synce-odccm/synce-odccm.rc b/community/synce-odccm/synce-odccm.rc new file mode 100755 index 000000000..61e71a77d --- /dev/null +++ b/community/synce-odccm/synce-odccm.rc @@ -0,0 +1,37 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +case "$1" in + start) + stat_busy "Starting SynCE odccm daemon" + /usr/sbin/odccm >/dev/null 2>/dev/null + if [ $? -gt 0 ]; then + stat_fail + else + add_daemon synce-odccm + stat_done + fi + ;; + stop) + stat_busy "Stopping SynCE odccm daemon" + PID=`pidof odccm` + if [ -z $PID ]; then + stat_fail + else + kill $PID + rm_daemon synce-odccm + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" + ;; +esac +exit 0 |