aboutsummaryrefslogtreecommitdiffstats
path: root/testing/alsa-plugins/APKBUILD
blob: 17e734cc88eefd91eb3adcaa1fd9fe4356fc2436 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=alsa-plugins
pkgver=1.1.7
pkgrel=2
pkgdesc="Advanced Linux Sound Architecture (ALSA) plugins"
url="http://www.alsa-project.org"
arch="all !s390x"
license="GPL-2.0-or-later LGPL-2.1-or-later"
makedepends="linux-headers alsa-lib-dev speex-dev ffmpeg-dev libsamplerate-dev pulseaudio-dev jack-dev"
subpackages="$pkgname-pulse $pkgname-doc $pkgname-lavrate $pkgname-a52 $pkgname-jack"
source="ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$pkgver.tar.bz2
	$pkgname-$pkgver-double_free_fix.patch"

prepare() {
	default_prepare
	update_config_sub
}

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

check(){
	cd "$builddir"
	make check
}

doc() {
	default_doc
	mkdir -p "$subpkgdir"/usr/share/doc/$pkgname
	cat > "$subpkgdir"/usr/share/doc/$pkgname/README.alpine <<EOF
	==> please note that alsa-plugins-lavcrate has been renamed to lavrate.
	==> So you need to run: apk add alsa-plugins-lavrate
EOF
}

lavrate() {
	pkgdesc="FFmpeg samplerate conversion plugins for alsa"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/lib/alsa-lib/*lavrate* "$subpkgdir"/usr/lib/alsa-lib/
}

pulse() {
	pkgdesc="Pulseaudio support plugins for alsa-only applications"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/lib/alsa-lib/*pulse.so "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/share "$subpkgdir"/usr/
}

a52() {
	pkgdesc="Converts S16 linear sound format to A52 compressed format and sends it to an SPDIF output"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/lib/alsa-lib/*a52.so "$subpkgdir"/usr/lib/alsa-lib/
}

jack() {
	pkgdesc="Allows native ALSA applications to work with jackd"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/lib/alsa-lib/*jack.so "$subpkgdir"/usr/lib/alsa-lib/
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	find $pkgdir -name *.la -type f -exec rm -f {} \;
}

sha512sums="c3bb22ec3c5a167fb246cfc94131d53800e321b486ab743c3395a9d91dee0ff9703f6e4a2feaea5a4ee42a7e486d835d48ab880c784c5c34bb4eb5e9ded06d8e  alsa-plugins-1.1.7.tar.bz2
a57d1fe16ac51bd3010ba9ee705bd4d32e339f5f35ff7388910ecf0b8024d491d38a573a730f0a5a640cb688d7fadac05ca1e0162a08beb397e7fc0883c15a25  alsa-plugins-1.1.7-double_free_fix.patch"