aboutsummaryrefslogtreecommitdiffstats
path: root/main/appstream-glib/APKBUILD
blob: 8ce5ff40d6c07fc1320f7ca5851de2722f236d2d (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=appstream-glib
pkgver=0.5.17
pkgrel=0
pkgdesc="Library for AppStream metadata"
url="http://people.freedesktop.org/~hughsient/appstream-glib/"
arch="all"
license="LGPLv2+"
depends=""
depends_dev="glib-dev gdk-pixbuf-dev"
makedepends="$depends_dev fontconfig-dev freetype-dev pango-dev sqlite-dev
	gobject-introspection-dev gtk-doc yaml-dev libarchive-dev libsoup-dev
	gtk+3.0-dev json-glib-dev libgcab-dev"
install=""
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-builder"
source="http://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$pkgver.tar.xz"

_builddir="$srcdir"/appstream-glib-$pkgver
prepare() {
	local i
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

build() {
	cd "$_builddir"
	DATADIRNAME=share ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-rpm \
		--enable-shared \
		--disable-static \
		--enable-gobject-introspection \
		|| return 1
	make || return 1
}

package() {
	cd "$_builddir"
	make DESTDIR="$pkgdir" install || return 1
}

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 || return 1
	mv "$pkgdir"/usr/bin/appstream-builder "$subpkgdir"/usr/bin/ || return 1
	mv "$pkgdir"/usr/share/bash-completion/completions/appstream-builder \
		"$subpkgdir"/usr/share/bash-completion/completions/ || return 1
	mv "$pkgdir"/usr/lib/asb-plugins-5 \
		"$pkgdir"/usr/lib/libappstream-builder.so.* \
		"$subpkgdir"/usr/lib/ || return 1
}

md5sums="2f4a9d1f2bceb4ca6820e45006b17c2f  appstream-glib-0.5.17.tar.xz"
sha256sums="91c8856813908020d636eed5ce9c42112b9bca99c580d17c59125519e676d0dd  appstream-glib-0.5.17.tar.xz"
sha512sums="e5ff85c7e748dde352773b6fa16112eb8117d175f687c60ecf2d8c51a15cbf351b37503b92ae3546af6548719cec16254eeb52cd90fe920edd61c8fa798f915e  appstream-glib-0.5.17.tar.xz"