aboutsummaryrefslogblamecommitdiffstats
path: root/community/appstream-glib/APKBUILD
blob: 592c0bef9aa0a8f6fd00df01d7ae3f466ad42a27 (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.18
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
	$pkgname-dbg"
source="https://people.freedesktop.org/~hughsient/appstream-glib/releases/appstream-glib-$pkgver.tar.xz"
options="!check" # selftest fails due to updated metadata at upstream

build() {
	abuild-meson \
		-Ddep11=true \
		-Dbuilder=true \
		-Drpm=false \
		-Dalpm=false \
		-Dfonts=true \
		-Dstemmer=false \
		-Dman=true \
		-Dgtk-doc=false \
		-Dintrospection=true \
		output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

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

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

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

	amove usr/share/bash-completion/completions
}
sha512sums="2a202eb25d823d524128a8ab164025b6579e069f8b62373cf5447d049a0e3764fca5bf1464296101a45870d1426b094493fc8ead07a6a4bcb514c0f1a91e8ff2  appstream-glib-0.7.18.tar.xz"