aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-11-04 08:13:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-11-04 08:13:14 +0000
commita1e3eac7cbfa5be22b600675f74830057bad2027 (patch)
tree45d72547e3a6deaa1da3b50a7e9f4d6e7a28b676
parent0a778014d9aa7a63b835d5f3c21e4f26234cb3d5 (diff)
downloadaports-a1e3eac7cbfa5be22b600675f74830057bad2027.tar.bz2
aports-a1e3eac7cbfa5be22b600675f74830057bad2027.tar.xz
x11/shared-mime-info: new aport
Freedesktop.org Shared MIME Info http://freedesktop.org/Software/shared-mime-info
-rw-r--r--x11/shared-mime-info/APKBUILD26
-rw-r--r--x11/shared-mime-info/shared-mime-info.post-deinstall14
-rw-r--r--x11/shared-mime-info/shared-mime-info.trigger7
3 files changed, 47 insertions, 0 deletions
diff --git a/x11/shared-mime-info/APKBUILD b/x11/shared-mime-info/APKBUILD
new file mode 100644
index 0000000000..551093e2e3
--- /dev/null
+++ b/x11/shared-mime-info/APKBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=shared-mime-info
+pkgver=0.70
+pkgrel=0
+pkgdesc="Freedesktop.org Shared MIME Info"
+url="http://freedesktop.org/Software/shared-mime-info"
+license="GPL"
+makedepends="libxml2-dev glib-dev intltool"
+depends=
+install="$pkgname.post-deinstall"
+triggers="$pkgname.trigger:/usr/share/mime"
+subpackages="$pkgname-doc"
+source="http://freedesktop.org/~hadess/$pkgname-$pkgver.tar.bz2"
+
+build() {
+ cd "$srcdir"/$pkgname-$pkgver
+ ./configure --prefix=/usr \
+ --disable-update-mimedb || return 1
+ make
+}
+
+package() {
+ cd "$srcdir"/$pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+md5sums="9032d98f14b8e13e0fea4bf45ca23401 shared-mime-info-0.70.tar.bz2"
diff --git a/x11/shared-mime-info/shared-mime-info.post-deinstall b/x11/shared-mime-info/shared-mime-info.post-deinstall
new file mode 100644
index 0000000000..afb88818c7
--- /dev/null
+++ b/x11/shared-mime-info/shared-mime-info.post-deinstall
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+[ -d usr/share/mime ] || exit 0
+
+cd /usr/share/mime
+rm -rf globs globs2 icons treemagic generic-icons types magic XMLnamespaces \
+ subclasses aliases mime.cache \
+ application audio image inode message model multipart text video \
+ x-content x-epoc
+rmdir packages
+cd /
+rmdir usr/share/mime 2>/dev/null
+
+exit 0
diff --git a/x11/shared-mime-info/shared-mime-info.trigger b/x11/shared-mime-info/shared-mime-info.trigger
new file mode 100644
index 0000000000..51a3e4953e
--- /dev/null
+++ b/x11/shared-mime-info/shared-mime-info.trigger
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+for i in "$@"; do
+ if [ -d "$i" ]; then
+ update-mime-database "$i" > /dev/null 2>&1
+ fi
+done