pmaports/device/community/device-pine64-pinephonepro/APKBUILD
Pablo Correa Gómez 7ebf3bfc71
main/device-pine64-pinephone: add logind and upower fwupd plugins (MR 3320)
Otherwise, an update could be allowed even if the phone is not
connected to AC and it might also suspend in the middle of the upgrade
2022-07-27 10:57:31 -04:00

136 lines
3.9 KiB
Text

# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Martijn Braam <martijn@brixit.nl>
pkgname=device-pine64-pinephonepro
pkgdesc="PINE64 PinePhone Pro"
pkgver=3.3
pkgrel=1
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
# pmb:strict is required for grub
options="!check !archcheck pmb:strict"
depends="
alsa-ucm-conf>=1.2.6.2
eg25-manager>=0.4.2
linux-pine64-pinephonepro
mesa-dri-gallium
postmarketos-base
fwupd
fwupd-plugin-fastboot
fwupd-plugin-logind
fwupd-plugin-modem_manager
fwupd-plugin-upower
"
makedepends="
devicepkg-dev
grub
grub-efi
"
subpackages="
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-gnome
"
install="
$pkgname.post-install
$pkgname.post-upgrade
"
source="
51_keyboard.gschema.override
90-modem-eg25.rules
deviceinfo
grub.cfg
grub_early.cfg
ucm/HiFi.conf
ucm/PINE64-PinePhonePro-.conf
ucm/VoiceCall.conf
ppkb.sh
setup-modem.sh
"
build() {
devicepkg_build $startdir $pkgname
grub-mkimage \
--config="$srcdir/grub_early.cfg" \
--prefix="" \
--output="bootaa64.efi" \
--format="arm64-efi" \
--compression="xz" \
\
all_video \
cat \
configfile \
disk \
echo \
efi_gop \
fat \
gzio \
help \
iso9660 \
linux \
ls \
normal \
part_gpt \
part_msdos \
search \
search_label \
test \
true
}
package() {
devicepkg_package $startdir $pkgname
# Grub / bootloader
install -Dm644 -t "$pkgdir"/boot/grub \
"$srcdir"/grub.cfg
install -Dm644 -t "$pkgdir"/boot/EFI/Boot \
"$srcdir"/bootaa64.efi
# Alsa usecase manager config
install -Dm644 -t "$pkgdir"/usr/share/alsa/ucm2/PinePhonePro \
"$srcdir"/HiFi.conf \
"$srcdir"/PINE64-PinePhonePro-.conf \
"$srcdir"/VoiceCall.conf
mkdir -p "$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card
ln -s /usr/share/alsa/ucm2/PinePhonePro/PINE64-PinePhonePro-.conf \
"$pkgdir"/usr/share/alsa/ucm2/conf.d/simple-card/PINE64-PinePhonePro-.conf
# Modem
install -Dm755 "$srcdir"/setup-modem.sh \
"$pkgdir"/usr/bin/pinephone_setup-modem
install -Dm644 "$srcdir"/90-modem-eg25.rules -t \
"$pkgdir"/usr/lib/udev/rules.d/
# Keyboard config
install -Dm755 "$srcdir"/ppkb.sh "$pkgdir"/etc/profile.d/ppkb.sh
}
nonfree_firmware() {
pkgdesc="Wifi, Bluetooth and video-out firmware"
depends="
firmware-pine64-pinebookpro
linux-firmware-brcm
linux-firmware-rockchip
"
mkdir "$subpkgdir"
}
gnome() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-base-ui-gnome"
install -Dm644 "$srcdir"/51_keyboard.gschema.override -t \
"$subpkgdir"/usr/share/glib-2.0/schemas
}
sha512sums="
2d68ffe143f633a86670f30e45dbad1cc313f219f22b7cd3319ab44bb7209c20cb29f2ff2c60c92390154af9c9a6815c4186be555364cf31552005eba024c0e7 51_keyboard.gschema.override
fdfa807c0de33aee3deb09ee25c37a58fa970ce71483e52f21793717cb89adeb74f251ff1a2c2086361e3e58877f8b2e5643f24186b1a537acf9c16e3419313c 90-modem-eg25.rules
e591572d0bfc4d7d990fcc15bc82e78e60404becf62a38283b4ceee6f49a812b63eebbc5c304907330e33dce5f023edba26c9b86f1375affa3cf6b49fbd06539 deviceinfo
eeddbd3712c7385ef8daea252d71f9f91f8be03be43dea4ce036ae7d7b8a38d199a709ae87b9aa8fe8a63f0201224dbda704fd4b95c8c7d3b4f9852ae4e95c11 grub.cfg
0f9357d4eea089628fbceb1e3e96d21a3f4329aeb6743158a6f877f967ef274506404eba949d5f01b7e1adea149f9a3aef992a5e8cd4181f93ab00909b1c5ecd grub_early.cfg
1684514a6b814a83473e9da8855fd776cf3f31a2be1f8834c370f710428b4ee305559e275be52894d167ccd1e32f8f1c8586f8a072f19e44b46caec9f504d453 HiFi.conf
9c6edbe7ea387baf9bfa6c4a46b28c4fe274ab0994e0a1640012048407e6679c437de43cc50e6778c9a852132eaa680de3fd4e0256d36455d1dd57aa729ac8be PINE64-PinePhonePro-.conf
deb360baf914e1c917403d5e26291b9e9d27426876232ab753e4ebfe367423206f1fc01b85d195aa69fb4b51bcaed023423d0fcc0d73fa1bedd5fbe7b17f0fb5 VoiceCall.conf
43f67e94491791685cdbb4874bb3034b1d297bdf3d23e7405c45ba8c58de72b4fb6a9943b79f46ef7b8f4dbc4d9db254ebec8eb3453d720a5a8fad277c6a9d88 ppkb.sh
420ee1d7522d4d56c2909580fd6ba7580483ca5455b13eb6d22e700063ce0c1a5c6d2f5b161dfce0d777636fe9a712aa82f38a0585f2feabea3785b02bae7515 setup-modem.sh
"