# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=shared-mime-info
pkgver=1.12
pkgrel=0
pkgdesc="MIME database for desktop software"
url="https://freedesktop.org/wiki/Software/shared-mime-info"
arch="all"
license="GPL-2.0+"
depends=""
makedepends="glib-dev intltool libxml2-dev libxml2-utils"
subpackages="$pkgname-doc $pkgname-lang"
install="$pkgname.post-deinstall"
triggers="$pkgname.trigger=/usr/share/mime"
source="https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/80c7f1afbcad2769f38aeb9ba6317a51/$pkgname-$pkgver.tar.xz"

build() {
	ac_cv_func_fdatasync=no ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--enable-default-make-check \
		--disable-update-mimedb
	make -j1
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

sha512sums="c9db138586fe4c789b5a89d3cdcf865d5b3258241accd254deecd7665e8b51fc538adeaeeda4fe332474f7d7ffa84f101cba26539a58e134201673d6d1495a2f  shared-mime-info-1.12.tar.xz"