wok view usbmuxd/receipt @ rev 19714

fix gnet
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 15 22:43:34 2017 +0100 (2017-02-15)
parents 2a21689b0af7
children 970c5ec9a60a
line source
1 # SliTaz package receipt.
3 PACKAGE="usbmuxd"
4 VERSION="1.0.7"
5 CATEGORY="misc"
6 SHORT_DESC="USB Multiplex Daemon"
7 MAINTAINER="slaxemulator@gmail.com"
8 LICENSE="GPL2 GPL3 LGPL2.1"
9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
10 WEB_SITE="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
11 WGET_URL="http://marcansoft.com/uploads/$PACKAGE/$TARBALL"
13 DEPENDS="libusb libplist"
14 BUILD_DEPENDS="cmake libusb-dev libplist-dev"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 cd $src
20 patch -Np1 -i $stuff/usbmuxd-udevuser.patch
21 sed -i 's|/lib/udev/rules.d/|/etc/udev/rules.d/|g' udev/CMakeLists.txt
22 mkdir build
23 cd build
24 cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX=""
25 make && make install
26 }
28 # Rules to gen a SliTaz package suitable for Tazpkg.
29 genpkg_rules()
30 {
31 mkdir -p $fs/usr/lib $fs/etc
32 cp -a $install/etc/udev $fs/etc
33 cp -a $install/usr/bin $fs/usr
34 cp -a $install/usr/sbin $fs/usr
35 cp -a $install/usr/lib/*.so* $fs/usr/lib
36 }
38 post_install()
39 {
40 # adduser usbmuxd if needed
41 if ! grep -q usbmuxd "$1/etc/passwd"; then
42 echo -n "Adding user privoxy..."
43 chroot "$1/" adduser -s /bin/false -H -D -u 140 usbmuxd
44 status
45 fi
47 if ! grep -q usbmuxd "$1/etc/group"; then
48 echo -n "Adding group privoxy..."
49 chroot "$1/" addgroup -g 140 usbmuxd
50 status
51 fi
52 }
54 # Del user usbmuxd when pkg is removed.
55 post_remove()
56 {
57 chroot "$1/" deluser usbmuxd
58 chroot "$1/" delgroup usbmuxd
59 }