[arch-commits] Commit in shared-mime-info/trunk (3 files)

Allan McRae allan at archlinux.org
Wed Apr 27 11:03:28 UTC 2016


    Date: Wednesday, April 27, 2016 @ 13:03:28
  Author: allan
Revision: 266205

upgpkg: shared-mime-info 1.6-2

add update-mime-database hook

Added:
  shared-mime-info/trunk/update-mime-database.hook
Modified:
  shared-mime-info/trunk/PKGBUILD
  shared-mime-info/trunk/shared-mime-info.install

---------------------------+
 PKGBUILD                  |   10 +++++++---
 shared-mime-info.install  |    8 --------
 update-mime-database.hook |   11 +++++++++++
 3 files changed, 18 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2016-04-27 11:00:58 UTC (rev 266204)
+++ PKGBUILD	2016-04-27 11:03:28 UTC (rev 266205)
@@ -4,7 +4,7 @@
 
 pkgname=shared-mime-info
 pkgver=1.6
-pkgrel=1
+pkgrel=2
 pkgdesc="Freedesktop.org Shared MIME Info"
 arch=('i686' 'x86_64')
 license=('GPL2')
@@ -12,8 +12,10 @@
 makedepends=('intltool' 'pkgconfig')
 install=shared-mime-info.install
 url="http://freedesktop.org/Software/shared-mime-info"
-source=(http://freedesktop.org/~hadess/${pkgname}-${pkgver}.tar.xz)
-md5sums=('10abc5c4e6b22223ff05c3bd70ff9e8f')
+source=(http://freedesktop.org/~hadess/${pkgname}-${pkgver}.tar.xz
+        update-mime-database.hook)
+md5sums=('10abc5c4e6b22223ff05c3bd70ff9e8f'
+         'fc48155d8fb2147b8fc72597e79936b4')
 options=(!makeflags)
 
 build() {
@@ -33,4 +35,6 @@
 package() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   make DESTDIR="${pkgdir}" install
+
+  install -Dm644 "$srcdir"/update-mime-database.hook "$pkgdir"/usr/share/libalpm/hooks/update-mime-database.hook
 }

Modified: shared-mime-info.install
===================================================================
--- shared-mime-info.install	2016-04-27 11:00:58 UTC (rev 266204)
+++ shared-mime-info.install	2016-04-27 11:03:28 UTC (rev 266205)
@@ -1,11 +1,3 @@
-post_install() {
-  update-mime-database usr/share/mime > /dev/null 2>&1
-}
-
-post_upgrade() {
-  post_install
-}
-
 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}

Added: update-mime-database.hook
===================================================================
--- update-mime-database.hook	                        (rev 0)
+++ update-mime-database.hook	2016-04-27 11:03:28 UTC (rev 266205)
@@ -0,0 +1,11 @@
+[Trigger]
+Type = File
+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