summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5856840707fc4f5a345e114925453a95077f5734 (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
# Maintainer: let <let@notlet.dev>

pkgname=overmask
pkgver=0.1.4.r55.g36bc082
pkgrel=3
pkgdesc='Add a writeable overlay on top of read-only files'
arch=('any')
url='https://github.com/ErrorNoInternet/overmask'
license=('LGPL3')
makedepends=('rust')
source=('git+https://github.com/ErrorNoInternet/overmask')
sha256sums=('SKIP')

prepare() {
    cd "$srcdir/overmask"

    export RUSTUP_TOOLCHAIN=nightly
    cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
    cd "$srcdir/overmask"

    export RUSTUP_TOOLCHAIN=nightly
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

package() {
    install -Dm755 "$srcdir/overmask/target/release/overmask" "$pkgdir/usr/bin/overmask"
}

pkgver() {
    cd "$srcdir/overmask"
    git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}