wok-next rev 10262
Add usbmuxd. Needed for libimobiledevice.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sat May 21 04:40:39 2011 +0000 (2011-05-21) |
parents | ffcce0571b63 |
children | 5e2694ed436c |
files | usbmuxd-dev/receipt usbmuxd/receipt usbmuxd/stuff/usbmuxd-udevuser.patch |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/usbmuxd-dev/receipt Sat May 21 04:40:39 2011 +0000 1.3 @@ -0,0 +1,19 @@ 1.4 +# SliTaz package receipt. 1.5 + 1.6 +PACKAGE="usbmuxd-dev" 1.7 +VERSION="1.0.6" 1.8 +CATEGORY="development" 1.9 +SHORT_DESC="devel files for usbmuxd-dev" 1.10 +MAINTAINER="slaxemulator@gmail.com" 1.11 +DEPENDS="usbmuxd" 1.12 +WEB_SITE="http://marcansoft.com/blog/iphonelinux/usbmuxd/" 1.13 +WANTED="usbmuxd" 1.14 + 1.15 +# Rules to gen a SliTaz package suitable for Tazpkg. 1.16 +genpkg_rules() 1.17 +{ 1.18 + mkdir -p $fs/usr/lib 1.19 + cp -a $_pkg/usr/lib/pkgconfig $fs/usr/lib 1.20 + cp -a $_pkg/usr/include $fs/usr 1.21 +} 1.22 +
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/usbmuxd/receipt Sat May 21 04:40:39 2011 +0000 2.3 @@ -0,0 +1,57 @@ 2.4 +# SliTaz package receipt. 2.5 + 2.6 +PACKAGE="usbmuxd" 2.7 +VERSION="1.0.6" 2.8 +CATEGORY="misc" 2.9 +SHORT_DESC="USB Multiplex Daemon" 2.10 +MAINTAINER="slaxemulator@gmail.com" 2.11 +DEPENDS="libusb libplist" 2.12 +BUILD_DEPENDS="cmake libusb-dev libplist-dev" 2.13 +TARBALL="$PACKAGE-$VERSION.tar.bz2" 2.14 +WEB_SITE="http://marcansoft.com/blog/iphonelinux/usbmuxd/" 2.15 +WGET_URL="http://marcansoft.com/uploads/$PACKAGE/$TARBALL" 2.16 + 2.17 +# Rules to configure and make the package. 2.18 +compile_rules() 2.19 +{ 2.20 + cd $src 2.21 + patch -Np1 -i $stuff/usbmuxd-udevuser.patch 2.22 + sed -i 's|/lib/udev/rules.d/|/etc/udev/rules.d/|g' udev/CMakeLists.txt 2.23 + mkdir build 2.24 + cd build 2.25 + cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX="" 2.26 + make && make install 2.27 +} 2.28 + 2.29 +# Rules to gen a SliTaz package suitable for Tazpkg. 2.30 +genpkg_rules() 2.31 +{ 2.32 + mkdir -p $fs/usr/lib $fs/etc 2.33 + cp -a $_pkg/etc/udev $fs/etc 2.34 + cp -a $_pkg/usr/bin $fs/usr 2.35 + cp -a $_pkg/usr/sbin $fs/usr 2.36 + cp -a $_pkg/usr/lib/*.so* $fs/usr/lib 2.37 +} 2.38 + 2.39 +post_install() 2.40 +{ 2.41 + # adduser usbmuxd if needed 2.42 + if ! grep -q usbmuxd $1/etc/passwd; then 2.43 + echo -n "Adding user privoxy..." 2.44 + chroot $1/ adduser -s /bin/false -H -D -u 140 usbmuxd 2.45 + status 2.46 + fi 2.47 + 2.48 + if ! grep -q usbmuxd $1/etc/group; then 2.49 + echo -n "Adding group privoxy..." 2.50 + chroot $1/ addgroup -g 140 usbmuxd 2.51 + status 2.52 + fi 2.53 +} 2.54 + 2.55 +# Del user usbmuxd when pkg is removed. 2.56 +post_remove() 2.57 +{ 2.58 + chroot $1/ deluser usbmuxd 2.59 + chroot $1/ delgroup usbmuxd 2.60 +}
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 3.2 +++ b/usbmuxd/stuff/usbmuxd-udevuser.patch Sat May 21 04:40:39 2011 +0000 3.3 @@ -0,0 +1,11 @@ 3.4 +--- usbmuxd-1.0.6/udev/85-usbmuxd.rules.in.orig 2010-11-09 04:23:44.873368717 -0800 3.5 ++++ usbmuxd-1.0.6/udev/85-usbmuxd.rules.in 2010-11-09 04:24:13.986655838 -0800 3.6 +@@ -1,7 +1,7 @@ 3.7 + # usbmuxd (iPhone "Apple Mobile Device" MUXer listening on /var/run/usbmuxd) 3.8 + 3.9 + # Forces iPhone 1.0, 3G, 3GS, iPodTouch 1/2 and iPad to USB configuration 3 and run usbmuxd 3.10 +-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" 3.11 ++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" 3.12 + 3.13 + # Exit usbmuxd when the last device is removed 3.14 + ACTION=="remove", SUBSYSTEM=="usb", ENV{PRODUCT}=="5ac/129[0-9a-f]/*", ENV{INTERFACE}=="255/*", RUN+="@CMAKE_INSTALL_PREFIX@/sbin/usbmuxd -x"