summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 868360ed282711be165f48545911fb321d4c5fdd (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
# Maintainer: Antoine Gaudreau Simard <antoine at gaudreau dot simard>
# Contributor: Michael Limiero <mike5713 at gmail dot com>
pkgname=('simplebluez' 'simpleble' 'simpledbus' 'python-simplepyble')
pkgbase=simpleble
pkgver=0.11.0
pkgrel=1
epoch=
pkgdesc="The all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android"
arch=("x86_64")
url="https://www.simpleble.org/"
license=('GPLv3')
groups=()
depends=()
makedepends=("cmake" "pybind11" "python" "python-pip" "git")
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("https://github.com/simpleble/simpleble/archive/refs/tags/v${pkgver}.tar.gz")
noextract=()
sha256sums=('84431054520a4080d2b667bfea160c91f4a2a6375212431eb93e227821533a39')
validpgpkeys=()

build() {
	cd "simpleble-$pkgver"
	cmake -S simplebluez -B build_simplebluez -DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build_simplebluez -j7
	cmake -S simpleble -B build_simpleble -DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build_simpleble -j7
	cmake -S simpledbus -B build_simpledbus -DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build_simpledbus -j7
	PIP_REQUIRE_VENV=0 pip install --prefix=pkg --ignore-installed .
}

package_simplebluez() {
	depends=('simpledbus')
	cd "simpleble-$pkgver/build_simplebluez"
	make DESTDIR="$pkgdir/" install
	# Remove simpledbus files that are provided by the simpledbus package
	rm -rf "$pkgdir/usr/include/simpledbus"
	rm -f "$pkgdir/usr/lib/libsimpledbus"* "$pkgdir/usr/lib/cmake/simpledbus"* "$pkgdir/usr/lib/pkgconfig/simpledbus.pc"
}

package_simpleble() {
	cd "simpleble-$pkgver/build_simpleble"
	make DESTDIR="$pkgdir/" install
}

package_simpledbus() {
	cd "simpleble-$pkgver/build_simpledbus"
	make DESTDIR="$pkgdir/" install
}

package_python-simplepyble() {
	cd "simpleble-$pkgver/"
	mkdir "$pkgdir/usr"
	cp -a pkg/* "$pkgdir/usr/"
}