aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2004-12-26 15:05:08 +0800
committermarcus <marcus@FreeBSD.org>2004-12-26 15:05:08 +0800
commit8caa8bbdb9d91091b00e9498e651f3863a4a9456 (patch)
tree42ab49b1f6448810d543a462749e90f74fbf953e /misc
parentbdb2a9d40c31506299fd1576bf137ab19c022155 (diff)
downloadfreebsd-ports-gnome-8caa8bbdb9d91091b00e9498e651f3863a4a9456.tar.gz
freebsd-ports-gnome-8caa8bbdb9d91091b00e9498e651f3863a4a9456.tar.zst
freebsd-ports-gnome-8caa8bbdb9d91091b00e9498e651f3863a4a9456.zip
Make sure update-mime-database is run during package installation as well.
Reported by: GNOME Tinderbox
Diffstat (limited to 'misc')
-rw-r--r--misc/shared-mime-info/Makefile9
-rw-r--r--misc/shared-mime-info/files/pkg-install.in12
2 files changed, 20 insertions, 1 deletions
diff --git a/misc/shared-mime-info/Makefile b/misc/shared-mime-info/Makefile
index 0c76e02585e8..ff161d97d596 100644
--- a/misc/shared-mime-info/Makefile
+++ b/misc/shared-mime-info/Makefile
@@ -6,7 +6,7 @@
PORTNAME= shared-mime-info
PORTVERSION= 0.15
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= misc gnome
MASTER_SITES= http://www.marcuscom.com/downloads/ \
http://www.freedesktop.org/software/shared-mime-info/
@@ -21,6 +21,8 @@ USE_GNOME= glib20 libxml2 intltool gnomehack
MAN1= update-mime-database.1
+PKGINSTALL= ${WRKDIR}/pkg-install
+
MIMEDIRS= ${X11BASE}/share/gnome/mime \
${LOCALBASE}/share/gnome/mime \
${X11BASE}/share/mime \
@@ -34,4 +36,9 @@ post-patch:
s|%%X11BASE%%|${X11BASE}|g' \
${WRKSRC}/update-mime-database.c
+post-install:
+ @${SED} -e 's|%%PREFIX%%|${PREFIX}| ; \
+ s|%%MIMEDIRS%%|${MIMEDIRS}|' \
+ < ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
+
.include <bsd.port.mk>
diff --git a/misc/shared-mime-info/files/pkg-install.in b/misc/shared-mime-info/files/pkg-install.in
new file mode 100644
index 000000000000..b2c3db6d3ca3
--- /dev/null
+++ b/misc/shared-mime-info/files/pkg-install.in
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+case $2 in
+POST-INSTALL)
+ for mdir in %%MIMEDIRS%%; do
+ if [ -d ${mdir} ]; then
+ %%PREFIX%%/bin/update-mime-database ${mdir}
+ fi
+ done
+ exit 0
+ ;;
+esac