summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9cc2d87e1cda3c09cd79964d169c648837a24704 (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
# Maintainer: ldev <ldev dot eu dot org>
pkgver=2.2.0
pkgrel=2

pkgname=git-credential-github
pkgdesc="A simple git credentials helper for github"
license=('MIT')
url="https://github.com/Xgames123/$pkgname"
arch=('any')

binname=git-credential-github
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz")
sha256sums=('18578b90ba12cd6da6bda026adeb5e752a3ccd567e5bfa40fec473659743c221')
conflicts=("git-credential-github-git")
replaces=("gh-login")
makedepends=(
cargo
)
optdepends=(
xdg-utils
wl-clipboard
xclip
)

prepare() {
    cd "$srcdir/$pkgname-$pkgver"

    rm -f Cargo.lock
    export RUSTUP_TOOLCHAIN=stable
    cargo fetch
}


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

package() {
    cd "$srcdir/$pkgname-$pkgver"
    install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$binname"
    ln -s "/usr/bin/$binname" "$pkgdir/usr/bin/git-credential-gh-login"
}