aboutsummaryrefslogtreecommitdiffstats
path: root/community/appstream/APKBUILD
blob: d5ee26bf8750d4d8288e145ecbf337b826242c4c (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=appstream
pkgver=0.13.1
pkgrel=1
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"
triggers="$pkgname.trigger=/usr/share/app-info/*"
install="$pkgname.post-install $pkgname.post-upgrade"
subpackages="$pkgname-dev $pkgname-doc $pkgname-qt $pkgname-lang $pkgname-dbg"
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*) ;;
    *)
        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
}

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="9cf469bf604bbdd63815a4b824f13555eb7a9465dbed9f67b41ee1c2704454efa80f7653733dd23d7f7ce759531b826f821b58a606591e57bc86fe03d7a94a9f  AppStream-0.13.1.tar.xz"