pmaports/device/device-fairphone-fp2/APKBUILD
Luca Weiss 1d966578d2
fairphone-fp2: reorganize dependencies (again), add mainline subpackage (!692)
Remove all firmware-support dependencies from the firmware package and
add them to -downstream-firmware and -mainline-firmware packages which
have an install_if on the downstream or mainline kernel subpackage.

[ci:skip-build]: already built successfully in CI
2019-11-17 16:28:30 +01:00

74 lines
2.3 KiB
Text

# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-fairphone-fp2"
pkgdesc="Fairphone 2"
pkgver=2
pkgrel=5
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="postmarketos-base mkbootimg"
makedepends="devicepkg-dev"
source="deviceinfo
FP2.conf
hifi"
subpackages="
$pkgname-kernel-downstream:kernel_downstream
$pkgname-kernel-mainline:kernel_mainline
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-downstream-firmware:downstream_firmware
$pkgname-mainline-firmware:mainline_firmware
$pkgname-alsa
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
kernel_downstream() {
pkgdesc="Downstream kernel"
depends="linux-fairphone-fp2 mesa-dri-swrast ofono"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
kernel_mainline() {
pkgdesc="Mainline kernel"
depends="linux-postmarketos-qcom-msm8974 mesa-dri-freedreno"
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
}
nonfree_firmware() {
pkgdesc="Firmware for WiFi, Audio, etc."
depends="firmware-fairphone-fp2-adsp firmware-fairphone-fp2-modem firmware-fairphone-fp2-wcnss"
mkdir "$subpkgdir"
}
downstream_firmware() {
pkgdesc="Firmware support packages for downstream kernel"
depends="$pkgname-alsa adsp-audio modem-qcom-msm-downstream-common wcnss-wlan"
install_if="$pkgname-kernel-downstream $pkgname-nonfree-firmware"
mkdir "$subpkgdir"
}
mainline_firmware() {
pkgdesc="Firmware support packages for mainline kernel"
depends="modem-qcom-msm-mainline-common firmware-adreno"
install_if="$pkgname-kernel-mainline $pkgname-nonfree-firmware"
mkdir "$subpkgdir"
}
alsa() {
pkgdesc="Audio configuration files"
mkdir -p "$subpkgdir"/usr/share/alsa/ucm/FP2
install -Dm644 "$srcdir"/FP2.conf "$subpkgdir"/usr/share/alsa/ucm/FP2/
install -Dm644 "$srcdir"/hifi "$subpkgdir"/usr/share/alsa/ucm/FP2/
}
sha512sums="43f05596cd1e2759f9b182777211c3ec879fcd1be7d7f1ff94b409c85847ba2715fdf3080c95af5a5b28c35c7e6460cd149208b0291cc54b47a2e6a834096db3 deviceinfo
55360b1ba4ddadea341c9edb13c32ba5f19aabf75ab28602f30cfb79b9df8834f115ef979c70569f23ec1293b1fcd408baf320d87803293ce7106bdc73a26c9f FP2.conf
b834461c6866bb0c473dd089dd5da641dd42a00f610aad6503117aa50fe6e200db9ad0a264bb609f12350d59faee1f772907bacd75439f702ea7d52f6f85e2b1 hifi"