From nobody Wed Nov 17 09:48:16 2021 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 75E17183E86D; Wed, 17 Nov 2021 09:48:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HvJ5X2fwfz3h34; Wed, 17 Nov 2021 09:48:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 353581EA1D; Wed, 17 Nov 2021 09:48:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AH9mGdr007318; Wed, 17 Nov 2021 09:48:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AH9mGSU007317; Wed, 17 Nov 2021 09:48:16 GMT (envelope-from git) Date: Wed, 17 Nov 2021 09:48:16 GMT Message-Id: <202111170948.1AH9mGSU007317@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 37c1a83366f0 - main - devel/desktop-file-utils: use trigger List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 37c1a83366f02cdf76b850c630f79c275a418bea Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=37c1a83366f02cdf76b850c630f79c275a418bea commit 37c1a83366f02cdf76b850c630f79c275a418bea Author: Baptiste Daroussin AuthorDate: 2021-10-11 07:46:55 +0000 Commit: Baptiste Daroussin CommitDate: 2021-11-17 09:47:29 +0000 devel/desktop-file-utils: use trigger Instead of polluting all files with a script to be executed post install convert the handling of mime database into a trigger This trigger will regenerate the db each time someone install a files into the concern directory On removal of the desktop-file-utils port, it will cleanup its cache. While here convert the post installation script into a lua script. Note the db is always run at post installation of the port, just to make sure the cache is up to date, in case the format changes in the futur --- devel/desktop-file-utils/Makefile | 14 +++++-------- .../files/desktop-file-utils.ucl.in | 24 ++++++++++++++++++++++ devel/desktop-file-utils/files/pkg-deinstall.in | 15 -------------- devel/desktop-file-utils/files/pkg-install.in | 11 ---------- .../files/pkg-post-install.lua.in | 2 ++ 5 files changed, 31 insertions(+), 35 deletions(-) diff --git a/devel/desktop-file-utils/Makefile b/devel/desktop-file-utils/Makefile index ff765677b064..4a83a8eab39a 100644 --- a/devel/desktop-file-utils/Makefile +++ b/devel/desktop-file-utils/Makefile @@ -2,6 +2,7 @@ PORTNAME= desktop-file-utils PORTVERSION= 0.26 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= http://freedesktop.org/software/${PORTNAME}/releases/ @@ -11,18 +12,13 @@ COMMENT= Couple of command line utilities for working with desktop entries LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING -USES= compiler:c11 gettext meson gnome pkgconfig tar:xz +USES= compiler:c11 gettext meson gnome pkgconfig trigger tar:xz USE_GNOME= glib20 -PKGINSTALL= ${WRKDIR}/pkg-install -PKGDEINSTALL= ${WRKDIR}/pkg-deinstall - -PORT_MIMEDIRS= ${LOCALBASE}/share/applications - -MIMEDIRS= ${PORT_MIMEDIRS} - -SUB_FILES= pkg-deinstall pkg-install +MIMEDIRS= share/applications SUB_LIST= MIMEDIRS="${MIMEDIRS}" +PKGPOSTINSTALL= ${WRKDIR}/pkg-post-install +SUB_FILES= pkg-post-install.lua post-install: ${INSTALL_DATA} ${WRKSRC}/misc/desktop-entry-mode.el \ diff --git a/devel/desktop-file-utils/files/desktop-file-utils.ucl.in b/devel/desktop-file-utils/files/desktop-file-utils.ucl.in new file mode 100644 index 000000000000..ed07df4f223f --- /dev/null +++ b/devel/desktop-file-utils/files/desktop-file-utils.ucl.in @@ -0,0 +1,24 @@ +path: "%%PREFIX%%/%%MIMEDIRS%%" +cleanup: { + type: lua + script: <