From a4d5f509a2fae8de244f848b51c7cea2d41bf058 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Wed, 8 Jul 2026 13:33:39 +0300 Subject: [PATCH] Update package version to 2.5.1 --- info.yml | 11 ++++++++--- recipe.sh | 15 ++++----------- source-files/update-mime-database.bpmhook | 3 +++ 3 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 source-files/update-mime-database.bpmhook diff --git a/info.yml b/info.yml index ee09d72..708c255 100644 --- a/info.yml +++ b/info.yml @@ -1,9 +1,9 @@ name: shared-mime-info description: Freedesktop.org Shared MIME Info -version: "2.4" -revision: 4 +version: 2.5.1 +revision: 1 url: https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/ -license: GPL2 +license: GPL2-or-later maintainers: - enumdev@enumerated.dev architecture: any @@ -17,3 +17,8 @@ make_depends: - docbook-xsl-nons - meson - xmlto +downloads: + - url: https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${BPM_PKG_VERSION}/shared-mime-info-${BPM_PKG_VERSION}.tar.gz + extract_to: ${BPM_SOURCE} + extract_strip_components: 1 + checksum: ea248ea157b7fa0165f4fe282c84919fa84c3f175553642f229c8f1ab7539128 diff --git a/recipe.sh b/recipe.sh index c076165..6d9387d 100644 --- a/recipe.sh +++ b/recipe.sh @@ -2,20 +2,10 @@ # BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT -DOWNLOAD="https://gitlab.freedesktop.org/xdg/shared-mime-info/-/archive/${BPM_PKG_VERSION}/shared-mime-info-${BPM_PKG_VERSION}.tar.gz" -FILENAME="${DOWNLOAD##*/}" - -# The prepare function is executed in the root of the temp directory -# This function is used for downloading files and putting them into the correct location -prepare() { - wget "$DOWNLOAD" - tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" -} - # The build function is executed in the source directory # This function is used to compile the source code build() { - meson setup --prefix=/usr --buildtype=release -Dupdate-mimedb=true build + meson setup --prefix=/usr --buildtype=release -Dupdate-mimedb=false -Dbuild-tests=false build meson compile -C build } @@ -24,6 +14,9 @@ build() { package() { meson install -C build --destdir="$BPM_OUTPUT" + # Install bpm hook + install -Dm644 "$BPM_WORKDIR"/update-mime-database.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/update-mime-database.bpmhook + # Install package license install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/shared-mime-info/COPYING } diff --git a/source-files/update-mime-database.bpmhook b/source-files/update-mime-database.bpmhook new file mode 100644 index 0000000..f1628cc --- /dev/null +++ b/source-files/update-mime-database.bpmhook @@ -0,0 +1,3 @@ +trigger_actions: ["install", "upgrade", "remove"] +targets: ["usr/share/mime/packages/*.xml"] +run: /usr/bin/update-mime-database /usr/share/mime