1 # Maintainer: AndyRTR <andyrtr@archlinux.org>
2 # Maintainer: Jan de Groot <jgc@archlinux.org>
4 pkgname=shared-mime-info
5 _commit=d74a913cdf2ee17c469c470012e47cf6f48afcbe # master 2021-10-11
6 pkgver=2.0+115+gd74a913
8 pkgdesc="Freedesktop.org Shared MIME Info"
11 depends=('libxml2' 'glib2')
12 #makedepends=('itstool' 'gettext')
13 #makedepends=('itstool' 'gettext' 'xmlto' 'docbook-xsl' 'git' 'meson')
14 makedepends=('gettext' 'xmlto' 'docbook-xsl' 'git' 'meson')
15 install=shared-mime-info.install
16 # https://gitlab.freedesktop.org/xdg/shared-mime-info
17 url="https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/"
18 #source=(https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/b27eb88e4155d8fccb8bb3cd12025d5b/$pkgname-$pkgver.tar.xz
19 source=("git+https://gitlab.freedesktop.org/xdg/shared-mime-info.git#commit=$_commit"
20 # tu run the testsuite
21 "git+https://gitlab.freedesktop.org/xdg/xdgmime.git#commit=de283fc430460b9b3a7e61432a6d273cd64cb102" # master 2020-12-30
23 update-mime-database.hook)
26 'cd69a48c3e074a99e7705db04ce29956b4f6480a9b261369b60052af4edc8796'
27 'f08efbcbac9d2bd18a805b8dcf3ed06d7763b97eca5935aa64d65593774b6501')
32 git describe --long | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;'
36 # build xdgmime from source to run the testsuite - check HACKING.md
37 CFLAGS= make -C xdgmime
39 # fix a build failure with meson 0.60.x and later
40 # https://gitlab.freedesktop.org/xdg/shared-mime-info/-/merge_requests/162
42 patch -Np1 -i ../MR_162.patch
46 # https://bugs.archlinux.org/task/38836
47 # https://bugs.freedesktop.org/show_bug.cgi?id=70366
48 # https://bugs.archlinux.org/task/66687
49 #export ac_cv_func_fdatasync=no -> for now moved into aplm hook
51 arch-meson ${pkgname} build \
52 -D update-mimedb=false \
53 -D xdgmime-path=${srcdir}/xdgmime
62 meson test -C build --print-errorlogs
66 DESTDIR="$pkgdir" meson install -C build
67 # use a prefix to run it early enough - other hooks may depend on it - FS#72858
68 install -Dm644 "$srcdir"/update-mime-database.hook "$pkgdir"/usr/share/libalpm/hooks/30-update-mime-database.hook