summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 401a78669e7abfb170677fce118ada5d7f78ec86 (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
# Maintainer: Alexandre Bouvier <contact@amb.tf>
pkgbase=foobar2000-encoders
pkgname=({,lib32-}"$pkgbase")
_pkgver=2025-05-07
pkgver=${_pkgver//-/}
pkgrel=1
pkgdesc="Encoder binaries for the Converter component"
arch=('any')
url="https://www.foobar2000.org/encoderpack"
license=('Apache-2.0 AND BSD-3-Clause AND GPL-2.0-only AND LGPL-2.0-only')
groups=('foobar2000')
makedepends=('p7zip')
optdepends=('foobar2000>=1.1.14')
source=("https://www.foobar2000.org/files/Free_Encoder_Pack-$_pkgver.exe")
b2sums=('b5fdfd6ed73b9150ce132145122b713b96e237b13760b559d32c0e92a41da456e784df67872aaca9853c685a8f64fa036aa9a5447e6d4455d11263d46c2c37d4')

prepare() {
	7z x -aoa -olib64 Free_Encoder_Pack-$_pkgver.exe
	7z x -aos -olib32 Free_Encoder_Pack-$_pkgver.exe
}

package_foobar2000-encoders() {
	# shellcheck disable=SC2154
	install -Dm755 -t "$pkgdir"/usr/share/foobar2000/encoders \
		lib64/{flac,lame,mpcenc,oggenc2,opusenc,qaac64,refalac64,wavpack}.exe
	install -Dm644 -t "$pkgdir"/usr/share/licenses/$pkgbase \
		lib64/{opusenc,wavpack}_license.txt
}

package_lib32-foobar2000-encoders() {
	pkgdesc+=" (32-bit)"
	provides=("$pkgbase")
	conflicts=("$pkgbase")

	install -Dm755 -t "$pkgdir"/usr/share/foobar2000/encoders \
		lib32/{fhgaacenc,flac,lame,mpcenc,oggenc2,opusenc,qaac,refalac,wavpack}.exe
	install -Dm644 -t "$pkgdir"/usr/share/licenses/lib32-$pkgbase \
		lib32/{fhgaacenc,opusenc,wavpack}_license.txt
}