# Maintainer: Minecrell <minecrell@minecrell.net>
pkgname="soc-qcom-msm8916"
pkgdesc="Common package for Qualcomm MSM8916 devices"
pkgver=3
pkgrel=1
url="https://postmarketos.org"
license="BSD-3-Clause"
arch="aarch64 armv7"
options="!check !archcheck"
depends="mesa-dri-freedreno"
subpackages="$pkgname-modem"

_ucm_commit="fed543629e6c63429414cf41588cab1c65030775"
source="$pkgname-$_ucm_commit.tar.gz::https://github.com/msm8916-mainline/alsa-ucm-conf/archive/$_ucm_commit.tar.gz"

package() {
	cd "$srcdir/alsa-ucm-conf-$_ucm_commit"/ucm2
	find msm8916 samsung-a2015 codecs/msm8916-wcd platforms/msm8916 \
		-type f -name "*.conf" \
		-exec install -Dm644 {} "$pkgdir"/usr/share/alsa/ucm2/{} \;
}

modem() {
	depends="msm-modem-mainline"
	mkdir "$subpkgdir"
}

sha512sums="3eff5f37d3ce515b9efd1c9e99960063ce0f2859d65ca4d8a871e5aa6828f699cb6fb3c01f8c41dfefa79a36ef298a04dcbde54cd65a6d6507af6cc141db3b8b  soc-qcom-msm8916-fed543629e6c63429414cf41588cab1c65030775.tar.gz"
