Files
BMLFS/build-scripts/ModemManager.build
2025-09-04 09:34:54 -05:00

67 lines
2.3 KiB
Bash

#! /bin/bash
# ModemManager
# Source: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/archive/1.24.2/ModemManager-1.24.2.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: libgudev
# Recommended: elogind, gobject-intropsection, libmbim, libqmi, Polkit, and Vala
# Optional: GTK-Doc
export PVER="1.24.2"
meson setup --prefix=/usr --buildtype=release \
-Dbash_completion=false -Dqrtr=false \
-Dsystemdsystemunitdir=no \
-Dsystemd_suspend_resume=false \
-Dsystemd_journal=false \
-Dintrospection=true -Dman=false \
-Dgtk_doc=false -Dmbim=false -Dqmi=false OUT
read -p "Compile?" && ninja -C OUT -j2 &&
sudo -S DESTDIR=$BUILD ninja -C OUT install && \
sudo -S mkdir -pv /BMAN/install /BMAN/usr/share && \
sudo -S mv $BUILD/usr/share/man /BMAN/usr/share/ && \
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
ModemManager: ModemManager (mobile broadband modem API)
ModemManager:
ModemManager: ModemManager provides a unified high level API for communicating with
ModemManager: mobile broadband modems.
ModemManager:
ModemManager: For more info, see:
ModemManager: https://www.freedesktop.org/wiki/Software/ModemManager
ModemManager:
ModemManager:
ModemManager:
ModemManager:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/ModemManager-$PVER-$PSUFFIX && \
cd /BMAN && \
cat > /tmp/slack-desc << "EOF"
ModemManager-doc: Manuals for ModemManager
ModemManager-doc:
ModemManager-doc: A unified high level API for communicating with mobile broadband
ModemManager-doc: modems.
ModemManager-doc:
ModemManager-doc: https://www.freedesktop.org/wiki/Software/ModemManager
ModemManager-doc:
EOF
sudo -S mv -v /tmp/slack-desc install/ && \
sudo -S makepkg -l y -c n $PKGS/ModemManager-doc-$PVER-$NOPSUFFIX && \
sudo -S rm -rf ${BUILD}/* /BMAN/*