aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: 36d6db271355ec50146ccbf58dbeeff4a39cb570 (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
87
88
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=appstream-glib
pkgver=0.8.0
pkgrel=1
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="
	curl-dev
	fontconfig-dev
	freetype-dev
	gdk-pixbuf-dev
	glib-dev
	gobject-introspection-dev
	gperf
	gtk+3.0-dev
	json-glib-dev
	libarchive-dev
	libgcab-dev
	meson
	yaml-dev
	"
subpackages="
	$pkgname-dbg
	$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
	fix-self-test.patch
	$pkgname-fix-proxy.patch::https://github.com/hughsie/appstream-glib/commit/323f4ea96f95d1522b951963a5d91e5320d38274.patch
	"

build() {
	abuild-meson \
		-Ddep11=true \
		-Dbuilder=true \
		-Drpm=false \
		-Dalpm=false \
		-Dfonts=true \
		-Dstemmer=false \
		-Dman=true \
		-Dgtk-doc=false \
		-Dintrospection=true \
		output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	# 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="
13aeb37b8e890691a14d20ed0a86a14ae7125a6e08e60adcefe58ce2f861cebf7f49a01d9d1c137205b923f3162b307fc2671d476b7aaa9eae5fc5234ea4c1da  appstream-glib-0.8.0.tar.xz
d3381faa19a7d4bb4bccdbd036b5c013f3941b1dec496e3d4108a61c27a138c227b880287130134021aaf1d200a6351463f39619aae2f805e923787ca540e1a3  fix-self-test.patch
308f4ccb3daeb1da4cdb4fdb5c6d42c2864b1e4ea9d14132abcb2a9504b1971b10a365d3490b293032caeb4ac0631ad687d26150b19a43706b4f55bf092004db  appstream-glib-fix-proxy.patch
"