summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 836763bbe269778408d9a70b7423a775ba05cbcc (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
# Maintainer: ReubenPercy / reubenpercival14@gmail.com
pkgname=rustmap
pkgver=1.0.0
pkgrel=1
pkgdesc="A lightweight, fast, and easy-to-use port scanner written in Rust"
arch=('x86_64' 'i686' 'aarch64' 'armv7h')
url="https://codeberg.org/akirathelinuxguy/rustmap"
license=('MIT')
depends=()
makedepends=('rust' 'cargo' 'git')
source=("git+https://codeberg.org/akirathelinuxguy/rustmap.git")
sha256sums=('SKIP')

prepare() {
    cd "$srcdir/rustmap"
    export RUSTUP_TOOLCHAIN=stable
    cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')"
}

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

check() {
    cd "$srcdir/rustmap"
    export RUSTUP_TOOLCHAIN=stable
    cargo test --all-features || true
}

package() {
    cd "$srcdir/rustmap"
    install -Dm755 "target/release/rustmap" "$pkgdir/usr/bin/rustmap"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}