diff options
author | yunielrc87 | 2023-02-22 17:58:10 -0500 |
---|---|---|
committer | yunielrc87 | 2023-02-22 18:02:11 -0500 |
commit | ac4cf898f7926820037eba59cc4b4d9d6572c462 (patch) | |
tree | 4f79677da549bb4e5a352e4f32400ff5a4185497 | |
download | aur-bash-bats-support-git.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 13 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | bash-bats-support-git.install | 4 |
3 files changed, 53 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..cf703f6f3b28 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,13 @@ +pkgbase = bash-bats-support-git + pkgdesc = Supporting library for Bats test helpers + pkgver = 0.3.0 + pkgrel = 1 + url = https://github.com/bats-core/bats-support + install = bash-bats-support-git.install + arch = any + license = CCPL + depends = bash-bats + source = https://github.com/bats-core/bats-support/archive/v0.3.0/bash-bats-support-git-0.3.0.tar.gz + sha256sums = 7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f + +pkgname = bash-bats-support-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..178bff8e2e95 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: yunielrc87 <yunielrc87[at]gmail[dot]com> +pkgname=bash-bats-support-git +pkgver=0.3.0 +pkgrel=1 +pkgdesc="Supporting library for Bats test helpers" +arch=('any') +url="https://github.com/bats-core/bats-support" +license=('CCPL') +depends=('bash-bats') +install="$pkgname.install" +source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz") +sha256sums=('7815237aafeb42ddcc1b8c698fc5808026d33317d8701d5ec2396e9634e2918f') + +pkgver() { + git -c 'versionsort.suffix=-' ls-remote --exit-code --refs --sort='version:refname' --tags "$url" '*.*.*' | tail -n 1 | cut -d '/' -f 3 | sed 's/^v//' +} + +check() { + cd "bats-support-${pkgver}" + echo "tests contains sudo invocation, will avoid to run them" + #TEST_DEPS_DIR="/usr/lib/" bats test +} + +package() { + cd "bats-support-${pkgver}" + + for fn in *.bash; do + install -Dm755 ${fn} "${pkgdir}/usr/lib/${pkgname}/$(basename $fn)" + done + + for fn in src/*.bash; do + install -Dm755 ${fn} "${pkgdir}/usr/lib/${pkgname}/src/$(basename $fn)" + done + + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" +} diff --git a/bash-bats-support-git.install b/bash-bats-support-git.install new file mode 100644 index 000000000000..c736297cc009 --- /dev/null +++ b/bash-bats-support-git.install @@ -0,0 +1,4 @@ +post_install() { + echo -e "\nTo use bats-support library add this line\nto your bats test or common_setup function" + echo -e '\nload "/usr/lib/bash-bats-support-git/load.bash" \n' +} |