aboutsummaryrefslogtreecommitdiffstats
path: root/main/meson/APKBUILD
blob: 0222737195dc573261cbbffea4a7d588a4b394ba (plain) (blame)
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: Leo <thinkabit.ukim@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=meson
pkgver=0.59.2
pkgrel=0
pkgdesc="Fast and user friendly build system"
url="https://mesonbuild.com"
arch="noarch"
license="Apache-2.0"
depends="samurai python3"
makedepends="py3-setuptools"
subpackages="
	$pkgname-doc
	$pkgname-vim::noarch
	$pkgname-bash-completion
	$pkgname-zsh-completion
	"
source="https://github.com/mesonbuild/meson/releases/download/$pkgver/meson-$pkgver.tar.gz
	abuild-meson
	"

build() {
	python3 setup.py build
}

check() {
	python3 setup.py check
}

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

	install -Dm644 data/shell-completions/zsh/* -t "$pkgdir"/usr/share/zsh/site-functions
	install -Dm644 data/shell-completions/bash/* -t "$pkgdir"/usr/share/bash-completion/completions

	install -Dm0755 "$srcdir"/abuild-meson -t "$pkgdir"/usr/bin
}

vim() {
	pkgdesc="$pkgdesc (vim support)"
	install_if="vim $pkgname=$pkgver-r$pkgrel"
	cd "$builddir"
	for kind in ftdetect ftplugin indent syntax
	do
		mkdir -p "$subpkgdir"/usr/share/vim/vimfiles/$kind
		install -Dm644 \
			"$builddir"/data/syntax-highlighting/vim/$kind/meson.vim \
			"$subpkgdir"/usr/share/vim/vimfiles/$kind/meson.vim
	done
}

sha512sums="
910e4a8c9828506b576dc8ae0b5765efec24f44a34a5694f782c8a533d75053b10b4167564c06456d05f7a32c5fd9bd657faa62329e1e4ed24bfc4c9ac1ef73e  meson-0.59.2.tar.gz
1029e7a7af86ff4a5636f8cea4b5dbe970a58741d2f25dad50712664f1e387078e7583fafd4f7d1d420c9e116b0ea72b20cf22532cfece9a7d2d8cf60c9aadab  abuild-meson
"