summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e1a547179c221a3ca7e56f2cd1a711ddfa95286d (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: Sean Olson <olson.sean.k@gmail.com>

pkgname='nym-git'
pkgver=0
pkgver() {
  cd "$srcdir/$repo"
  echo $(git rev-list --count master).$(git rev-parse --short master)
}
pkgrel=1
arch=('x86_64')
pkgdesc='Manipulate files en masse using patterns.'
url='https://github.com/olson-sean-k/nym'
license=('MIT')
makedepends=('rust')
checkdepends=('rust')
provides=('nym')
conflicts=('nym')
repo='nym'
source=("$repo::git+https://github.com/olson-sean-k/nym.git")
sha256sums=('SKIP')

build() {
    cd "$srcdir/$repo"
    RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-stable} cargo build --release --locked --all-features
}

check() {
    cd "$srcdir/$repo"
    RUSTUP_TOOLCHAIN=${RUSTUP_TOOLCHAIN:-stable} cargo test --release --locked --all-features
}

package() {
    cd "$srcdir/$repo"
    targetdir=${CARGO_TARGET_DIR:-target}
    install -Dm755 "$targetdir/release/nym" "$pkgdir/usr/bin/nym"
    install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/nym/LICENSE"
}