diff options
author | Vitalii Kuzhdin | 2024-06-28 08:03:08 +0300 |
---|---|---|
committer | Vitalii Kuzhdin | 2024-06-28 08:03:08 +0300 |
commit | c3108cc310938de538a89114504649fc8a6525aa (patch) | |
tree | 71a5f55969a6af6f333454b6526a902b80eea4ce | |
download | aur-flow-cli-git.tar.gz |
Initial build (1.20.5)
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 47 |
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..9ac849ce2daf --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = flow-cli-git + pkgdesc = A command-line interface that provides useful utilities for building Flow applications + pkgver = 1.20.5 + pkgrel = 1 + url = https://docs.onflow.org/flow-cli + arch = any + license = Apache-2.0 + makedepends = git + makedepends = make + makedepends = go + depends = glibc + provides = flow=1.20.5 + conflicts = flow + source = flow-cli::git+https://github.com/onflow/flow-cli.git + sha256sums = SKIP + +pkgname = flow-cli-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..0c040afd635e --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: vitaliikuzhdin <vitaliikuzhdin@gmail.com> + +_binname="flow" +_pkgname="${_binname}-cli" +pkgname="${_pkgname}-git" +pkgver=1.20.5 +pkgrel=1 +pkgdesc="A command-line interface that provides useful utilities for building Flow applications" +arch=('any') +url="https://docs.onflow.org/${_pkgname}" +_url="https://github.com/onflow/${_pkgname}" +license=('Apache-2.0') +depends=('glibc') +makedepends=('git' 'make' 'go') +provides=("${_binname}=${pkgver%%.r*}") +conflicts=("${_binname}") +_pkgsrc="${_pkgname}" +source=("${_pkgsrc}::git+${_url}.git") +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgsrc}" + git describe --long --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/${_binname}" "./cmd/${_binname}" + make +} + +package() { + cd "${srcdir}/${_pkgsrc}" + install -Dm755 "cmd/${_binname}/${_binname}" "${pkgdir}/usr/bin/${_binname}" + install -Dm644 "README.md" "${pkgdir}/usr/share/doc/${_binname}/README.md" + install -Dm644 "LICENSE" "${pkgdir}/usr/share/licenses/${_binname}/LICENSE" +} |