summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dfa73cf153455cee36ec36cd74f56ee510da08f2 (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.1.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=('9536717baacc1def9723b059e3e635dd7d425f5f6e427dc29ba1a89cb92e5250')
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"
}