summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 92f1037ae7acbd674bc6d6750445afc6b050da48 (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
# Maintainer: Noah Jelen <noahtjelen@gmail.com>
# Generated by cargo on April 1, 2022 at 00:59:33
pkgname=tmobile-internet-tools
pkgver=0.2.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=('GPL')
depends=('ncurses' 'gcc-libs' 'glibc' 'networkmanager' 'openssl')
makedepends=('cargo' 'gzip')
source=("https://gitlab.com/NoahJelen/tmobile-internet-tools/-/archive/$pkgver/tmobile-internet-tools-$pkgver.zip")
md5sums=('SKIP')

build() {
    cd "tmobile-internet-tools-$pkgver"
    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"
    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/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
    gzip "$pkgdir/usr/share/man/man1/gatewaymon.1"
    gzip "$pkgdir/usr/share/man/man1/tmotop.1"
    gzip "$pkgdir/usr/share/man/man1/tmocli.1"
}