| 1 | # Maintainer: Alistair Francis <[email protected]> |
| 2 | pkgname=bm818-tools |
| 3 | pkgver=0.8 |
| 4 | pkgrel=0 |
| 5 | pkgdesc="Free tools for use with the BM818 modem" |
| 6 | url="https://source.puri.sm/Librem5/bm818-tools" |
| 7 | arch="all" |
| 8 | license="GPL-3.0-or-later" |
| 9 | depends=" |
| 10 | ppp |
| 11 | python3 |
| 12 | py3-pyserial |
| 13 | py3-udev |
| 14 | " |
| 15 | |
| 16 | source=" |
| 17 | https://source.puri.sm/Librem5/bm818-tools/-/archive/v$pkgver/bm818-tools-v$pkgver.tar.gz |
| 18 | " |
| 19 | options="!check" # no test suite |
| 20 | builddir="$srcdir/bm818-tools-v$pkgver" |
| 21 | |
| 22 | package() { |
| 23 | install -D -m755 "usr/bin/bm818-fw-check" "$pkgdir/usr/bin/bm818-fw-check" |
| 24 | install -D -m755 "usr/bin/bm818-tool" "$pkgdir/usr/bin/bm818-tool" |
| 25 | install -D -m755 "usr/bin/bm818-volte" "$pkgdir/usr/bin/bm818-volte" |
| 26 | install -D -m755 "usr/bin/bm818-volte-check" "$pkgdir/usr/bin/bm818-volte-check" |
| 27 | |
| 28 | for f in usr/share/bm818-tools/*; do |
| 29 | install -D -t "$pkgdir/usr/share/bm818-tools/" $f; |
| 30 | done |
| 31 | |
| 32 | # Copy the glade file for the GUI |
| 33 | # |
| 34 | # We don't install the desktop file (usr/share/applications/bm818-tool.desktop) |
| 35 | # as by default the user won't have permissions to run the GUI. To access the |
| 36 | # modem you need to be root or the user needs to be a member of the dialout group. |
| 37 | # |
| 38 | # We don't want to add the user to the dialout group just to run this GUI, instead |
| 39 | # let's just expect the user to run the scripts or GUI from the terminal as |
| 40 | # root (or add themselves to dialout). |
| 41 | # See: https://source.puri.sm/Librem5/bm818-tools/-/issues/5 |
| 42 | install -D -m755 "data/bm818-tool.glade" "$pkgdir/usr/share/bm818-tools/bm818-tool.glade" |
| 43 | } |
| 44 | |
| 45 | sha512sums=" |
| 46 | e4e885e4a56505c71cb62bad1c5aa87b000e477a2a63a415f2c1c4acef576d932f954282f92ed78d10321b7152c51f572372a771189192b5cffb7b78763ed9b7 bm818-tools-v0.8.tar.gz |
| 47 | " |