aboutsummaryrefslogtreecommitdiffstats
path: root/community/libmbim/APKBUILD
blob: 1779affc85f250e92ac91fb51f53d1050c5f3a31 (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
# Contributor: Stuart Cardall <developer@it-offshore.co.uk>
# Maintainer: Stuart Cardall <developer@it-offshore.co.uk>
pkgname=libmbim
pkgver=1.22.0
pkgrel=0
pkgdesc="MBIM modem protocol helper library"
url="https://www.freedesktop.org/wiki/Software/libmbim/"
arch="all"
license="GPL-2.0-or-later AND LGPL-2.1-or-later"
makedepends="$depends_dev gtk-doc python3 glib-dev py3-gobject3 libgudev-dev"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-tools
	$pkgname-bash-completion:bashcomp:noarch
	"
source="https://www.freedesktop.org/software/libmbim/libmbim-$pkgver.tar.xz"

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

bashcomp() {
	depends=""
	pkgdesc="Bash completions for $pkgname"
	install_if="$pkgname-tools=$pkgver-r$pkgrel bash-completion"

	mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
	mv "$pkgdir"/usr/share/bash-completion/completions/* \
		"$subpkgdir"/usr/share/bash-completion/completions/mbimcli
	rmdir -p "$pkgdir"/usr/share/bash-completion/completions 2>/dev/null || true
}

tools() {
	pkgdesc="Tools for libmbim"

	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/libexec
	mv "$pkgdir"/usr/bin/* "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/libexec/* "$subpkgdir"/usr/libexec
	rmdir -p "$pkgdir"/usr/bin "$pkgdir"/usr/libexec 2>/dev/null || true
}

sha512sums="ec7ecf1c65dd7b6017cc3e91eadd6700a954065d070640ab97e583b1791cc315133dd6c882f569fff2efe1f56e3766821533c20d814fe7db75aeb0bbcd7ed3ee  libmbim-1.22.0.tar.xz"