1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
4 pkgname=shared-mime-info
5 _commit=a2ffb2810ebb387182612e3503dfe29455d4536d # = master 2022-12-15
8 pkgdesc="Freedesktop.org Shared MIME Info"
11 depends=('libxml2' 'glib2')
12 makedepends=('gettext' 'xmlto' 'docbook-xsl' 'git' 'meson')
13 install=shared-mime-info.install
14 # https://gitlab.freedesktop.org/xdg/shared-mime-info
15 url="https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/"
16 source=("git+https://gitlab.freedesktop.org/xdg/shared-mime-info.git#commit=$_commit"
17 # to run the testsuite
18 "git+https://gitlab.freedesktop.org/xdg/xdgmime.git#commit=92f6a09fda2b23c2ab95cede8eb0612ca96bd0f7" # master 2022-01-19
19 update-mime-database.hook)
22 'f08efbcbac9d2bd18a805b8dcf3ed06d7763b97eca5935aa64d65593774b6501')
27 git describe --tags | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;'
31 # build xdgmime from source to run the testsuite - check HACKING.md
32 CFLAGS= make -C xdgmime
36 arch-meson ${pkgname} build \
37 -D update-mimedb=false \
38 -D xdgmime-path=${srcdir}/xdgmime
47 meson test -C build --print-errorlogs
51 DESTDIR="$pkgdir" meson install -C build
52 # use a prefix to run it early enough - other hooks may depend on it - FS#72858
53 install -Dm644 "$srcdir"/update-mime-database.hook "$pkgdir"/usr/share/libalpm/hooks/30-update-mime-database.hook