aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: f46160006163d3c6bf922d6cdc3eda73e28f3074 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=appstream-glib
pkgver=0.7.16
pkgrel=0
pkgdesc="Library for AppStream metadata"
url="https://people.freedesktop.org/~hughsient/appstream-glib/"
arch="all"
license="LGPL-2.0-or-later"
depends="gsettings-desktop-schemas"
makedepends="
	meson
	glib-dev
	libarchive-dev
	libsoup-dev
	json-glib-dev
	gdk-pixbuf-dev
	gtk+3.0-dev
	freetype-dev
	fontconfig-dev
	yaml-dev
	gperf
	libgcab-dev
	gobject-introspection-dev
	"
subpackages="
	$pkgname-dev
	$pkgname-doc
	$pkgname-lang
	$pkgname-builder
	$pkgname-bash-completion:bashcomp:noarch"
source="https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$pkgver.tar.xz"

build() {
	meson \
		--prefix=/usr \
		-Ddep11=true \
		-Dbuilder=true \
		-Drpm=false \
		-Dalpm=false \
		-Dfonts=true \
		-Dstemmer=false \
		-Dman=true \
		-Dgtk-doc=false \
		-Dintrospection=true \
		output
	ninja -C output
}

check() {
	case "$CARCH" in
		armv7|armhf)
			# Flaky tests, fail or pass on drone ci alternating between pushes
			return 0
			;;
	esac
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	# Remove installed tests
	rm -rf "$pkgdir"/usr/share/installed-tests/appstream-glib
}

builder() {
	pkgdesc="Library and command line tools for building AppStream metadata"
	mkdir -p "$subpkgdir"/usr/bin "$subpkgdir"/usr/lib \
		"$subpkgdir"/usr/share/bash-completion/completions
	mv "$pkgdir"/usr/bin/appstream-builder "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/share/bash-completion/completions/appstream-builder \
		"$subpkgdir"/usr/share/bash-completion/completions/
	mv "$pkgdir"/usr/lib/asb-plugins-5 \
		"$subpkgdir"/usr/lib/
}

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

	install -Dm644 "$pkgdir"/usr/share/bash-completion/completions/* \
			"$subpkgdir"/usr/share/bash-completion/completions
}
sha512sums="a2991dbd26deeb1fb1daef1811c38ff5b55b2fae0bf2d8cc612c2e370613cb6b0468cf287ab3b575f6e6e3203aabcca12dd95474f70a54d6052a34dcb27b951b  appstream-glib-0.7.16.tar.xz"