db-move: moved xdg-desktop-portal-gnome from [testing] to [extra] (x86_64)
[arch-packages.git] / shared-mime-info / repos / extra-x86_64 / PKGBUILD
blob5671968fc52f479d87cd261e0bb858844fd9e345
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
6 pkgver=2.2+13+ga2ffb28
7 pkgrel=1
8 pkgdesc="Freedesktop.org Shared MIME Info"
9 arch=('x86_64')
10 license=('GPL2')
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)
20 sha256sums=('SKIP'
21             'SKIP'
22             'f08efbcbac9d2bd18a805b8dcf3ed06d7763b97eca5935aa64d65593774b6501')
23 options=(!makeflags)
25 pkgver() {
26   cd $pkgname
27   git describe --tags | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;'
30 prepare() {
31   # build xdgmime from source to run the testsuite - check HACKING.md
32   CFLAGS= make -C xdgmime
35 build() {
36   arch-meson ${pkgname} build \
37     -D update-mimedb=false \
38     -D xdgmime-path=${srcdir}/xdgmime
40   # Print config
41   meson configure build
42   # compile it
43   ninja -C build 
46 check() {
47   meson test -C build --print-errorlogs
50 package() {
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