Switch to new download format, add bpm hook and update source.sh script

This commit is contained in:
2025-12-19 12:10:11 +02:00
parent 14933d2eb7
commit c71ac41ec4
3 changed files with 22 additions and 20 deletions
+11 -3
View File
@@ -1,9 +1,17 @@
name: desktop-file-utils name: desktop-file-utils
description: CLI utilities for working with desktop entries description: CLI utilities for working with desktop entries
version: 0.28 version: "0.28"
revision: 2
url: https://www.freedesktop.org/wiki/Software/desktop-file-utils/ url: https://www.freedesktop.org/wiki/Software/desktop-file-utils/
license: GPL license: GPL
architecture: any architecture: any
depends: ["glib"]
make_depends: ["meson"]
type: source type: source
depends:
- glib
make_depends:
- meson
downloads:
- url: https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${BPM_PKG_VERSION}.tar.xz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: 4401d4e231d842c2de8242395a74a395ca468cd96f5f610d822df33594898a70
@@ -0,0 +1,4 @@
trigger_operations: ["install", "upgrade", "remove"]
target_type: "path"
targets: ["usr/share/applications/*.desktop"]
run: "/usr/bin/update-desktop-database --quiet"
+7 -17
View File
@@ -2,31 +2,21 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE # 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 # BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
DOWNLOAD="https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${BPM_PKG_VERSION}.tar.xz"
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 # The build function is executed in the source directory
# This function is used to compile the source code # This function is used to compile the source code
build() { build() {
mkdir build meson setup --prefix=/usr --buildtype=release build
cd build meson compile -C build
meson setup --prefix=/usr --buildtype=release ..
ninja
} }
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package() {
cd build meson install -C build --destdir="$BPM_OUTPUT"
DESTDIR="$BPM_OUTPUT" ninja install
# Install BPM hook
install -Dm644 "$BPM_WORKDIR"/update-desktop-database.bpmhook "$BPM_OUTPUT"/var/lib/bpm/hooks/update-desktop-database.bpmhook
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/desktop-file-utils/COPYING install -Dm644 "$BPM_SOURCE"/COPYING "$BPM_OUTPUT"/usr/share/licenses/desktop-file-utils/COPYING
} }