summaryrefslogtreecommitdiff
path: root/extra/shared-mime-info
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/shared-mime-info
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/shared-mime-info')
-rw-r--r--extra/shared-mime-info/PKGBUILD30
-rw-r--r--extra/shared-mime-info/pbm.patch49
-rw-r--r--extra/shared-mime-info/shared-mime-info.install15
3 files changed, 94 insertions, 0 deletions
diff --git a/extra/shared-mime-info/PKGBUILD b/extra/shared-mime-info/PKGBUILD
new file mode 100644
index 000000000..1bf40a9b2
--- /dev/null
+++ b/extra/shared-mime-info/PKGBUILD
@@ -0,0 +1,30 @@
+# $Id: PKGBUILD 109014 2011-02-05 11:17:17Z andyrtr $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+
+pkgname=shared-mime-info
+pkgver=0.90
+pkgrel=1
+pkgdesc="Freedesktop.org Shared MIME Info"
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libxml2>=2.7.7' 'glib2>=2.26.0')
+makedepends=('intltool' 'pkgconfig')
+install=shared-mime-info.install
+url="http://freedesktop.org/Software/shared-mime-info"
+source=(http://freedesktop.org/~hadess/${pkgname}-${pkgver}.tar.bz2
+ pbm.patch)
+md5sums=('967d68d3890ba3994cfce3adf5b8f15b'
+ '39fcc08fbd33145684ba97f1f64644c2')
+options=(!makeflags)
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ patch -p1 -i "${srcdir}/pbm.patch"
+ ./configure --prefix=/usr --disable-update-mimedb
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+}
diff --git a/extra/shared-mime-info/pbm.patch b/extra/shared-mime-info/pbm.patch
new file mode 100644
index 000000000..040900e01
--- /dev/null
+++ b/extra/shared-mime-info/pbm.patch
@@ -0,0 +1,49 @@
+diff -Naur shared-mime-info-0.70-orig/freedesktop.org.xml shared-mime-info-0.70/freedesktop.org.xml
+--- shared-mime-info-0.70-orig/freedesktop.org.xml 2010-02-06 02:39:24.000000000 -0500
++++ shared-mime-info-0.70/freedesktop.org.xml 2010-02-06 02:48:01.000000000 -0500
+@@ -17025,12 +17025,10 @@
+ <magic priority="50">
+ <match value="P1" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ <match value="P4" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ </magic>
+@@ -17074,12 +17072,10 @@
+ <magic priority="50">
+ <match value="P2" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ <match value="P5" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ </magic>
+@@ -17123,12 +17119,10 @@
+ <magic priority="50">
+ <match value="P3" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ <match value="P6" type="string" offset="0">
+ <match value="0x0a" type="byte" offset="2">
+- <match value="#" type="string" offset="3"/>
+ </match>
+ </match>
+ </magic>
+@@ -23926,4 +23920,4 @@
+ </treemagic>
+ </mime-type>
+
+-</mime-info>
+\ No newline at end of file
++</mime-info>
diff --git a/extra/shared-mime-info/shared-mime-info.install b/extra/shared-mime-info/shared-mime-info.install
new file mode 100644
index 000000000..fac0c1c79
--- /dev/null
+++ b/extra/shared-mime-info/shared-mime-info.install
@@ -0,0 +1,15 @@
+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}
+ 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
+}