diff options
author | Klaus Alexander Seistrup | 2024-07-05 21:24:35 +0200 |
---|---|---|
committer | Klaus Alexander Seistrup | 2024-07-05 21:24:35 +0200 |
commit | b5c7d8c86d2177bd1c5846e867fa64af310c0b68 (patch) | |
tree | f7d9556348f4f293cb7608f4c3d8e908da71cc5d /PKGBUILD | |
download | aur-b5c7d8c86d2177bd1c5846e867fa64af310c0b68.tar.gz |
Initial AUR commit (upstream v0.2.2)
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fd566783fe6d --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,68 @@ +# -*- mode: sh -*- + +# Maintainer: Klaus Alexander Seistrup <$(echo 0x1fd+d59decfa=40 | tr 0-9+a-f=x ka-i@p-u.l)> + +pkgname='json-bash-git' +_pkgname="${pkgname/-git}" +_srcname="${_pkgname/-/.}" +pkgver=0.2.2.r17.g5aacc24 +pkgrel=1 +epoch= +pkgdesc='Command-line tool and bash library that creates JSON (latest git commit)' +arch=('any') +url="https://github.com/h4l/$_srcname" +license=('MIT') # SPDX-License-Identifier: MIT +depends=('bash') +makedepends=('git') +#optdepends=('python: needed to run some of the documentation scripts') +provides=("$_pkgname") +conflicts=("$_pkgname") +source=("git+$url.git") +sha256sums=('SKIP') + +pkgver() { + cd "$_srcname" + + git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' +} + +build() { + cd "$_srcname" + + ./json.bash --version +} + +package() { + cd "$_srcname" + + install -vDm0755 -t "$pkgdir/usr/bin" \ + "bin/$_srcname" + install -vDm0644 -t "$pkgdir/usr/share/doc/$pkgname" \ + CHANGELOG.md README.md + install -vDm0644 -t "$pkgdir/usr/share/licenses/$pkgname" \ + LICENSE.md + + cp -vfa examples hack "$pkgdir/usr/share/doc/$pkgname/" + + cd 'bin' + + _sources=( + 'jb-cat' + 'jb-echo' + 'jb-stream' + ) + install -vDm0755 -t "$pkgdir/usr/bin" "${_sources[@]}" + + cd "$pkgdir/usr/bin" + + _symlinks=( + 'jb' + 'jb-array' + 'jb-object' + ) + for _target in "${_symlinks[@]}"; do + ln -srvf "$_srcname" "$_target" + done +} + +# eof |