summaryrefslogtreecommitdiffstats
path: root/main/bluez/APKBUILD
blob: b594ddf039253b4c8a8b002e74598dc1646c1ee5 (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
87
88
89
90
91
92
93
94
95
96
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=bluez
pkgver=5.14
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"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-cups
	$pkgname-hid2hci"
source="http://www.kernel.org/pub/linux/bluetooth/bluez-$pkgver.tar.xz
	0001-bnep-avoid-use-of-caddr_t.patch
	0002-various-header-include-fixes-for-building-with-musl-.patch
	0003-unit-prevent-use-of-glibc-s-error-3.patch
	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="81f2ce3bc9a9ebe58ccfce6660031611  bluez-5.14.tar.xz
fb06db3798d26e6c443569415935f2d9  0001-bnep-avoid-use-of-caddr_t.patch
f82f9f649cba62fef728fec5be24d8f7  0002-various-header-include-fixes-for-building-with-musl-.patch
4420901a298a935b1619bf2d0cd834b9  0003-unit-prevent-use-of-glibc-s-error-3.patch
7a5611fa2cf42da2e844f96b2efa9f3b  bluetooth.initd
7672edb8e33c4495ee9febb9864feb10  rfcomm.initd
7f4bb093adb0f519c621f2ea68712f35  rfcomm.confd"
sha256sums="5a485837c215f3093d3a98cb412dc99e1139f88a66c8809bdf183ad5e676395f  bluez-5.14.tar.xz
b923cd59e639bac2b59ea40b29c95aaa4b5d741317fc76b25b37ead614fe65cd  0001-bnep-avoid-use-of-caddr_t.patch
bbec3ba7559d8382f64aaae77c26fdca9c702d4a6a6d79d2420c9c76efd7fa3f  0002-various-header-include-fixes-for-building-with-musl-.patch
1f249b7f62215dee882bc0e1a8d9e9dfe743df348c32d0bb05b4e47bad48ab79  0003-unit-prevent-use-of-glibc-s-error-3.patch
d4aef203e184bef4284b3719268c91e07a1e3f84cbdea2ac8ab40a2617ac9186  bluetooth.initd
4430703a9bec9a9482416b2d24aa47492264768a0b61356b361bbc8b1229a83e  rfcomm.initd
672498957049fd301f9c9c1dc9fa49430e5e6d3c3f1f3cdce80df3af7d425d08  rfcomm.confd"
sha512sums="41ff320157b034f1b075266d8a6e0ffc9a2eccb2a4ae90abaec0970abd144a3e536292e826bd47f82e7fd52c1d370d45fba537f54e5cb8d6e9e306ab30f4af0f  bluez-5.14.tar.xz
a2f6e21fb0285b4438a146260c1b0953b6623d0ab4040765f2e2d342934390180e4ce2ae0c55a994052bf2c489152d259691a2053a8cbbfe6d66e8af5849592b  0001-bnep-avoid-use-of-caddr_t.patch
c5916edb49970faa06233b663f76cfce66ce0b65498c9a3200a399e2a26d3fe89efdd3da69a50e9d94d971ecf4b8868048a7fb8af40ec64d51231eca4018a7cf  0002-various-header-include-fixes-for-building-with-musl-.patch
d70ebb4ff90a39d91d2ddc04f94c96a50c202c8a4c1c7bc6e84c5c507c580b6973a31337a81ad149068d58017135ed906106cc5fafff0edc883c565f0afc61d8  0003-unit-prevent-use-of-glibc-s-error-3.patch
2c13cde6561c5aa8b2f27306851458966c67853f6ac2358d09019fda14d3d8e3ff6d9f1c90512c67063d1e1954ec05bf117c5fafc7716446cc5786e9cc12c49f  bluetooth.initd
8f14b4e05c9ecaf4586ed2fdc2d2519de6b613de62ae5c95508baa682630f3112c5b6db6850f76679afc49e06f2ad035d148fa30b9b980747b6fb423f7bebe88  rfcomm.initd
a70aa0dbbabe7e29ee81540a6f98bf191a850da55a28f678975635caf34b363cf4d461a801b3484120ee28fdd21240bd456a4f5d706262700924bd2e9a0972fb  rfcomm.confd"