wok annotate usbmuxd/receipt @ rev 25047

Up gsoap (2.8.122)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 04 12:13:41 2022 +0000 (2022-06-04)
parents 970c5ec9a60a
children 0262035dc1e7
rev   line source
slaxemulator@10262 1 # SliTaz package receipt.
slaxemulator@10262 2
slaxemulator@10262 3 PACKAGE="usbmuxd"
slaxemulator@11734 4 VERSION="1.0.7"
slaxemulator@10262 5 CATEGORY="misc"
slaxemulator@10262 6 SHORT_DESC="USB Multiplex Daemon"
slaxemulator@10262 7 MAINTAINER="slaxemulator@gmail.com"
pascal@15363 8 LICENSE="GPL2 GPL3 LGPL2.1"
slaxemulator@10262 9 TARBALL="$PACKAGE-$VERSION.tar.bz2"
slaxemulator@10262 10 WEB_SITE="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
slaxemulator@10262 11 WGET_URL="http://marcansoft.com/uploads/$PACKAGE/$TARBALL"
slaxemulator@10262 12
pascal@15363 13 DEPENDS="libusb libplist"
pascal@15363 14 BUILD_DEPENDS="cmake libusb-dev libplist-dev"
pascal@15363 15
pascal@24304 16 # What is the latest version available today?
pascal@24304 17 current_version()
pascal@24304 18 {
pascal@24304 19 wget -O - https://github.com/libimobiledevice/usbmuxd/releases 2>/dev/null | \
pascal@24304 20 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
pascal@24304 21 }
pascal@24304 22
slaxemulator@10262 23 # Rules to configure and make the package.
slaxemulator@10262 24 compile_rules()
slaxemulator@10262 25 {
slaxemulator@10262 26 cd $src
slaxemulator@10262 27 patch -Np1 -i $stuff/usbmuxd-udevuser.patch
slaxemulator@10262 28 sed -i 's|/lib/udev/rules.d/|/etc/udev/rules.d/|g' udev/CMakeLists.txt
slaxemulator@10262 29 mkdir build
slaxemulator@10262 30 cd build
slaxemulator@10262 31 cmake ../ -DCMAKE_INSTALL_PREFIX:PATH=/usr -DLIB_SUFFIX=""
slaxemulator@10262 32 make && make install
slaxemulator@10262 33 }
slaxemulator@10262 34
slaxemulator@10262 35 # Rules to gen a SliTaz package suitable for Tazpkg.
slaxemulator@10262 36 genpkg_rules()
slaxemulator@10262 37 {
slaxemulator@10262 38 mkdir -p $fs/usr/lib $fs/etc
pascal@15363 39 cp -a $install/etc/udev $fs/etc
pascal@15363 40 cp -a $install/usr/bin $fs/usr
pascal@15363 41 cp -a $install/usr/sbin $fs/usr
pascal@15363 42 cp -a $install/usr/lib/*.so* $fs/usr/lib
slaxemulator@10262 43 }
slaxemulator@10262 44
slaxemulator@10262 45 post_install()
slaxemulator@10262 46 {
slaxemulator@10262 47 # adduser usbmuxd if needed
pascal@18730 48 if ! grep -q usbmuxd "$1/etc/passwd"; then
pascal@20319 49 echo
slaxemulator@10262 50 echo -n "Adding user privoxy..."
pascal@18730 51 chroot "$1/" adduser -s /bin/false -H -D -u 140 usbmuxd
slaxemulator@10262 52 status
slaxemulator@10262 53 fi
slaxemulator@10262 54
pascal@18730 55 if ! grep -q usbmuxd "$1/etc/group"; then
pascal@20319 56 echo
slaxemulator@10262 57 echo -n "Adding group privoxy..."
pascal@18730 58 chroot "$1/" addgroup -g 140 usbmuxd
slaxemulator@10262 59 status
slaxemulator@10262 60 fi
slaxemulator@10262 61 }
slaxemulator@10262 62
slaxemulator@10262 63 # Del user usbmuxd when pkg is removed.
slaxemulator@10262 64 post_remove()
slaxemulator@10262 65 {
pascal@18730 66 chroot "$1/" deluser usbmuxd
pascal@18730 67 chroot "$1/" delgroup usbmuxd
slaxemulator@10262 68 }