[arch-commits] Commit in shared-mime-info/repos (4 files)

Andreas Radke andyrtr at archlinux.org
Fri May 1 18:01:39 UTC 2020


    Date: Friday, May 1, 2020 @ 18:01:38
  Author: andyrtr
Revision: 382100

archrelease: copy trunk to testing-x86_64

Added:
  shared-mime-info/repos/testing-x86_64/
  shared-mime-info/repos/testing-x86_64/PKGBUILD
    (from rev 382099, shared-mime-info/trunk/PKGBUILD)
  shared-mime-info/repos/testing-x86_64/shared-mime-info.install
    (from rev 382099, shared-mime-info/trunk/shared-mime-info.install)
  shared-mime-info/repos/testing-x86_64/update-mime-database.hook
    (from rev 382099, shared-mime-info/trunk/update-mime-database.hook)

---------------------------+
 PKGBUILD                  |   62 ++++++++++++++++++++++++++++++++++++++++++++
 shared-mime-info.install  |    7 ++++
 update-mime-database.hook |   11 +++++++
 3 files changed, 80 insertions(+)

Copied: shared-mime-info/repos/testing-x86_64/PKGBUILD (from rev 382099, shared-mime-info/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2020-05-01 18:01:38 UTC (rev 382100)
@@ -0,0 +1,62 @@
+# Maintainer: AndyRTR <andyrtr at archlinux.org>
+# Maintainer: Jan de Groot <jgc at archlinux.org>
+
+pkgname=shared-mime-info
+_commit=d23e9fa537b84950cdb518f87e3bf1f3f2577523 # master
+pkgver=1.15+43+gd23e9fa
+pkgrel=1
+pkgdesc="Freedesktop.org Shared MIME Info"
+arch=('x86_64')
+license=('GPL2')
+depends=('libxml2' 'glib2')
+#makedepends=('itstool' 'gettext')
+makedepends=('itstool' 'gettext' 'xmlto' 'docbook-xsl' 'git' 'meson')
+install=shared-mime-info.install
+# https://gitlab.freedesktop.org/xdg/shared-mime-info
+url="https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/"
+#source=(https://gitlab.freedesktop.org/xdg/shared-mime-info/uploads/b27eb88e4155d8fccb8bb3cd12025d5b/$pkgname-$pkgver.tar.xz
+source=("git+https://gitlab.freedesktop.org/xdg/shared-mime-info.git#commit=$_commit"
+        # tu run the testsuite
+        "git+https://gitlab.freedesktop.org/xdg/xdgmime.git#commit=6663a2288d11b37bc07f5a01b4b85dcd377787e1" # master 2019-06-03
+        update-mime-database.hook)
+sha256sums=('SKIP'
+            'SKIP'
+            '58ed2c38bf2c78276a309d2e24040ed159868b0f04e72a6b039ea803e45ff6f0')
+options=(!makeflags)
+
+pkgver() {
+  cd $pkgname
+  git describe --long | sed 's/^Release.//;s/\([^-]*-g\)/\1/;s/-/+/g;s/+/./'
+}
+
+prepare() {
+  # build xdgmime from source to run the testsuite - check HACKING.md
+  CFLAGS= make -C xdgmime
+}
+
+build() {
+  # https://bugs.archlinux.org/task/38836
+  # https://bugs.freedesktop.org/show_bug.cgi?id=70366
+  export ac_cv_func_fdatasync=no
+
+  arch-meson ${pkgname} build \
+    -D update-mimedb=false \
+    -D xdgmime-path=./xdgmime
+
+  # Print config
+#  meson configure build
+  # compile it
+  ninja -C build 
+}
+
+check() {
+  # one test failure not finding the file though it's there
+  # /build/shared-mime-info/src/shared-mime-info/tests/test_mime.sh: line 22: ./xdgmime/src/test-mime-data: No such file or directory
+  # https://gitlab.freedesktop.org/xdg/shared-mime-info/-/issues/132
+  meson test -C build --print-errorlogs || /bin/true
+}
+
+package() {
+  DESTDIR="$pkgdir" meson install -C build
+  install -Dm644 "$srcdir"/update-mime-database.hook "$pkgdir"/usr/share/libalpm/hooks/update-mime-database.hook
+}

Copied: shared-mime-info/repos/testing-x86_64/shared-mime-info.install (from rev 382099, shared-mime-info/trunk/shared-mime-info.install)
===================================================================
--- testing-x86_64/shared-mime-info.install	                        (rev 0)
+++ testing-x86_64/shared-mime-info.install	2020-05-01 18:01:38 UTC (rev 382100)
@@ -0,0 +1,7 @@
+post_remove() {
+  if [ -d usr/share/mime ]; then
+    rm -f usr/share/mime/{globs,globs2,icons,treemagic,generic-icons,types,magic,XMLnamespaces,subclasses,aliases,mime.cache}
+    rm -rf usr/share/mime/{application,audio,image,inode,message,model,multipart,text,video,x-content,x-epoc}
+    rmdir --ignore-fail-on-non-empty usr/share/mime
+  fi
+}

Copied: shared-mime-info/repos/testing-x86_64/update-mime-database.hook (from rev 382099, shared-mime-info/trunk/update-mime-database.hook)
===================================================================
--- testing-x86_64/update-mime-database.hook	                        (rev 0)
+++ testing-x86_64/update-mime-database.hook	2020-05-01 18:01:38 UTC (rev 382100)
@@ -0,0 +1,11 @@
+[Trigger]
+Type = Path
+Operation = Install
+Operation = Upgrade
+Operation = Remove
+Target = usr/share/mime/packages/*.xml
+
+[Action]
+Description = Updating the MIME type database...
+When = PostTransaction
+Exec = /usr/bin/update-mime-database /usr/share/mime


More information about the arch-commits mailing list