summaryrefslogtreecommitdiff
path: root/user/alsa-plugins/APKBUILD
blob: 1dee01738a2d9f3a698ee660599c89c1d7935f7b (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
# Contributor: Taner Tas <taner76@gmail.com>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=alsa-plugins
pkgver=1.1.9
pkgrel=0
pkgdesc="Advanced Linux Sound Architecture (ALSA) plugins"
url="https://www.alsa-project.org/main/index.php/Main_Page"
arch="all"
options="!check"  # No test suite.
license="GPL-2.0+ AND LGPL-2.1+ AND BSD-3-Clause AND MIT"
makedepends="linux-headers alsa-lib-dev speexdsp-dev ffmpeg-dev
	libsamplerate-dev pulseaudio-dev"
subpackages="$pkgname-lavcrate $pkgname-pulse $pkgname-a52"
source="ftp://ftp.alsa-project.org/pub/plugins/$pkgname-$pkgver.tar.bz2"

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

package() {
	make DESTDIR="$pkgdir" install
	find "$pkgdir" -name '*.la' -type f -delete
	rm "$pkgdir"/etc/alsa/conf.d/*.conf
}

lavcrate() {
	pkgdesc="FFmpeg samplerate conversion plugins for ALSA"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/ \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
	mv "$pkgdir"/usr/lib/alsa-lib/*lavrate* "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/share/alsa/alsa.conf.d/*rate-lav* \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
}

pulse() {
	pkgdesc="PulseAudio support for ALSA-only applications"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/ \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
	mv "$pkgdir"/usr/lib/alsa-lib/*pulse.so "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/share/alsa/alsa.conf.d/*pulse* \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
	mv "$pkgdir"/etc/alsa/conf.d/*pulse* \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
}

a52() {
	pkgdesc="S16 linear sound format to A52 compressed format for SPDIF output"
	mkdir -p "$subpkgdir"/usr/lib/alsa-lib/ \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
	mv "$pkgdir"/usr/lib/alsa-lib/*a52.so "$subpkgdir"/usr/lib/alsa-lib/
	mv "$pkgdir"/usr/share/alsa/alsa.conf.d/*a52* \
		"$subpkgdir"/usr/share/alsa/alsa.conf.d/
}

sha512sums="1969dfe8f2bb4283e81a18da73d2f7f86d8788d1a8764d7195b4830b2f4704c208eacb50a1e26e20c9fe57e7d5bb06a004112d84cc86b4682b4180d2fec4d5d9  alsa-plugins-1.1.9.tar.bz2"