summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8e58183b7e699eeaa00c81733ae1d9c92c282597 (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
# Maintainer: Kevin Sanchez <kucashu@outlook.com>
# Maintainer: zhullyb <5435486@qq.com>
# Maintainer: DuckSoft <realducksoft@gmail.com>

pkgname=fgit-go
pkgver=076
pkgrel=1
pkgdesc="A tool to do git operation with fastgit easily"
arch=('x86_64')
url="https://github.com/fastgitorg/fgit-go"
license=('GPL3')
depends=('git' 'glibc')
makedepends=('go')
provides=('fgit')
conflicts=('fgit')
source=("$pkgname-$pkgver::git+$url#tag=$pkgver")
sha512sums=('SKIP')

build() {
    cd "$srcdir"/$pkgname-$pkgver
    
    CGO_ENABLED=1 GO111MODULE=off go build -v \
        -buildmode=pie -trimpath \
        -ldflags="-s -w -X main.version=`cat version` -X 'main.timestamp=`date +'%Y-%m-%d %H:%M:%S'`' -extldflags=-Wl,-z,now,-z,relro" \
        -o fgit ./src/fgit.go
}

package() {
    cd "$srcdir"/$pkgname-$pkgver
    
    install -Dm755 -t "$pkgdir"/usr/bin/                ./fgit
    install -Dm644 -t "$pkgdir"/usr/share/doc/fgit-go   ./README.md
}