|
| 1 | +# Maintainer: Danct12 <[email protected]> |
| 2 | +# Contributor: Ionut Biru <[email protected]> |
| 3 | +# Contributor: Jan Alexander Steffens (heftig) <[email protected]> |
| 4 | + |
| 5 | +pkgbase=modemmanager |
| 6 | +pkgname=(modemmanager libmm-glib) |
| 7 | +pkgver=1.14.0 |
| 8 | +pkgrel=20 |
| 9 | +pkgdesc="Mobile broadband modem management service" |
| 10 | +arch=(x86_64 armv7h aarch64) |
| 11 | +url="https://www.freedesktop.org/wiki/Software/ModemManager/" |
| 12 | +license=(GPL2 LGPL2.1) |
| 13 | +depends=(systemd libgudev polkit ppp libqmi libmbim |
| 14 | + mobile-broadband-provider-info) |
| 15 | +makedepends=(gtk-doc gobject-introspection vala autoconf-archive git) |
| 16 | +_commit=5f20662aeb9b0f79865a9a9df151349a29b4a2bd # tags/1.14.0 |
| 17 | +source=("git+https://gitlab.freedesktop.org/mobile-broadband/ModemManager.git#commit=$_commit" |
| 18 | + '0001-mm-broadband-modem-improve-voice-capabilities-detect.patch') |
| 19 | +sha256sums=('SKIP' |
| 20 | + '6272b09b59ba7a395f86502083ea2609a885ffa696c8acd20ed99cb18b6de92b') |
| 21 | + |
| 22 | +pkgver() { |
| 23 | + cd ModemManager |
| 24 | + git describe --tags | sed 's/-rc/rc/;s/-/+/g' |
| 25 | +} |
| 26 | + |
| 27 | +prepare() { |
| 28 | + cd ModemManager |
| 29 | + |
| 30 | + # Improve voice capabilities detection for EG25 |
| 31 | + patch -p1 -N < ../0001-mm-broadband-modem-improve-voice-capabilities-detect.patch |
| 32 | + |
| 33 | + NOCONFIGURE=1 ./autogen.sh |
| 34 | +} |
| 35 | + |
| 36 | +build() { |
| 37 | + cd ModemManager |
| 38 | + ./configure \ |
| 39 | + --prefix=/usr \ |
| 40 | + --sysconfdir=/etc \ |
| 41 | + --localstatedir=/var \ |
| 42 | + --sbindir=/usr/bin \ |
| 43 | + --with-dbus-sys-dir=/usr/share/dbus-1/system.d \ |
| 44 | + --with-udev-base-dir=/usr/lib/udev \ |
| 45 | + --with-polkit=permissive \ |
| 46 | + --with-systemd-journal \ |
| 47 | + --with-at-command-via-dbus \ |
| 48 | + --with-systemd-suspend-resume \ |
| 49 | + --enable-compile-warnings=yes \ |
| 50 | + --enable-gtk-doc \ |
| 51 | + --disable-static |
| 52 | + |
| 53 | + # https://bugzilla.gnome.org/show_bug.cgi?id=655517 |
| 54 | + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool |
| 55 | + |
| 56 | + make |
| 57 | +} |
| 58 | + |
| 59 | +package_modemmanager() { |
| 60 | + depends+=(libmm-glib.so libg{lib,object,io,module}-2.0.so libsystemd.so libgudev-1.0.so |
| 61 | + libqmi-glib.so libmbim-glib.so) |
| 62 | + optdepends=('usb_modeswitch: install if your modem shows up as a storage drive') |
| 63 | + options=(!emptydirs) |
| 64 | + |
| 65 | + cd ModemManager |
| 66 | + make DESTDIR="$pkgdir" install |
| 67 | + make DESTDIR="$pkgdir" -C libmm-glib uninstall |
| 68 | + make DESTDIR="$pkgdir" -C vapi uninstall |
| 69 | + |
| 70 | + # Some stuff to move is left over |
| 71 | + mv "$pkgdir/usr/include" .. |
| 72 | + mv "$pkgdir/usr/lib/pkgconfig" .. |
| 73 | +} |
| 74 | + |
| 75 | +package_libmm-glib() { |
| 76 | + pkgdesc="ModemManager library" |
| 77 | + depends=(libg{lib,object,io}-2.0.so) |
| 78 | + provides=(libmm-glib.so) |
| 79 | + |
| 80 | + install -d "$pkgdir/usr/lib" |
| 81 | + mv include "$pkgdir/usr" |
| 82 | + mv pkgconfig "$pkgdir/usr/lib" |
| 83 | + |
| 84 | + cd ModemManager |
| 85 | + make DESTDIR="$pkgdir" -C libmm-glib install |
| 86 | + make DESTDIR="$pkgdir" -C vapi install |
| 87 | +} |
0 commit comments