summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: af27a7538d22c7df1ea570992d7185cdbabf348c (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
# Maintainer: Devin Singh <drsingh2518 [at] icloud [dot] com>
pkgname=midle-wl
_pkgname=midle
pkgver=0.1.0
pkgrel=1
pkgdesc='The mediocre idle client'
arch=('x86_64' 'x86')
url='https://gitlab.com/snakedye/midle'
license=('MIT')
makedepends=('git' 'cargo')
depends=('gcc-libs')
source=("git+https://gitlab.com/snakedye/midle.git")
sha256sums=('SKIP')

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

build() {
    cd ${srcdir}/${_pkgname}
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release
}

check() {
    cd ${srcdir}/${_pkgname}
    export RUSTUP_TOOLCHAIN=stable
    cargo test --frozen --all-features
}

package() {
    cd ${srcdir}/${_pkgname}
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/${_pkgname}"
    install -D -m644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md
}