#Maintainer: Dimitris Tzemos <djemos(at)slackel.gr>

pkgname=usbmuxd
pkgver=1.0.7
pkgrel=1dj
source=("http://marcansoft.com/uploads/usbmuxd/$pkgname-$pkgver.tar.bz2" "85-usbmuxd.rules")
url="http://marcansoft.com/blog/iphonelinux/usbmuxd/"
docs=("README*" "COPYING*" "AUTHORS")

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"usbmuxd (USB Multiplex Daemon)"
"usbmuxd USB Multiplex Daemon. This bit of software is in charge of"
"talking to your iPhone or iPod Touch over USB and coordinating" 
"access to its services by other applications."
"You must have an usbmux user"
"Something like this should suffice for most systems: "
"useradd -u 233 -g plugdev -d /dev/null -s /bin/false usbmux"
""
"HomePage:http://marcansoft.com/blog/iphonelinux/usbmuxd/"
)

build() {
	# how many build jobs?
	JOBS="-j$(($(getconf _NPROCESSORS_ONLN)*2))"
	NUMJOBS="${NUMJOBS:-"${JOBS}"}"

	cd $SRC/${pkgname}-${pkgver}
   
	mkdir build 
	cd build
	
	cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DLIB_SUFFIX=${LIBDIRSUFFIX} .. 

    make $NUMJOBS || return 1
    make install DESTDIR=$PKG || return 1
	cat $SRC/85-usbmuxd.rules > $PKG/lib/udev/rules.d/85-usbmuxd.rules || return 1

}
