aboutsummaryrefslogblamecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: 2955fff0b5d3880773029a528c8589291361d874 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                             

                                                   

             
                                        
                                                               
          
                           
                                   














                                 





                                                 
                                                                                                        
 
         
               
                               













                                      





                                                                                          
                            


           


                                                 
                                                                 




                                                                                

                                                                    
                                                                              
                                                                   
                                            
                                     

 







                                                                          
                                                                                                                                                                           
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=appstream-glib
pkgver=0.7.15
pkgrel=0
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="
	meson
	glib-dev
	libarchive-dev
	libsoup-dev
	json-glib-dev
	gdk-pixbuf-dev
	gtk+3.0-dev
	freetype-dev
	fontconfig-dev
	yaml-dev
	gperf
	libgcab-dev
	gobject-introspection-dev
	"
subpackages="
	$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"

build() {
	meson \
		--prefix=/usr \
		-Ddep11=true \
		-Dbuilder=true \
		-Drpm=false \
		-Dalpm=false \
		-Dfonts=true \
		-Dstemmer=false \
		-Dman=true \
		-Dgtk-doc=false \
		-Dintrospection=true \
		output
	ninja -C output
}

check() {
	case "$CARCH" in
		armv7|armhf)
			# Flaky tests, fail or pass on drone ci alternating between pushes
			return 0
			;;
	esac
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install

	# 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"

	install -Dm644 "$pkgdir"/usr/share/bash-completion/completions/* \
			"$subpkgdir"/usr/share/bash-completion/completions
}
sha512sums="bab0c73e54d90fbf22295f616d4a09332f94b90a3fa0cb38f1b654c6d9a459c9557dd81c677f486361dbf4f1dd23651306fe34b1cdd15254694269a8c9e8a927  appstream-glib-0.7.15.tar.xz"