diff options
-rw-r--r-- | .SRCINFO | 14 | ||||
-rw-r--r-- | PKGBUILD | 36 |
2 files changed, 50 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..27e467b7f6b3 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,14 @@ +pkgbase = gitlab-glab + pkgdesc = GLab is an open source Gitlab Cli tool written in Go (golang) to help work seamlessly with Gitlab from the command line. + pkgver = 1.7.0 + pkgrel = 1 + url = https://github.com/profclems/glab + arch = x86_64 + license = MIT + makedepends = go + depends = glibc + source = gitlab-glab-1.7.0.tar.gz::https://github.com/profclems/glab/archive/v1.7.0.tar.gz + sha256sums = ae8ad263d5d5d157b93053660e0a0c21f4c46472365240f75412cdf06d098a36 + +pkgname = gitlab-glab + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ec0b0a155013 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: w0rty <mawo97 at gmail.com> + +pkgname=gitlab-glab +_realpkgname=glab +pkgver=1.7.0 +pkgrel=1 +pkgdesc='GLab is an open source Gitlab Cli tool written in Go (golang) to help work seamlessly with Gitlab from the command line.' +arch=('x86_64') +url="https://github.com/profclems/glab" +license=('MIT') +makedepends=('go') +depends=('glibc') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") +sha256sums=('ae8ad263d5d5d157b93053660e0a0c21f4c46472365240f75412cdf06d098a36') + +prepare(){ + cd "${_realpkgname}-${pkgver}" + mkdir -p build/ +} + +build() { + export GOPATH="$srcdir"/gopath + cd "${_realpkgname}-$pkgver" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + _builddate=$(date -u +%Y-%m-%d) + go build -o build -trimpath -buildmode=pie -ldflags "-extldflags \"${LDFLAGS}\" -X glab.version=${pkgver} -X glab.build=${_builddate} -s -w" -modcacherw ./cmd/glab/main.go +} + +package() { + cd "${_realpkgname}-$pkgver" + install -Dm755 build/main "$pkgdir"/usr/bin/${_realpkgname} + install -Dm644 $srcdir/${_realpkgname}-$pkgver/LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE" +} |