aboutsummaryrefslogtreecommitdiffstats
path: root/main/bluez/APKBUILD
blob: a8aad0848da6a1d977f85e7dcbd0311d04924761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=5.31
pkgrel=0
pkgdesc="Tools for the Bluetooth protocol stack"
url="http://www.bluez.org/"
arch="all"
license="GPL2+"
depends="consolekit dbus"
replaces="udev"
makedepends="dbus-dev libusb-compat-dev udev-dev
	libical-dev readline-dev glib-dev linux-headers
	autoconf automake libtool
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-cups
	$pkgname-hid2hci"
source="http://www.kernel.org/pub/linux/bluetooth/bluez-$pkgver.tar.xz
	bluetooth.initd
	rfcomm.initd
	rfcomm.confd
	"

_builddir="$srcdir"/bluez-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--libexecdir=/usr/lib \
		--mandir=/usr/share/man \
		--disable-systemd \
		--enable-library \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make install DESTDIR="$pkgdir" || return 1
	rm "$pkgdir"/usr/lib/*.la || return 1
	install -Dm755 "$srcdir"/bluetooth.initd "$pkgdir"/etc/init.d/bluetooth
	install -Dm755 "$srcdir"/rfcomm.initd "$pkgdir"/etc/init.d/rfcomm
	install -Dm644 "$srcdir"/rfcomm.confd "$pkgdir"/etc/conf.d/rfcomm
	install -Dm755 test/simple-agent "$pkgdir"/usr/bin/bluez-simple-agent
}

libs() {
	pkgdesc="Libraries for Bluetooth protocol stack"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libbluetooth.so.* "$subpkgdir"/usr/lib/
}

cups() {
	pkgdesc="Bluez backend for CUPS"
	mkdir -p "$subpkgdir"/usr/lib/
	mv "$pkgdir"/usr/lib/cups "$subpkgdir"/usr/lib/
}

hid2hci() {
	pkgdesc="Put HID proxying bluetooth HCI's into HCI mode"
	replaces="bluez"
	mkdir -p "$subpkgdir"
	mv "$pkgdir"/lib "$subpkgdir"/
}

md5sums="cb1db487b65dd4d57a2dd6b8f063c393  bluez-5.31.tar.xz
4ec3395eff42b3481a0a77f36ca57d0b  bluetooth.initd
f90b2cc8fe3f0e4bed64b01c0ba0205d  rfcomm.initd
7f4bb093adb0f519c621f2ea68712f35  rfcomm.confd"
sha256sums="c4b661cc5866d9a9a9d608d700392afa278c3b6fe8426238bf6979be7c63818f  bluez-5.31.tar.xz
04395bdcbf69aafea1d127204677c72a6bf42bde1e8f809d31472ec5fa75057d  bluetooth.initd
9407186d0a647af2228d5603a13cf7aaba5fac842c147aa46334c3d729b552d4  rfcomm.initd
672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08  rfcomm.confd"
sha512sums="d358e08b2dddb3b918c3cd60c510417c7d32ff30e416e15d8fcd7530fe17de1f4b2f3f8e3186f4b7e1a8f493b69706bae5ab74873a655de56726fb0ffd487dc0  bluez-5.31.tar.xz
0a5c652effebe5f2fd968535b2d99e8b9b6983f847fd162f80e5965ade4b7bd12165d27b348506a08503d1bc8c2cf5c8265758ca1e9670dfb5e765edf121fd96  bluetooth.initd
8d7b7c8938a2316ce0a855e9bdf1ef8fcdf33d23f4011df828270a088b88b140a19c432e83fef15355d0829e3c86be05b63e7718fef88563254ea239b8dc12ac  rfcomm.initd
a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb  rfcomm.confd"