summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Schröder2020-04-01 22:48:49 +0200
committerAndre Schröder2020-04-01 22:48:49 +0200
commit9ae050848c9d2f30e43d7281ad9a8594d95b46cc (patch)
treed0469d292c9a8ed2b6a0adc3b3c089240967b24f
downloadaur-9ae050848c9d2f30e43d7281ad9a8594d95b46cc.tar.gz
Initial upload: bats-core-git r13.045eb7d-1
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD46
-rw-r--r--fix-libexec-path.patch10
3 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..71db683b074
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = bats-core-git
+ pkgdesc = Bash Automated Testing System
+ pkgver = r13.045eb7d
+ pkgrel = 1
+ url = https://github.com/bats-core/bats-core
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = bash
+ provides = bash-bats
+ conflicts = bash-bats
+ source = git+https://github.com/bats-core/bats-core
+ source = fix-libexec-path.patch
+ sha256sums = SKIP
+ sha256sums = 2866f0d1a0c3797046d5b0734868281c0f7595cae4f9392ec31e3de9bfb1aa2e
+
+pkgname = bats-core-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..761d0dbf6b8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Andre Schröder <andre.schroedr at gmail dot com>
+
+# All my PKGBUILDs are managed at https://github.com/schra/pkgbuilds
+
+pkgname=bats-core-git
+pkgver=r13.045eb7d
+pkgrel=1
+pkgdesc='Bash Automated Testing System'
+arch=('any')
+url='https://github.com/bats-core/bats-core'
+license=('MIT')
+depends=('bash')
+makedepends=('git')
+source=("git+$url" fix-libexec-path.patch)
+sha256sums=('SKIP'
+ '2866f0d1a0c3797046d5b0734868281c0f7595cae4f9392ec31e3de9bfb1aa2e')
+conflicts=(bash-bats)
+provides=(bash-bats)
+
+pkgver() {
+ cd "$srcdir/$_name"
+
+ # from https://wiki.archlinux.org/index.php/VCS_package_guidelines#Git
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+check() {
+ cd "${srcdir}/bats-core"
+ bin/bats --tap test
+}
+
+package() {
+ cd "${srcdir}/bats-core"
+
+ patch -p1 -i "${srcdir}/fix-libexec-path.patch"
+
+ install -dm755 "${pkgdir}"/{usr/bin,usr/lib/bats,usr/share/man/man{1,7},usr/share/licenses/${pkgname}}
+ install -m 755 "bin"/* "${pkgdir}/usr/bin"
+ install -m 755 "libexec/bats-core"/* "${pkgdir}/usr/lib/bats"
+ install -m 644 "man/bats.1" "${pkgdir}/usr/share/man/man1"
+ install -m 644 "man/bats.7" "${pkgdir}/usr/share/man/man7"
+ install -m 644 LICENSE.md "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE.md
+}
diff --git a/fix-libexec-path.patch b/fix-libexec-path.patch
new file mode 100644
index 00000000000..bc8b5c78a39
--- /dev/null
+++ b/fix-libexec-path.patch
@@ -0,0 +1,10 @@
+diff --git a/bin/bats b/bin/bats
+index a852306..ce7f883 100755
+--- a/bin/bats
++++ b/bin/bats
+@@ -47,4 +47,4 @@ bats_resolve_absolute_root_dir() {
+
+ export BATS_ROOT
+ bats_resolve_absolute_root_dir "$0" 'BATS_ROOT'
+-exec "$BATS_ROOT/libexec/bats-core/bats" "$@"
++exec "$BATS_ROOT/lib/bats/bats" "$@"