aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: af48c7e05c967b4185ff535921a15fd919b76e2d (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
87
88
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=appstream-glib
pkgver=0.7.17
pkgrel=2
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
	$pkgname-dbg"
source="https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$pkgver.tar.xz"
options="!check" # selftest fails due to updated metadata at upstream

build() {
	meson \
		--prefix=/usr \
		--buildtype=plain \
		-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"

	amove usr/share/bash-completion/completions
}
sha512sums="72eae6057a4b18b6eca34c795c2bfd982fd7a31500b70beb9553bdf8a7617a03319a2813eb93af20f2e39678ef6ee524dee48b2cbcccde0736f9d10a547ca223  appstream-glib-0.7.17.tar.xz"