diff options
author | Vitalii Kuzhdin | 2024-06-28 13:02:24 +0300 |
---|---|---|
committer | Vitalii Kuzhdin | 2024-06-28 13:02:24 +0300 |
commit | 3fd39735406dd8d40c5a3fe874fab29d670dc13c (patch) | |
tree | 1b808199f76affa1662cf3ded413f475f2843592 | |
download | aur-3fd39735406dd8d40c5a3fe874fab29d670dc13c.tar.gz |
Initial build (0.1.6)
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 44 |
3 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..4b267a890f80 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = resto-git + pkgdesc = Send pretty HTTP & API requests with TUI + pkgver = 0.1.6.r152.g9dc9d35 + pkgrel = 1 + url = https://github.com/abdfnx/resto + arch = any + license = MIT + makedepends = git + makedepends = go + depends = glibc + provides = resto=0.1.6 + conflicts = resto + source = resto::git+https://github.com/abdfnx/resto.git + sha256sums = SKIP + +pkgname = resto-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..640eb079cf52 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,44 @@ +# Maintainer: vitaliikuzhdin <vitaliikuzhdin@gmail.com> + +_pkgname="resto" +pkgname="${_pkgname}-git" +pkgver=0.1.6.r152.g9dc9d35 +pkgrel=1 +pkgdesc="Send pretty HTTP & API requests with TUI" +arch=('any') +url="https://github.com/abdfnx/${_pkgname}" +license=('MIT') +depends=('glibc') +makedepends=('git' 'go') +provides=("${_pkgname}=${pkgver%%.r*}") +conflicts=("${_pkgname}") +_pkgsrc="${_pkgname}" +source=("${_pkgsrc}::git+${url}.git") +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgsrc}" + git describe --long --tags --abbrev=7 | sed 's/v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/${_pkgsrc}" + [ -d "build" ] || mkdir "build" +} + +build() { + cd "${srcdir}/${_pkgsrc}" + export CGO_CPPFLAGS="${CPPFLAGS}" + export CGO_CFLAGS="${CFLAGS}" + export CGO_CXXFLAGS="${CXXFLAGS}" + export CGO_LDFLAGS="${LDFLAGS}" + export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw" + go build -o "build/${_pkgname}" . +} + +package() { + cd "${srcdir}/${_pkgsrc}" + install -Dm755 "build/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" + install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_pkgname}/README.md" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_pkgname}/LICENSE" +} |