aboutsummaryrefslogtreecommitdiffstats
path: root/testing/pipexec/APKBUILD
blob: 2da7b8293ebcefaf5678fcab57554bf2ea0aafbe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=pipexec
pkgver=2.5.5
pkgrel=1
pkgdesc="Handling pipe of commands like a single command"
url="https://github.com/flonatel/pipexec"
arch="all"
license="GPL-2.0"
subpackages="$pkgname-doc"
source="https://github.com/flonatel/pipexec/releases/download/$pkgver/$pkgname-$pkgver.tar.xz
	dont-require-bash.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

# Note: make check actually does not run any tests.
check() {
	local out

	out=$("$builddir"/bin/pipexec -- \
		[A /bin/echo 'Hello, world!' ] [B /bin/grep -o world ] '{A:1>B:0}')
	[ "$out" = world ]
}

package() {
	cd "$builddir"

	make DESTDIR="$pkgdir" install

	rm "$pkgdir"/usr/bin/ptest

	mkdir -p "$pkgdir"/usr/share/man/man1
	cp doc/man/*.1 "$pkgdir"/usr/share/man/man1/
}

sha512sums="5f33f42ffec1e16090491895fb7403de6c0fcdf99e0fef7a49db19684b261a355ab0e0364891d1dfdaf47ff32671f2725d5e236df29e3f3feb5484cd8ffca0ca  pipexec-2.5.5.tar.xz
b0959c98aea9f3b6580101cfaf65480c3460eebadf377cbdf70f33ff431b731e5e3128efe848dd9678bcfcfd8f8f01dedee520614cd754a617c09b1a2e82c705  dont-require-bash.patch"