aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: 2955fff0b5d3880773029a528c8589291361d874 (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
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.15
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="bab0c73e54d90fbf22295f616d4a09332f94b90a3fa0cb38f1b654c6d9a459c9557dd81c677f486361dbf4f1dd23651306fe34b1cdd15254694269a8c9e8a927  appstream-glib-0.7.15.tar.xz"