blob: dda59c648321cdb519d3f883898cb67c3f18a002 (
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
|
# Maintainer: VCalV
_name=GQL
_binary=gitql
pkgname=${_name,,}
pkgver=0.37.0
pkgrel=1
pkgdesc="Git Query language (GQL) is an SQL like language to perform queries on .git files"
url="https://github.com/AmrDeveloper/GQL"
arch=(x86_64)
license=(MIT)
depends=('gcc-libs' 'glibc')
makedepends=('cargo' 'cmake')
conflicts=("${_binary}")
provides=("${_binary}")
options=(!lto) # Linking zlib with flake2 fails with LTO enabled
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha512sums=('fed2a2c3b7c4065e81d044c517228a57110979b425eedac87afd612d3ebed7043c27ae60d660c251e02409a7b52517e1ca4fec799ce9e2efd854bd1ea4add786')
prepare() {
cd ${_name}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd ${_name}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cargo build --frozen --release --all-features
}
check() {
cd ${_name}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features --package gitql-cli
}
package() {
cd ${_name}-${pkgver}
install -vDm755 -t "$pkgdir/usr/bin" target/release/${_binary}
ln -rsf "$pkgdir/usr/bin/${_binary}" "$pkgdir/usr/bin/${_name,,}"
install -vDm644 -t "$pkgdir/usr/share/doc/$pkgname" ./*.md
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}
|