diff options
author | Helton Reis | 2021-12-21 14:54:36 -0300 |
---|---|---|
committer | Helton Reis | 2021-12-21 14:54:36 -0300 |
commit | d08e6c7eb34df1a9812aea4c48da42b8ac79a002 (patch) | |
tree | e452868e9934b4dbabc4da91834e7a6665a3b1c3 | |
parent | b9c3a784976745794d9c65e3da5a95b5020d3eb5 (diff) | |
download | aur-d08e6c7eb34df1a9812aea4c48da42b8ac79a002.tar.gz |
[misc] Update to version 2.0, written in Go
-rw-r--r-- | .SRCINFO | 9 | ||||
-rwxr-xr-x | .gitignore | 2 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 28 insertions, 23 deletions
@@ -1,15 +1,14 @@ pkgbase = gitgudcli-git pkgdesc = An easy to use CLI for the GitGud modular Git model. - pkgver = 1.1.0 + pkgver = 2.0.0.r3.g0fc86a6 pkgrel = 1 - url = https://github.com/HRKings/GitGudCLI.git + url = https://github.com/HRKings/gitgud-cli.git arch = any license = unknown makedepends = git - makedepends = dotnet-sdk + makedepends = go provides = gitgudcli - options = !strip - source = git+https://github.com/HRKings/GitGudCLI.git + source = git+https://github.com/HRKings/gitgud-cli.git md5sums = SKIP pkgname = gitgudcli-git diff --git a/.gitignore b/.gitignore index 0271c7a238ea..36e7fff77797 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -GitGudCLI/ +gitgud-cli/ *.pkg.tar.* src/ srcdir/ @@ -1,33 +1,39 @@ # Maintainer: HRKings <hrkings@***.com> pkgname=gitgudcli-git -_pkgname=GitGudCLI -pkgver=1.1.0 +_pkgname=gitgud-cli +pkgver=2.0.0.r3.g0fc86a6 pkgrel=1 pkgdesc="An easy to use CLI for the GitGud modular Git model." arch=(any) -url="https://github.com/HRKings/GitGudCLI.git" +url="https://github.com/HRKings/gitgud-cli.git" license=('unknown') -makedepends=('git' 'dotnet-sdk') +makedepends=('git' 'go') provides=(gitgudcli) source=("git+${url}") md5sums=('SKIP') -options=(!strip) -package() { - cd ${_pkgname} +pkgver() { + cd "${_pkgname}" + git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} - # Move to the stable branch - git checkout stable +build() { + cd "${_pkgname}" - # Install the README - install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + # Move to the stable branch + git checkout stable - # Cd into project - cd ${_pkgname} + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" + go build -o ${_pkgname} -ldflags "-extldflags ${LDFLAGS} -s -w -X main.version=${pkgver}" main.go +} - # Compile with all the flags - dotnet publish -c Release -r linux-x64 --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -o ./compiled +package() { + # Install the README + install -Dm644 ${_pkgname}/README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" # Install the CLI - install -Dm755 ./compiled/GitGudCLI "${pkgdir}"/usr/bin/gitgud -}
\ No newline at end of file + install -Dm755 ${_pkgname}/gitgud-cli "${pkgdir}"/usr/bin/gitgud +} |