summaryrefslogtreecommitdiff
path: root/community/obex-capabilities/APKBUILD
blob: 6ebeb53f3f66d6221c1020ccb52e4fdc45678620 (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
# Maintainer: Dylan Van Assche <me@dylanvanassche.be>
# Contributor: Dylan Van Assche <me@dylanvanassche.be>

pkgname=obex-capabilities
pkgver=0.2.1
pkgrel=2
pkgdesc="Script to generate Bluetooth OBEX capabilities XML files at runtime"
url="https://gitlab.com/postmarketOS/obex-capabilities"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-dbus"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-bluez-obexd:_obexd"
source="https://gitlab.com/postmarketos/obex-capabilities/-/archive/$pkgver/obex-capabilities-$pkgver.tar.gz
	org.bluez.obex.service
	"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

_obexd() {
	install_if="$pkgname=$pkgver-r$pkgrel bluez-obexd"
	replaces="bluez-obexd"
	mkdir -p "$subpkgdir"

	# Add script with --capability= argument
	install -Dm644 "$srcdir"/org.bluez.obex.service \
		-t "$subpkgdir"/usr/share/dbus-1/services
}

sha512sums="
a6a63ce4dd3c4d129f1ccdabe3e2eb03b8d9a43f71b8afa29a0f46d6ccbc2685cb33d895ad0146b9c021d8f68730bc21f8b804d89db6660980eae8a7ec3a1ce2  obex-capabilities-0.2.1.tar.gz
6b53966522df8405f4cfb794874dc2f126abded53fddf1fd559126afc039faab9d51421852dba8abf53700fd79388db16897d590151fe6a43f97676f868d08ee  org.bluez.obex.service
"