Switch to new package format

This commit is contained in:
2026-06-13 20:00:31 +03:00
parent 0692c82771
commit 8bdf370f11
3 changed files with 48 additions and 31 deletions
+37
View File
@@ -0,0 +1,37 @@
name: modemmanager
description: Mobile broadband modem management service
version: 1.24.2
revision: 2
url: https://www.freedesktop.org/wiki/Software/ModemManager/
license: GPL2-or-later,LGPL2.1-or-later
maintainers:
- [email protected]
architecture: any
type: source
depends:
- gcc-libs
- glib
- glibc
- libgudev
- hicolor-icon-theme
- libmbim
- libelogind
- libqmi
- libqrtr-glib
- mobile-broadband-provider-info
- polkit
make_depends:
- bash-completion
- elogind
- gobject-introspection
- gtk-doc
- meson
- vala
check_depends:
- python-dbus
- python-pygobject
downloads:
- url: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/archive/${BPM_PKG_VERSION}/ModemManager-${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE}
extract_strip_components: 1
checksum: fbc75adcc0d7b0565f256e7ff4e8872b0a37c4413ff576665f7470932d9c1b68
-9
View File
@@ -1,9 +0,0 @@
name: modemmanager
description: Mobile broadband modem management service
version: 1.24.2
url: https://www.freedesktop.org/wiki/Software/ModemManager/
license: GPL2-or-later,LGPL2.1-or-later
architecture: any
depends: ["gcc-libs","glib","glibc","libgudev","libmbim","libqmi","libqrtr-glib","polkit"]
make_depends: ["gobject-introspection","meson","vala","python-dbus","python-pygobject"]
type: source
+11 -22
View File
@@ -1,41 +1,30 @@
# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package
# This is the recipe.sh script. It is executed by BPM in a temporary directory when compiling a source package
# 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/mobile-broadband/ModemManager/-/archive/${BPM_PKG_VERSION}/ModemManager-${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() {
mkdir build
cd build
meson setup --prefix=/usr -Dsystemd_journal=false -Dsystemdsystemunitdir=no -Dsystemd_suspend_resume=false -Dpolkit=permissive -Dvapi=true
meson compile
meson setup build --prefix=/usr \
-Dgtk_doc=true \
-Dsystemd_journal=false \
-Dsystemdsystemunitdir=no \
-Dsystemd_suspend_resume=false \
-Dpolkit=permissive \
-Dvapi=true
meson compile -C build
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
cd build
meson test
meson test -C build
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
cd build
meson install --destdir="$BPM_OUTPUT"
meson install -C build --destdir="$BPM_OUTPUT"
# Install package license
install -Dm644 "$BPM_SOURCE"/COPYING{,.LIB} -t "$BPM_OUTPUT"/usr/share/licenses/modemmanager/