# Maintainer: Natanael Copa pkgname=obexd pkgver=0.46 pkgrel=1 pkgdesc="D-Bus service for Obex Server" url="http://www.bluez.org/" arch="all" license="GPL2" depends="!obex-data-server" subpackages="$pkgname-client" makedepends="dbus-glib-dev openobex-dev glib-dev bluez-dev libical-dev" source="http://www.kernel.org/pub/linux/bluetooth/$pkgname-$pkgver.tar.bz2 include-unistd.h.patch" prepare() { local i cd "$_builddir" update_config_sub || return 1 for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done } build() { cd "$srcdir"/$pkgname-$pkgver ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --libexecdir=/usr/lib/obexd \ || return 1 make || return 1 } package() { cd "$srcdir"/$pkgname-$pkgver make DESTDIR="$pkgdir" install } _mv_files() { local i for i in "$@"; do mkdir -p "$subpkgdir"/${i%/*} mv "$pkgdir"/$i "$subpkgdir"/$i || return 1 done } client() { pkgdesc="D-Bus service for Obex Client access" depends= cd "$pkgdir" _mv_files usr/lib/obexd/obex-client \ usr/share/dbus-*/services/obex-client.service } md5sums="625f0417d119437429c9cce29479cfa4 obexd-0.46.tar.bz2 be080a04628bf1c53f86ba205d99161a include-unistd.h.patch"