summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 20541d7c61108ecc98754f269a4e79d714b4db11 (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
# Maintainer: Paul <pb.orzel@proton.me>

_pkgname="guppy"
pkgname="guppy-git"
pkgver=0.2.5.r32.g22ac423
pkgrel=2
pkgdesc="Tool to manage your installations from Git Repositories for you"
arch=('i686' 'pentium4' 'x86_64' 'arm' 'armv7h' 'armv6h' 'aarch64')
url="https://gitlab.com/Teddy-Kun/guppy"
license=('GPL-3')
depends=(
'libgit2'
'openssl'
'gcc-libs'
'glibc'
)
makedepends=(
'cargo'
'git'
)
optdepends=(
'bash: the default_make is a bash script'
'nano: default editor for the makefiles'
)
source=("git+https://gitlab.com/Teddy-Kun/guppy.git/")
conflicts=("${_pkgname}")
provides=("${_pkgname}")
sha256sums=('SKIP')

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

prepare() {
    cd "$srcdir/$_pkgname"
    export RUSTUP_TOOLCHAIN=stable
    export CARGO_TARGET_DIR=target
    cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
}

build() {
	cd "$srcdir/$_pkgname"
	RUSTFLAGS="${RUSTFLAGS} -C link-arg=-lssh2" cargo b --frozen --release
}

package() {
	cd "$srcdir/$_pkgname"
	mkdir -p "$pkgdir/usr/share/guppy"
	install -Dm755 target/release/guppy -t "${pkgdir}/usr/bin/"
	install -Dm755 resources/default_make.guppy -t "$pkgdir/usr/share/guppy/"
}