aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shntool/APKBUILD
blob: a81edcc637d2b346892942741ffb73d7b4c3bc72 (plain) (blame)
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Jean-Louis Fuchs <jean-louis.fuchs@adfinis-sygroup.ch>
pkgname=shntool
pkgver=3.0.10
pkgrel=3
pkgdesc="A multi-purpose WAVE data processing and reporting utility"
url="http://shnutils.freeshell.org/shntool/"
arch="all"
license="GPL-2.0-or-later"
makedepends="sox"
subpackages="$pkgname-doc"
source="http://shnutils.freeshell.org/shntool/dist/src/shntool-$pkgver.tar.gz
	shntool-3.0.10-large-size.patch
	shntool-3.0.10-large-times.patch
	"


build() {
	update_config_sub
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

check() {
	# Check if shntools are operational
	mkdir -p "$builddir/test"
	cd "$builddir/test"
	ln -s ../src/shntool shninfo
	ln -s ../src/shntool shncue
	ln -s ../src/shntool shnsplit
	ln -s ../src/shntool shnjoin
	ln -s ../src/shntool shncmp
	sox -r 44100 -b 16 -n beat1.wav synth 0.4 sin 347 sin 357 vol 0.5
	sox -r 44100 -b 16 -n beat2.wav synth 0.5 sin 359 sin 357 vol 0.5
	sox -r 44100 -b 16 -n beat3.wav synth 0.6 sin 459 sin 438 vol 0.5
	./shninfo beat1.wav | grep -q 70604
	./shninfo beat2.wav | grep -q 88244
	./shncue beat1.wav beat2.wav beat3.wav > joined.cue
	./shnjoin beat1.wav beat2.wav beat3.wav
	./shninfo joined.wav | grep -q 265820
	./shnsplit -f joined.cue joined.wav
	./shninfo split-track01.wav | grep -q 70604
	./shninfo split-track03.wav | grep -q 105884
	./shncmp split-track01.wav beat1.wav
	./shncmp split-track02.wav beat2.wav
	cd "$builddir"
	rm -r test
}

sha512sums="2150d7123860abb54a56a1615bda991ed3713d73c338723f28b7d01a63c49a47809be16dc57b5b4edeee1567b003f9a4b54945c1cd08440f9503d22b91eaa06d  shntool-3.0.10.tar.gz
fc44bca63d79b279db6d275caaacdb73cbebd6b902276a9052f005146fa125f4674e3cf559d46405637a337192f4a38f9bec4836af46e7ae52e4f220352c1ba7  shntool-3.0.10-large-size.patch
9780f22d93e20dd01d18067978bdf6cbb0b460bb80f41c4f4752b3322c3d70182b3acf35b789e30fc36ca52af6127e24c00599fb49b916f01448613721a94ebe  shntool-3.0.10-large-times.patch"