summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c74310ac201dcfcca465710ae8138a2c216af220 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Noah Jelen <noahtjelen@gmail.com>
# Generated by cargo on December 12, 2022 at 01:40:13
pkgname=tmobile-internet-tools
pkgver=0.8.0
pkgrel=1
pkgdesc="Set of tools for working with T-Mobile Home Internet gateways"
arch=('i686' 'x86_64')
url="https://gitlab.com/NoahJelen/tmobile-internet-tools"
license=('GPL3')
depends=('ncurses' 'gcc-libs' 'glibc' 'networkmanager' 'openssl')
optdepends=('libnotify: Desktop notifications about gateway issues')
makedepends=('cargo')
source=("https://gitlab.com/NoahJelen/tmobile-internet-tools/-/archive/$pkgver/tmobile-internet-tools-$pkgver.zip")
md5sums=('SKIP')

build() {
    cd "tmobile-internet-tools-$pkgver"
    # Feature configuration
    # add --features nokia for nokia gateway support
    # add --no-default-features to disable sagemcom support
    cargo build --release
    cd target/release
    ln -sf gatewaymon tmotop
    ln -sf gatewaymon tmocli
}

package() {
    cd "tmobile-internet-tools-$pkgver"
    mkdir -p "$pkgdir/usr/share/tmobile-internet-tools/"
    cp -r webui/ "$pkgdir/usr/share/tmobile-internet-tools/"
    chmod -R 755 "$pkgdir/usr/share/tmobile-internet-tools/webui/"
    mkdir -p "$pkgdir/usr/share/man/man1/"
    mkdir -p "$pkgdir/usr/lib/systemd/system"
    install -Dt "$pkgdir/usr/bin" -m755 target/release/gatewaymon
    install -Dt "$pkgdir/usr/bin" -m755 target/release/tmocli
    install -Dt "$pkgdir/usr/bin" -m755 target/release/tmotop
    install -Dt "$pkgdir/usr/bin" -m755 target/release/tmo-webui
    install -Dt "$pkgdir/usr/share/man/man1" man/gatewaymon.1
    install -Dt "$pkgdir/usr/share/man/man1" man/tmocli.1
    install -Dt "$pkgdir/usr/share/man/man1" man/tmotop.1
    install -Dt "$pkgdir/usr/lib/systemd/user" gatewaymon.service
    install -Dt "$pkgdir/usr/lib/systemd/system" gatewaymon.service
    install -Dt "$pkgdir/usr/lib/systemd/user" gatewaymon-debug.service
    install -Dt "$pkgdir/usr/lib/systemd/system" gatewaymon-debug.service
    install -Dt "$pkgdir/usr/lib/systemd/user" tmo-webui.service
    install -Dt "$pkgdir/usr/lib/systemd/system" tmo-webui.service
}