summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 07f7e1195a9d8dc3e3fb4c676c125672aca23ab9 (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
pkgname=tnb
pkgver=2.1.1
pkgrel=1
epoch=1
pkgdesc="CLI-based Telegram Notification Bot"
arch=('x86_64')
url="https://github.com/Wint3rmute/tnb.git"
license=('custom:WTFPL')
makedepends=('cargo')

source=("${pkgname}::git+https://github.com/Wint3rmute/tnb.git#tag=${pkgver}")
sha1sums=('SKIP')

prepare() {
    cd "$srcdir/${pkgname%-git}"
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cd "$srcdir/${pkgname%-git}"
    cargo build --frozen --release --all-features
}

package() {
    cd "$srcdir/${pkgname%-git}"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname"
}