From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/usbmuxd/PKGBUILD | 28 ++++++++++++++++++++++++++++ extra/usbmuxd/usbmuxd-udevuser.patch | 11 +++++++++++ extra/usbmuxd/usbmuxd.install | 19 +++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 extra/usbmuxd/PKGBUILD create mode 100644 extra/usbmuxd/usbmuxd-udevuser.patch create mode 100644 extra/usbmuxd/usbmuxd.install (limited to 'extra/usbmuxd') diff --git a/extra/usbmuxd/PKGBUILD b/extra/usbmuxd/PKGBUILD new file mode 100644 index 000000000..d579eef00 --- /dev/null +++ b/extra/usbmuxd/PKGBUILD @@ -0,0 +1,28 @@ +# $Id: PKGBUILD 101289 2010-11-28 18:01:54Z ibiru $ +# Maintainer : Ionut Biru +# Contributor: Gabriel Martinez < reitaka at gmail dot com > + +pkgname=usbmuxd +pkgver=1.0.6 +pkgrel=2 +pkgdesc="USB Multiplex Daemon" +url="http://marcansoft.com/blog/iphonelinux/usbmuxd/" +arch=('i686' 'x86_64') +license=('GPL2' 'GPL3' 'LGPL2.1') +depends=('libusb>=1.0.8') +makedepends=('cmake') +install=usbmuxd.install +source=(http://marcansoft.com/uploads/${pkgname}/${pkgname}-${pkgver}.tar.bz2 + usbmuxd-udevuser.patch) +md5sums=('c8909cfd9253d8d1a5e26f2ff7e5908b' + '299349dcacd60af9dceecec1ceebce06') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + patch -Np1 -i "${srcdir}/usbmuxd-udevuser.patch" + mkdir build + cd build + cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX="" + make + make DESTDIR="${pkgdir}" install +} diff --git a/extra/usbmuxd/usbmuxd-udevuser.patch b/extra/usbmuxd/usbmuxd-udevuser.patch new file mode 100644 index 000000000..af091e64d --- /dev/null +++ b/extra/usbmuxd/usbmuxd-udevuser.patch @@ -0,0 +1,11 @@ +--- usbmuxd-1.0.6/udev/85-usbmuxd.rules.in.orig 2010-11-09 04:23:44.873368717 -0800 ++++ usbmuxd-1.0.6/udev/85-usbmuxd.rules.in 2010-11-09 04:24:13.986655838 -0800 +@@ -1,7 +1,7 @@ + # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) + + # Forces iPhone 1.0, 3G, 3GS, iPodTouch 1/2 and iPad to USB configuration 3 and run usbmuxd +-ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U usbmux" ++ACTION=="add", SUBSYSTEM=="usb", OWNER="usbmux", ATTR{idVendor}=="05ac", ATTR{idProduct}=="129[0-9a-f]", ENV{USBMUX_SUPPORTED}="1", ATTR{bConfigurationValue}!="$attr{bNumConfigurations}", ATTR{bConfigurationValue}="$attr{bNumConfigurations}", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -u -U usbmux" + + # Exit usbmuxd when the last device is removed + ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -x" diff --git a/extra/usbmuxd/usbmuxd.install b/extra/usbmuxd/usbmuxd.install new file mode 100644 index 000000000..1a4859674 --- /dev/null +++ b/extra/usbmuxd/usbmuxd.install @@ -0,0 +1,19 @@ +post_install() { + groupadd -g 140 usbmux &>/dev/null + useradd -c 'usbmux user' -u 140 -g usbmux -d / -s /sbin/nologin usbmux &>/dev/null + passwd -l usbmux &>/dev/null +} + +post_upgrade() { + getent group usbmux >/dev/null 2>&1 || groupadd -g 140 usbmux &>/dev/null + getent passwd usbmux >/dev/null 2>&1 || useradd -c 'usbmux user' -u 140 -g usbmux -d / -s /sbin/nologin usbmux &>/dev/null +} + +post_remove() { + if getent passwd usbmux >/dev/null 2>&1; then + userdel usbmux + fi + if getent group usbmux >/dev/null 2>&1; then + groupdel usbmux + fi +} -- cgit v1.2.3-54-g00ecf