diff options
author | Claudia Pellegrino | 2022-10-01 19:53:40 +0200 |
---|---|---|
committer | Claudia Pellegrino | 2022-10-01 21:22:39 +0200 |
commit | 623596d47b35a51604bc152affa310002f603492 (patch) | |
tree | bd4a2cc802b8bcb50ff6e80078edb69bdf5d3122 | |
download | aur-623596d47b35a51604bc152affa310002f603492.tar.gz |
xxenv-latest v0.2.1
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | .editorconfig | 20 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 69 |
4 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0702b40e71ce --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = xxenv-latest + pkgdesc = Enhances **env with a `latest` subcommand, which prints the latest version of the target platform + pkgver = 0.2.1 + pkgrel = 1 + url = https://github.com/momo-lab/xxenv-latest + arch = any + license = MIT + makedepends = goenv + makedepends = nodenv + options = !strip + source = xxenv-latest-0.2.1.tar.gz::https://github.com/momo-lab/xxenv-latest/archive/v0.2.1.tar.gz + sha512sums = c1e0d3c0c95ab9486f0b37b1078d3c8ea81df9639c41b85dabae2742ba91962bb18fa2682e1cdbe67ef559a5e3e14cac9fb5a5f8e33a7cedabec520f97e2b102 + +pkgname = goenv-latest + pkgdesc = Enhances goenv with a `latest` subcommand, which prints the latest Go version + depends = goenv + +pkgname = nodenv-latest + pkgdesc = Enhances nodenv with a `latest` subcommand, which prints the latest Node.js version + depends = nodenv + +pkgname = pyenv-latest + pkgdesc = Enhances pyenv with a `latest` subcommand, which prints the latest Python version + depends = pyenv + +pkgname = rbenv-latest + pkgdesc = Enhances rbenv with a `latest` subcommand, which prints the latest Ruby version + depends = rbenv diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..29215c86a3df --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.{diff,patch}] +end_of_line = lf +trim_trailing_whitespace = false + +[PKGBUILD] +indent_size = 2 + +[*.json] +indent_size = 2 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..37dd117487ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +/.vscode/ +/src +/pkg +*.log +*.pkg.* +*.tar.* +*.zip diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2e04b0d76f1f --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,69 @@ +# Maintainer: Claudia Pellegrino <aur ät cpellegrino.de> + +pkgbase=xxenv-latest +pkgname=('goenv-latest' 'nodenv-latest' 'pyenv-latest' 'rbenv-latest') +pkgver=0.2.1 +pkgrel=1 +pkgdesc="Enhances **env with a \`latest\` subcommand, which prints the latest version of the target platform" +arch=('any') +url='https://github.com/momo-lab/xxenv-latest' +license=('MIT') +makedepends=('goenv' 'nodenv') +options=('!strip') + +source=( + "${pkgbase}-${pkgver}.tar.gz::https://github.com/momo-lab/xxenv-latest/archive/v${pkgver}.tar.gz" +) + +sha512sums=( + 'c1e0d3c0c95ab9486f0b37b1078d3c8ea81df9639c41b85dabae2742ba91962bb18fa2682e1cdbe67ef559a5e3e14cac9fb5a5f8e33a7cedabec520f97e2b102' +) + +_pkgdesc() { + printf "Enhances %s with a \`latest\` subcommand, which prints the latest %s version" \ + "${pkgname%-latest}" "${1?}" +} + +# shellcheck disable=SC2128 +_package() { + local target_bindir + target_bindir="${1:-/usr/lib/${pkgname%-latest}/libexec}" + + echo >&2 "Packaging the ${pkgname} executable" + cd "${srcdir}/${pkgbase}-${pkgver}" + # We can pick just the one symlink we need and ignore the rest, + # because `install` will copy the content of the symlink source. + install -D -m 755 -t "${pkgdir}${target_bindir}" "bin/${pkgname}" + + echo >&2 'Packaging the license' + install -D -m 644 -t "${pkgdir}/usr/share/licenses/${pkgname}" \ + 'LICENSE' + + echo >&2 'Packaging README.md' + install -D -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" \ + 'README.md' +} + +package_goenv-latest() { + pkgdesc="$(_pkgdesc 'Go')" + depends=('goenv') + _package +} + +package_nodenv-latest() { + pkgdesc="$(_pkgdesc 'Node.js')" + depends=('nodenv') + _package +} + +package_pyenv-latest() { + pkgdesc="$(_pkgdesc 'Python')" + depends=('pyenv') + _package "/usr/share/pyenv/plugins/${pkgbase}/bin" +} + +package_rbenv-latest() { + pkgdesc="$(_pkgdesc 'Ruby')" + depends=('rbenv') + _package +} |