diff options
author | marcus <marcus@FreeBSD.org> | 2005-01-13 15:09:24 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2005-01-13 15:09:24 +0800 |
commit | 6542a470563a058e65482d3e3f1a4a9f8b7fcb28 (patch) | |
tree | 4c9a8d3a4e3c49254736c844db7e1ea5975082ec /devel/desktop-file-utils | |
parent | 2bb85c1d5669343852dc6040b03fbd0dc4d3ec58 (diff) | |
download | freebsd-ports-gnome-6542a470563a058e65482d3e3f1a4a9f8b7fcb28.tar.gz freebsd-ports-gnome-6542a470563a058e65482d3e3f1a4a9f8b7fcb28.tar.zst freebsd-ports-gnome-6542a470563a058e65482d3e3f1a4a9f8b7fcb28.zip |
Try again to eliminate leftover file warnings during dependent package builds.
This approach creates all ${LOCALBASE} and ${X11BASE} desktop directories
before updating the desktop database to ensure the mimeinfo.cache files
are created when this package is installed.
Upon package deinstallation, each desktop directory will be rmdir'd.
Diffstat (limited to 'devel/desktop-file-utils')
-rw-r--r-- | devel/desktop-file-utils/Makefile | 17 | ||||
-rw-r--r-- | devel/desktop-file-utils/files/pkg-deinstall.in | 4 | ||||
-rw-r--r-- | devel/desktop-file-utils/files/pkg-install.in | 17 | ||||
-rw-r--r-- | devel/desktop-file-utils/pkg-plist | 1 |
4 files changed, 33 insertions, 6 deletions
diff --git a/devel/desktop-file-utils/Makefile b/devel/desktop-file-utils/Makefile index 8453dbc17329..4e3e56c2c529 100644 --- a/devel/desktop-file-utils/Makefile +++ b/devel/desktop-file-utils/Makefile @@ -7,6 +7,7 @@ PORTNAME= desktop-file-utils PORTVERSION= 0.10 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://freedesktop.org/software/${PORTNAME}/releases/ @@ -23,25 +24,31 @@ CONFIGURE_ARGS= --with-lispdir=${PREFIX}/share/emacs/site-lisp CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" +PKGINSTALL= ${WRKDIR}/pkg-install PKGDEINSTALL= ${WRKDIR}/pkg-deinstall -MIMEDIRS= ${X11BASE}/share/applications \ +PORT_MIMEDIRS= ${X11BASE}/share/applications \ ${LOCALBASE}/share/applications \ - /usr/share/applications \ ${X11BASE}/share/gnome/applications \ - ${LOCALBASE}/share/gnome/applications \ + ${LOCALBASE}/share/gnome/applications + +MIMEDIRS= ${PORT_MIMEDIRS} \ + /usr/share/applications \ /usr/share/gnome/applications post-patch: @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g ; \ s|%%X11BASE%%|${X11BASE}|g' \ ${WRKSRC}/src/eggdirfuncs.c - @${SED} -e 's|%%MIMEDIRS%%|${MIMEDIRS}|' \ + @${SED} -e 's|%%MIMEDIRS%%|${MIMEDIRS}| ;\ + s|%%PORT_MIMEDIRS%%|${PORT_MIMEDIRS}|' \ < ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL} + @${SED} -e 's|%%PORT_MIMEDIRS%%|${PORT_MIMEDIRS}|' \ + < ${FILESDIR}/pkg-install.in > ${PKGINSTALL} post-install: .if !defined(PACKAGE_BUILDING) - -@${PREFIX}/bin/update-desktop-database -q + @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .endif .include <bsd.port.mk> diff --git a/devel/desktop-file-utils/files/pkg-deinstall.in b/devel/desktop-file-utils/files/pkg-deinstall.in index 253e5484adae..e2eccdad388c 100644 --- a/devel/desktop-file-utils/files/pkg-deinstall.in +++ b/devel/desktop-file-utils/files/pkg-deinstall.in @@ -14,4 +14,8 @@ for mdir in %%MIMEDIRS%%; do fi done +for pmdir in %%PORT_MIMEDIRS%%; do + rmdir ${pmdir} 2>/dev/null +done + exit 0 diff --git a/devel/desktop-file-utils/files/pkg-install.in b/devel/desktop-file-utils/files/pkg-install.in new file mode 100644 index 000000000000..bafaa46a1f86 --- /dev/null +++ b/devel/desktop-file-utils/files/pkg-install.in @@ -0,0 +1,17 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Initialize the desktop directories and MIME cache. + +if [ "$2" != "POST-INSTALL" ]; then + exit 0 +fi + +for pmdir in %%PORT_MIMEDIRS%%; do + mkdir -p ${pmdir} +done + +${PKG_PREFIX}/bin/update-desktop-database -q + +exit 0 diff --git a/devel/desktop-file-utils/pkg-plist b/devel/desktop-file-utils/pkg-plist index 21d4a16e2a2e..18d19eb05954 100644 --- a/devel/desktop-file-utils/pkg-plist +++ b/devel/desktop-file-utils/pkg-plist @@ -2,4 +2,3 @@ bin/desktop-file-install bin/desktop-file-validate bin/update-desktop-database share/emacs/site-lisp/desktop-entry-mode.el -@exec %D/bin/update-desktop-database -q || /usr/bin/true |