# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=fdkaac
pkgver=1.0.5
pkgrel=1
pkgdesc="Command line frontend for libfdk-aac"
url="https://github.com/nu774/fdkaac"
arch="all"
license="BSD-4-Clause AND MIT AND Zlib"
makedepends="autoconf automake fdk-aac-dev"
subpackages="$pkgname-doc"
source="https://github.com/nu774/fdkaac/archive/v$pkgver/fdkaac-$pkgver.tar.gz"
options="!check" # no testsuite

# secfixes:
#   1.0.3-r0:
#     - CVE-2022-36148
#     - CVE-2022-37781

prepare() {
	default_prepare
	autoreconf -vfi
}

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

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

sha512sums="
ef87bdfea5f83e07cf481a5baafcc531de7923eba09a833451119f88bed375b817575d3148aae7c0f321e0b6532a6d99202f62d699d3cf688cdcbee9af746a91  fdkaac-1.0.5.tar.gz
"
