aboutsummaryrefslogtreecommitdiffstats
path: root/misc/kde4-shared-mime-info
diff options
context:
space:
mode:
Diffstat (limited to 'misc/kde4-shared-mime-info')
-rw-r--r--misc/kde4-shared-mime-info/Makefile48
-rw-r--r--misc/kde4-shared-mime-info/pkg-descr2
-rw-r--r--misc/kde4-shared-mime-info/pkg-plist38
3 files changed, 88 insertions, 0 deletions
diff --git a/misc/kde4-shared-mime-info/Makefile b/misc/kde4-shared-mime-info/Makefile
new file mode 100644
index 000000000000..e6a3bb659860
--- /dev/null
+++ b/misc/kde4-shared-mime-info/Makefile
@@ -0,0 +1,48 @@
+# New ports collection makefile for: kde4-shared-mime-info
+# Date created: 2008-07-07
+# Whom: Max Brazhnikov <makc@issp.ac.ru>
+#
+# $FreeBSD$
+#
+
+PORTNAME= shared-mime-info
+PORTVERSION= 1.0
+CATEGORIES= misc kde
+MASTER_SITES= # none
+PKGNAMEPREFIX= kde4-
+DISTNAME= # none
+EXTRACT_SUFX= # none
+
+MAINTAINER= kde@FreeBSD.org
+COMMENT= Handles shared MIME database under $${KDE_PREFIX}
+
+RUN_DEPENDS= update-mime-database:${PORTSDIR}/misc/shared-mime-info
+
+USE_KDE4= kdeprefix
+
+NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+MIMESUBDIRS= application audio image inode message model multipart \
+ packages text video x-epoc x-content
+
+.include <bsd.port.pre.mk>
+
+.if ${KDE4_PREFIX} != ${LOCALBASE}
+PLIST_SUB+= HACK=""
+.else
+PLIST_SUB+= HACK="@comment "
+.endif
+
+do-install:
+.if ${KDE4_PREFIX} != ${LOCALBASE}
+.for dir in ${MIMESUBDIRS}
+ ${MKDIR} ${KDE4_PREFIX}/share/mime/${dir}
+ ${TOUCH} ${KDE4_PREFIX}/share/mime/${dir}/.keep_me
+.endfor
+ @-update-mime-database ${KDE4_PREFIX}/share/mime
+.else
+ ${DO_NADA}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/misc/kde4-shared-mime-info/pkg-descr b/misc/kde4-shared-mime-info/pkg-descr
new file mode 100644
index 000000000000..949f2a312e6f
--- /dev/null
+++ b/misc/kde4-shared-mime-info/pkg-descr
@@ -0,0 +1,2 @@
+This is a hack port which cleans up mime directory under ${KDE4_PREFIX}
+during deinstalling. It is noop when KDE4_PREFIX is ${LOCALBASE}.
diff --git a/misc/kde4-shared-mime-info/pkg-plist b/misc/kde4-shared-mime-info/pkg-plist
new file mode 100644
index 000000000000..e9797e26ffa0
--- /dev/null
+++ b/misc/kde4-shared-mime-info/pkg-plist
@@ -0,0 +1,38 @@
+%%HACK%%share/mime/application/.keep_me
+%%HACK%%share/mime/audio/.keep_me
+%%HACK%%share/mime/image/.keep_me
+%%HACK%%share/mime/inode/.keep_me
+%%HACK%%share/mime/message/.keep_me
+%%HACK%%share/mime/model/.keep_me
+%%HACK%%share/mime/multipart/.keep_me
+%%HACK%%share/mime/packages/.keep_me
+%%HACK%%share/mime/text/.keep_me
+%%HACK%%share/mime/video/.keep_me
+%%HACK%%share/mime/x-content/.keep_me
+%%HACK%%share/mime/x-epoc/.keep_me
+%%HACK%%@exec %%LOCALBASE%%/bin/update-mime-database %D/share/mime > /dev/null || /usr/bin/true
+%%HACK%%@unexec [ -f %D/share/mime/XMLnamespaces ] && rm -f %D/share/mime/XMLnamespaces || true
+%%HACK%%@unexec [ -f %D/share/mime/aliases ] && rm -f %D/share/mime/aliases || true
+%%HACK%%@unexec [ -f %D/share/mime/generic-icons ] && rm -f %D/share/mime/generic-icons || true
+%%HACK%%@unexec [ -f %D/share/mime/globs ] && rm -f %D/share/mime/globs || true
+%%HACK%%@unexec [ -f %D/share/mime/globs2 ] && rm -f %D/share/mime/globs2 || true
+%%HACK%%@unexec [ -f %D/share/mime/icons ] && rm -f %D/share/mime/icons || true
+%%HACK%%@unexec [ -f %D/share/mime/magic ] && rm -f %D/share/mime/magic || true
+%%HACK%%@unexec [ -f %D/share/mime/mime.cache ] && rm -f %D/share/mime/mime.cache || true
+%%HACK%%@unexec [ -f %D/share/mime/subclasses ] && rm -f %D/share/mime/subclasses || true
+%%HACK%%@unexec [ -f %D/share/mime/treemagic ] && rm -f %D/share/mime/treemagic || true
+%%HACK%%@unexec [ -f %D/share/mime/types ] && rm -f %D/share/mime/types || true
+%%HACK%%@dirrmtry share/mime/x-epoc
+%%HACK%%@dirrmtry share/mime/x-content
+%%HACK%%@dirrmtry share/mime/video
+%%HACK%%@dirrmtry share/mime/text
+%%HACK%%@dirrmtry share/mime/packages
+%%HACK%%@dirrmtry share/mime/multipart
+%%HACK%%@dirrmtry share/mime/model
+%%HACK%%@dirrmtry share/mime/message
+%%HACK%%@dirrmtry share/mime/inode
+%%HACK%%@dirrmtry share/mime/image
+%%HACK%%@dirrmtry share/mime/audio
+%%HACK%%@dirrmtry share/mime/application
+%%HACK%%@dirrmtry share/mime
+%%HACK%%@dirrmtry share