diff options
Diffstat (limited to 'community/modemmanager/APKBUILD')
-rw-r--r-- | community/modemmanager/APKBUILD | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/community/modemmanager/APKBUILD b/community/modemmanager/APKBUILD new file mode 100644 index 0000000000..94cea74916 --- /dev/null +++ b/community/modemmanager/APKBUILD @@ -0,0 +1,93 @@ +# Contributor: Stuart Cardall <developer@it-offshore.co.uk> +# Maintainer: Stuart Cardall <developer@it-offshore.co.uk> +pkgname=modemmanager +pkgver=1.4.14 +pkgrel=0 +pkgdesc="ModemManager library" +url="http://www.freedesktop.org/wiki/Software/ModemManager" +arch="all" +license="GPL2, LGPL2.1" +depends_dev="" +makedepends="$depends_dev gobject-introspection-dev gtk-doc intltool vala + libgudev-dev polkit-dev libmbim-dev libqmi-dev linux-headers" +subpackages="$pkgname-dev $pkgname-lang $pkgname-doc libmm-glib:libmm libmm-glib-dev:libmmdev" +source="http://www.freedesktop.org/software/ModemManager/ModemManager-$pkgver.tar.xz + no-XCASE.patch + $pkgname.rules + " + +_builddir="$srcdir"/ModemManager-$pkgver +prepare() { + local i + cd "$_builddir" + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done +} + +build() { + cd "$_builddir" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --with-polkit=permissive \ + --enable-gtk-doc \ + --disable-static \ + --enable-more-warnings \ + --with-newest-qmi-commands \ + --with-dbus-sys-dir=/etc/dbus-1 \ + --enable-vala=yes \ + || return 1 + # https://bugzilla.gnome.org/show_bug.cgi?id=655517 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + make || return 1 +} + +libmm() { + cd "$_builddir" + mkdir -p "$subpkgdir" + make DESTDIR="$subpkgdir" -C libmm-glib install || return 1 + make DESTDIR="$subpkgdir" -C vapi install || return 1 +} + +libmmdev() { + mkdir -p "$subpkgdir/usr/lib/pkgconfig" + mv "${subpkgdir%*-dev}/usr/include" "$subpkgdir/usr/" + mv "${subpkgdir%*-dev}/usr/share" "$subpkgdir/usr/" + mv "$pkgdir-dev"/usr/lib/pkgconfig/mm-glib.pc "$subpkgdir"/usr/lib/pkgconfig/ + rmdir "$pkgdir-dev"/usr/include/libmm-glib # in libmm-glib-dev +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + make DESTDIR="$pkgdir" -C libmm-glib uninstall || return 1 + make DESTDIR="$pkgdir" -C vapi uninstall || return 1 + rmdir "$pkgdir"/usr/lib/girepository-1.0 # in libmm-glib + rm -rf "$pkgdir"/usr/share/dbus-1/system-services #systemd-service + mkdir -p "$pkgdir/usr/share/polkit-1/rules.d" + install -m644 -D "$srcdir/$pkgname.rules" \ + "$pkgdir/usr/share/polkit-1/rules.d/01-org.freedesktop.ModemManager.rules" || return 1 + # post-install message + mkdir -p "$pkgdir/usr/share/doc/$pkgname" + cat > $pkgdir/usr/share/doc/$pkgname/README.alpine <<EOF +If your USB modem shows up as a Flash drive when you plug it in: + +install 'usb-modeswitch' to automatically switch to USB modem mode whenever you plug it in. +To control your modem without the root password: add your user account to the 'plugdev' group. +EOF +} + +md5sums="cabb72e7c2ddf6af96eca2c9f3d168a3 ModemManager-1.4.14.tar.xz +63288189ea454e9712dc26d76d75277d no-XCASE.patch +735e155a785554349906c09dd36d3866 modemmanager.rules" +sha256sums="abe6cdd515a774bcba3afdcdb1e504569801e79282ccdf26099f33cbb8731ba2 ModemManager-1.4.14.tar.xz +5e5b87b580faf14e4c56ccc7f9f189522742a64ab365b26751dcc86e68dedb87 no-XCASE.patch +577807e59b1e95757a4d94922c66f7f36487922c5092a6c148e7db6a4dc6afe8 modemmanager.rules" +sha512sums="2fb5517cd3fbd98cf4048cec326fabf18fb26d88b75e56208d1ed64d70d72d6e826ef30391c86fbcfe4d69661194bcfbb55d545db10ebe8baf8ef16a3c580446 ModemManager-1.4.14.tar.xz +5c537e4a86212339d0c41ae3e1055513051a0d6e51bdf2547a38054fbe802feeac2ff46c863ab69423a6693ac33ebacec7a771d4b270aeb5fe6e6bb601361f23 no-XCASE.patch +3c76ee577334e25c836857f8e7fef6a249cdd9fcd8f889cb64d9c1667bc6a95c087267a153bddd1a13256c59f8cd578ccb448e6b9cb54b73bb74acb8a0ca1e3f modemmanager.rules" |