# Maintainer: Natanael Copa pkgname=appstream-glib pkgver=0.5.16 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="f02ef07ddd24d2b4e10dcd1d3f892d79 appstream-glib-0.5.16.tar.xz" sha256sums="788de3f6480789ad1adc144b0e16978af5863365b7a1650b4f14d29ad848ec62 appstream-glib-0.5.16.tar.xz" sha512sums="c047d2f6a3cb46ebbcd4dd6165bcbfbaba6d0b20b45d94b933b36cfd62f8821c0e062c4932d0d9d846cdb866bddd611a1055baf21d9438b1fa50b8480ecd7c17 appstream-glib-0.5.16.tar.xz"