summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 882bd24bf6756e21b2a46c21076a8b0be81611d6 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Maintainer: VCalV
_pkgname=mergiraf
pkgname="${_pkgname}-git"
pkgver=0.4.0.r3.gea3c631
pkgrel=1
pkgdesc="A syntax-aware git merge driver for a growing collection of programming languages and file formats"
arch=('x86_64')
url="https://mergiraf.org/"
license=('GPL-3.0-or-later')
makedepends=(cargo git)
checkdepends=(git)
depends=(glibc gcc-libs)
options=('!lto')
conflicts=("$_pkgname-bin" "$_pkgname")
provides=("$_pkgname")
source=("git+https://codeberg.org/mergiraf/mergiraf.git")
sha512sums=('SKIP')

pkgver() {
  cd "$_pkgname"
  set -o pipefail
  git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^[^0-9]*//g'
}

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

build() {
    cd "$_pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo build --frozen --release --all-features
}

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


package() {
    cd "$_pkgname"
    export RUSTUP_TOOLCHAIN=stable
    #cargo install --no-track --frozen --all-features --root "$pkgdir/usr/" --path .
    #cargo install --no-track --all-features --root "$pkgdir/usr/" --path .
    cargo install --no-track --offline --all-features --root "$pkgdir/usr/" --path .
    install -Dm444 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm444 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
    install -Dm444 GOVERNANCE.md "$pkgdir/usr/share/doc/$pkgname/GOVERNANCE.md"
}