archrelease: copy trunk to extra-x86_64
[arch-packages.git] / shared-mime-info / trunk / PKGBUILD
blob1ec6030cec1772d39b883951713088088e4a8797
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
7 pkgrel=1
8 pkgdesc="Freedesktop.org Shared MIME Info"
9 arch=('x86_64')
10 license=('GPL2')
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
22         MR_162.patch
23         update-mime-database.hook)
24 sha256sums=('SKIP'
25             'SKIP'
26             'cd69a48c3e074a99e7705db04ce29956b4f6480a9b261369b60052af4edc8796'
27             'f08efbcbac9d2bd18a805b8dcf3ed06d7763b97eca5935aa64d65593774b6501')
28 options=(!makeflags)
30 pkgver() {
31   cd $pkgname
32   git describe --long | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;'
35 prepare() {
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
41   cd $pkgname
42   patch -Np1 -i ../MR_162.patch
45 build() {
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
55   # Print config
56   meson configure build
57   # compile it
58   ninja -C build 
61 check() {
62   meson test -C build --print-errorlogs
65 package() {
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