aboutsummaryrefslogtreecommitdiffstats
path: root/community/alsa-plugins/APKBUILD
blob: ce976d1508a3801f5fd4e628c241f3b22f6077e4 (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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Taner Tas <taner76@gmail.com>
pkgname=alsa-plugins
pkgver=1.2.2
pkgrel=1
pkgdesc="Advanced Linux Sound Architecture (ALSA) plugins"
url="https://www.alsa-project.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.1-or-later"
makedepends="
	alsa-lib-dev
	ffmpeg-dev
	jack-dev
	libsamplerate-dev
	linux-headers
	pulseaudio-dev
	speex-dev
	"
subpackages="
	$pkgname-doc
	$pkgname-pulse
	$pkgname-lavrate
	$pkgname-a52
	$pkgname-jack
	"
source="
	ftp://ftp.alsa-project.org/pub/plugins/alsa-plugins-$pkgver.tar.bz2
	"

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

check() {
	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"
	_mv_lib *lavrate*
	_mv_conf 10-rate-lav.conf
}

pulse() {
	pkgdesc="Pulseaudio support plugins for alsa-only applications"
	install_if="alsa-lib pulseaudio"
	_mv_lib *pulse.so
	_mv_conf *pulseaudio*
	mv "$subpkgdir"/etc/alsa/conf.d/99-pulseaudio-default.conf.example \
		"$subpkgdir"/etc/alsa/conf.d/99-pulseaudio-default.conf
}

a52() {
	pkgdesc="Converts S16 linear sound format to A52 compressed format and sends it to an SPDIF output"
	_mv_lib *a52.so
	_mv_conf 60-a52-encoder.conf
}

jack() {
	pkgdesc="Allows native ALSA applications to work with jackd"
	_mv_lib *jack.so
	_mv_conf 50-jack.conf
}

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

_mv_lib() {
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/

	for i in "$@"; do
	mv "$pkgdir"/usr/lib/alsa-lib/${i} \
		"$subpkgdir"/usr/lib/alsa-lib/
	done
}

_mv_conf() {
	mkdir -p "$subpkgdir"/etc/alsa/conf.d/ \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d

	for i in "$@"; do
	mv "$pkgdir"/usr/share/alsa/alsa.conf.d/${i} \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
	mv "$pkgdir"/etc/alsa/conf.d/${i} \
		"$subpkgdir"/etc/alsa/conf.d/
	done
}

sha512sums="25a7dfaa64be024447d889b5cde668f1308d197f54880548a82d50beb4ac0dbff33b415da1e26dc5229408c934247a9bd38acfb0f82ca388deac0d77ab3cdadb  alsa-plugins-1.2.2.tar.bz2"