aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream/APKBUILD
blob: 87f6f258378aa41f41aa1d651fc12fafdab6a78a (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=appstream
pkgver=0.14.6
pkgrel=0
pkgdesc="Provides a standard for creating app stores across distributions"
url="https://distributions.freedesktop.org/wiki/AppStream"
arch="all"
license="LGPL-2.1-or-later AND GPL-2.0-or-later"
makedepends="meson yaml-dev libxml2-dev glib-dev lmdb-dev gobject-introspection-dev
	gperf qt5-qtbase-dev libsoup-dev curl-dev"
triggers="$pkgname.trigger=/usr/share/app-info/*"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="
	$pkgname-dbg
	$pkgname-dev
	$pkgname-doc
	$pkgname-qt
	$pkgname-lang
	"
source="https://www.freedesktop.org/software/appstream/releases/AppStream-$pkgver.tar.xz"
builddir="$srcdir/AppStream-$pkgver"

# librsvg doesn't exist on these arches
case "$CARCH" in
	s390x|mips*|riscv64) ;;
	*)
		makedepends="$makedepends gdk-pixbuf-dev librsvg-dev pango-dev"
		subpackages="$subpackages $pkgname-compose"
		_conf="-Dcompose=true"
		;;
esac

build() {
	abuild-meson \
		-Dqt=true \
		-Ddocs=false \
		-Dapidocs=false \
		-Dinstall-docs=false \
		-Dstemming=false \
		-Dvapi=false \
		-Dapt-support=false \
		-Dgir=true \
		$_conf \
		. 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, there is no switch to disable installing them
	rm -rf "$pkgdir"/usr/share/installed-tests
}

compose() {
	pkgdesc="Building blocks to compose AppStream metadata"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libappstream-compose* \
		"$pkgdir"/usr/lib/girepository-1.0/AppStreamCompose* \
		"$subpkgdir"/usr/lib
}

qt() {
	pkgdesc="Qt5 interface for AppStream"
	license="LGPL-2.1-or-later"

	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libAppStreamQt.so.* "$subpkgdir"/usr/lib
}

sha512sums="
810aa7427df50793f4bed27cc3cb5b72c156f0c582f241e06131aa8eabe82d59c8ac0bcc37a22877f7a19ac4640a9a831f8b567ce3e2d26a41ce999515affdb0  AppStream-0.14.6.tar.xz
"