summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD17
-rw-r--r--fix-libexec-path.patch10
3 files changed, 13 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 34ff5b44783..2ba818d54af 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = bats-core-git
pkgdesc = Bash Automated Testing System
- pkgver = v1.2.0.r26.gb0671a6
+ pkgver = v1.2.1.r16.gda118fd
pkgrel = 1
url = https://github.com/bats-core/bats-core
arch = any
@@ -10,9 +10,7 @@ pkgbase = bats-core-git
provides = bash-bats
conflicts = bash-bats
source = git+https://github.com/bats-core/bats-core
- source = fix-libexec-path.patch
sha256sums = SKIP
- sha256sums = 1195fa67108f42eac2028dabcf65b7dc687ebcfab8c33f34f481bc8d6d4a56dd
pkgname = bats-core-git
diff --git a/PKGBUILD b/PKGBUILD
index e3054e7843f..15224bea61e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_name=bats-core
pkgname=$_name-git
-pkgver=v1.2.0.r26.gb0671a6
+pkgver=v1.2.1.r16.gda118fd
_mainfolder=$_name
pkgrel=1
pkgdesc='Bash Automated Testing System'
@@ -13,9 +13,8 @@ url=https://github.com/bats-core/bats-core
license=(MIT)
depends=(bash)
makedepends=(git)
-source=("git+$url" fix-libexec-path.patch)
-sha256sums=('SKIP'
- '1195fa67108f42eac2028dabcf65b7dc687ebcfab8c33f34f481bc8d6d4a56dd')
+source=("git+$url")
+sha256sums=('SKIP')
conflicts=(bash-bats)
provides=(bash-bats)
@@ -37,10 +36,18 @@ check() {
package() {
cd "$srcdir/$_mainfolder"
- patch -p1 -i "$srcdir/fix-libexec-path.patch"
+ # In Arch Linux the correct path is /usr/lib and not /usr/libexec, see
+ # https://wiki.archlinux.org/index.php/Arch_package_guidelines#Package_etiquette
+ #
+ # Also rename the bats-core/ folder to bats/
+ sed -i 's/BATS_ROOT\/libexec\/bats-core\/bats/BATS_ROOT\/lib\/bats\/bats/g' bin/bats
+
+ # Rename the bats-core/ folder to bats/
+ sed -i 's/BATS_ROOT\/lib\/bats-core\//BATS_ROOT\/lib\/bats\//g' libexec/bats-core/*
install -dm755 "$pkgdir"/{usr/bin,usr/lib/bats,usr/share/man/man{1,7},usr/share/licenses/$_name}
install -m 755 "bin"/* "$pkgdir/usr/bin"
+ install -m 755 "lib/bats-core"/* "$pkgdir/usr/lib/bats"
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"
diff --git a/fix-libexec-path.patch b/fix-libexec-path.patch
deleted file mode 100644
index e4a119cf089..00000000000
--- a/fix-libexec-path.patch
+++ /dev/null
@@ -1,10 +0,0 @@
-diff --git a/bin/bats b/bin/bats
-index a852306..ce7f883 100755
---- a/bin/bats
-+++ b/bin/bats
-@@ -66,4 +66,4 @@ bats_resolve_absolute_root_dir() {
-
- export BATS_ROOT
- bats_resolve_absolute_root_dir "$0" 'BATS_ROOT'
--exec env BATS_ROOT="$BATS_ROOT" "$BATS_ROOT/libexec/bats-core/bats" "$@"
-+exec env BATS_ROOT="$BATS_ROOT" "$BATS_ROOT/lib/bats/bats" "$@"