2020-01-14 03:55:23 +00:00
|
|
|
# Reference: <https://postmarketos.org/devicepkg>
|
2020-03-14 20:53:57 +00:00
|
|
|
# Maintainer: Clayton Craft <clayton@craftyguy.net>
|
2021-04-05 21:14:33 +00:00
|
|
|
# Co-Maintainer: Bhushan Shah <bshah@kde.org>
|
2020-03-14 20:53:57 +00:00
|
|
|
pkgname=device-purism-librem5
|
2020-01-14 03:55:23 +00:00
|
|
|
pkgdesc="Purism Librem 5 Phone"
|
2022-04-08 22:04:37 +00:00
|
|
|
pkgver=1.32
|
2022-02-09 20:52:34 +00:00
|
|
|
pkgrel=0
|
2022-03-29 20:36:01 +00:00
|
|
|
_confver=49
|
2021-03-05 19:00:51 +00:00
|
|
|
_purismrel=1
|
|
|
|
# <librem5-base ver>.<purism release>
|
|
|
|
_purismver=${_confver}pureos$_purismrel
|
2020-01-14 03:55:23 +00:00
|
|
|
url="https://postmarketos.org"
|
|
|
|
license="MIT"
|
|
|
|
arch="aarch64"
|
|
|
|
options="!check !archcheck"
|
2020-03-14 20:53:57 +00:00
|
|
|
depends="
|
2020-06-19 18:14:53 +00:00
|
|
|
alsa-ucm-conf
|
2021-12-10 08:19:48 +00:00
|
|
|
gnss-share
|
2021-01-12 07:29:07 +00:00
|
|
|
iw
|
2020-03-14 20:53:57 +00:00
|
|
|
linux-purism-librem5
|
2020-06-19 18:14:53 +00:00
|
|
|
mesa-dri-gallium
|
2020-10-08 05:25:17 +00:00
|
|
|
mesa-egl
|
2020-03-14 20:53:57 +00:00
|
|
|
postmarketos-base
|
|
|
|
u-boot-librem5
|
2021-04-27 14:06:44 +00:00
|
|
|
u-boot-tools
|
2020-01-14 03:55:23 +00:00
|
|
|
"
|
|
|
|
makedepends="devicepkg-dev"
|
2021-01-08 18:46:24 +00:00
|
|
|
builddir=$srcdir/librem5-base-pureos-$_confver
|
2020-01-14 03:55:23 +00:00
|
|
|
source="
|
2021-03-05 19:00:51 +00:00
|
|
|
https://source.puri.sm/Librem5/librem5-base/-/archive/pureos/$_purismver/librem5-base-pureos-$_purismver.tar.gz
|
2020-06-19 18:14:53 +00:00
|
|
|
00-mesa.sh
|
2021-01-12 07:29:07 +00:00
|
|
|
70-wifi-pm.rules
|
2020-06-19 18:14:53 +00:00
|
|
|
77-mm-broadmobi-port-types.rules
|
2020-01-14 03:55:23 +00:00
|
|
|
deviceinfo
|
2020-06-19 18:14:53 +00:00
|
|
|
flash_script.lst
|
2021-03-15 22:15:03 +00:00
|
|
|
modprobe.d-ship_mode.conf
|
2020-01-14 03:55:23 +00:00
|
|
|
modprobe.d_rsi.conf
|
2020-03-25 01:12:14 +00:00
|
|
|
modules-load.d_librem5.conf
|
2021-02-26 01:02:26 +00:00
|
|
|
pcscd-librem5-reader.conf
|
|
|
|
pcscd-librem5.initd
|
2020-06-19 18:14:53 +00:00
|
|
|
uboot-script.cmd
|
2020-10-09 05:04:49 +00:00
|
|
|
xorg.conf
|
2022-03-29 20:36:01 +00:00
|
|
|
70-librem5-xwayland-accel.sh
|
2021-11-08 03:01:58 +00:00
|
|
|
0002-udev-cameras-use-correct-path-for-modprobe-on-Alpine.patch
|
2020-01-14 03:55:23 +00:00
|
|
|
"
|
2020-03-14 20:53:57 +00:00
|
|
|
subpackages="
|
2022-03-29 20:36:01 +00:00
|
|
|
$pkgname-nonfree-firmware:nonfree_firmware
|
2020-03-14 20:53:57 +00:00
|
|
|
$pkgname-phosh
|
|
|
|
$pkgname-pulseaudio
|
2021-02-26 01:02:26 +00:00
|
|
|
$pkgname-smartcard
|
2022-03-29 20:36:01 +00:00
|
|
|
$pkgname-tinydm
|
2020-03-14 20:53:57 +00:00
|
|
|
"
|
2021-12-10 08:19:48 +00:00
|
|
|
install="$pkgname.post-install $pkgname.post-upgrade"
|
2020-01-14 03:55:23 +00:00
|
|
|
|
2021-03-05 19:00:51 +00:00
|
|
|
builddir="$srcdir/librem5-base-pureos-$_purismver"
|
|
|
|
|
2020-01-14 03:55:23 +00:00
|
|
|
build() {
|
|
|
|
mkimage -A arm64 -C none -O linux -T script -d "$srcdir/uboot-script.cmd" "$srcdir/boot.scr"
|
|
|
|
devicepkg_build $startdir $pkgname
|
|
|
|
}
|
|
|
|
|
2020-03-14 20:53:57 +00:00
|
|
|
phosh() {
|
|
|
|
pkgdesc="Phosh support for the Librem 5"
|
|
|
|
install_if="$pkgname phosh"
|
|
|
|
depends="
|
|
|
|
wys
|
|
|
|
"
|
2021-01-08 18:46:24 +00:00
|
|
|
install -D -m644 "$builddir"/default/org.freedesktop.ModemManager1.pkla \
|
2020-03-14 20:53:57 +00:00
|
|
|
"$subpkgdir"/var/lib/polkit-1/localauthority/10-vendor.d/org.freedesktop.ModemManager1.pkla
|
|
|
|
}
|
|
|
|
|
|
|
|
pulseaudio() {
|
|
|
|
pkgdesc="Pulseaudio support for the Librem 5"
|
|
|
|
install_if="$pkgname pulseaudio"
|
|
|
|
# install config files from upstream Purism
|
|
|
|
mkdir -p "$subpkgdir"/etc/pulse/
|
2021-01-08 18:46:24 +00:00
|
|
|
cp -r "$builddir"/default/audio/pulse/daemon.conf.d "$subpkgdir"/etc/pulse/
|
|
|
|
install -D -m644 "$builddir"/default/audio/pulse/librem5.pa "$subpkgdir"/etc/pulse/librem5.pa
|
2020-03-14 20:53:57 +00:00
|
|
|
mkdir -p "$subpkgdir"/usr/share/pulseaudio/alsa-mixer
|
2021-01-08 18:46:24 +00:00
|
|
|
cp -r "$builddir"/default/audio/profile-sets "$subpkgdir"/usr/share/pulseaudio/alsa-mixer/
|
2020-01-14 03:55:23 +00:00
|
|
|
}
|
|
|
|
|
2022-03-29 20:36:01 +00:00
|
|
|
tinydm() {
|
|
|
|
pkgdesc="Tinydm config for the Librem 5"
|
|
|
|
install_if="$pkgname tinydm"
|
|
|
|
install -Dm755 "$srcdir"/70-librem5-xwayland-accel.sh \
|
|
|
|
"$subpkgdir"/etc/tinydm.d/env-wayland.d/70-librem5-xwayland-accel.sh
|
|
|
|
}
|
|
|
|
|
2021-02-26 01:02:26 +00:00
|
|
|
smartcard() {
|
|
|
|
pkgdesc="OpenPGP SmartCard support for the Librem 5"
|
|
|
|
depends="$pkgname ccid gnupg-scdaemon pcsc-lite pcsc-tools"
|
|
|
|
install_if="$pkgname pcsc-tools"
|
|
|
|
install="$install $subpkgname.post-install"
|
|
|
|
|
|
|
|
install -D -m644 "$srcdir"/pcscd-librem5-reader.conf \
|
|
|
|
"$subpkgdir"/etc/reader.conf.d/librem5-ttxs-reader
|
|
|
|
|
|
|
|
install -D -m755 "$srcdir"/pcscd-librem5.initd \
|
|
|
|
"$subpkgdir"/etc/init.d/pcscd-librem5
|
|
|
|
}
|
|
|
|
|
2020-01-14 03:55:23 +00:00
|
|
|
package() {
|
|
|
|
install -D -m644 "$srcdir"/boot.scr \
|
|
|
|
"$pkgdir"/boot/boot.scr
|
2020-03-14 20:53:57 +00:00
|
|
|
install -D -m644 "$srcdir"/modprobe.d_rsi.conf "$pkgdir"/etc/modprobe.d/rsi.conf
|
2020-03-25 01:12:14 +00:00
|
|
|
install -D -m644 "$srcdir"/modules-load.d_librem5.conf "$pkgdir"/etc/modules-load.d/librem5.conf
|
2020-03-14 20:53:57 +00:00
|
|
|
install -D -m644 "$srcdir"/00-mesa.sh "$pkgdir"/etc/profile.d/00-mesa.sh
|
|
|
|
install -D -m644 "$srcdir"/flash_script.lst "$pkgdir"/usr/share/uuu/flash_script.lst
|
2020-10-09 05:04:49 +00:00
|
|
|
install -Dm644 "$srcdir"/xorg.conf \
|
|
|
|
"$pkgdir"/etc/X11/xorg.conf.d/10-video.conf
|
2020-06-19 18:14:53 +00:00
|
|
|
|
|
|
|
# udev
|
2021-01-08 18:46:24 +00:00
|
|
|
install -D -m644 "$builddir"/debian/librem5-base-defaults.librem5-pm.udev \
|
2021-11-08 03:01:58 +00:00
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/85-librem5-pm.rules
|
2021-01-08 18:46:24 +00:00
|
|
|
install -D -m644 "$builddir"/debian/librem5-base-defaults.librem5-modem.udev \
|
2021-11-08 03:01:58 +00:00
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/85-librem5-modem.rules
|
2021-01-08 18:46:24 +00:00
|
|
|
install -D -m644 "$builddir"/default/gpsd/99-gnss.rules \
|
2021-11-08 03:01:58 +00:00
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/85-librem5-gnss.rules
|
|
|
|
install -D -m644 "$builddir"/debian/librem5-base-defaults.librem5-storage.udev \
|
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/85-librem5-storage.rules
|
|
|
|
install -D -m644 "$builddir"/debian/librem5-base-defaults.librem5-cameras.udev \
|
|
|
|
"$pkgdir"/usr/lib/udev/rules.d/85-librem5-cameras.rules
|
|
|
|
|
2021-01-12 07:29:07 +00:00
|
|
|
# Wifi / PM
|
|
|
|
install -Dm644 "$srcdir"/70-wifi-pm.rules -t "$pkgdir"/usr/lib/udev/rules.d/
|
2020-06-19 18:14:53 +00:00
|
|
|
|
|
|
|
# install audio config files from upstream Purism
|
2021-01-08 18:46:24 +00:00
|
|
|
mkdir -p "$pkgdir"/usr/share/alsa/ucm2
|
2021-12-14 01:11:31 +00:00
|
|
|
cp -r "$builddir"/default/audio/ucm2/ "$pkgdir"/usr/share/alsa/ucm2/conf.d/
|
2021-01-08 18:46:24 +00:00
|
|
|
|
2021-03-15 22:15:03 +00:00
|
|
|
# enable bq25890_charger ship_mode
|
|
|
|
install -Dm644 "$srcdir"/modprobe.d-ship_mode.conf \
|
|
|
|
"$pkgdir"/etc/modprobe.d/bq25890_charger.conf
|
2020-03-14 20:53:57 +00:00
|
|
|
|
2020-01-14 03:55:23 +00:00
|
|
|
devicepkg_package $startdir $pkgname
|
|
|
|
}
|
2021-03-24 18:57:47 +00:00
|
|
|
|
|
|
|
nonfree_firmware() {
|
|
|
|
pkgdesc="Wifi and Bluetooth firmware"
|
2022-04-08 22:04:37 +00:00
|
|
|
depends="firmware-siliconlabs-rs9116 firmware-brcm43752"
|
2021-03-24 18:57:47 +00:00
|
|
|
mkdir "$subpkgdir"
|
|
|
|
}
|
|
|
|
|
2021-06-02 17:59:27 +00:00
|
|
|
sha512sums="
|
2022-03-29 20:36:01 +00:00
|
|
|
eb96cb23f2fe28ef528afe0d267453461611bfe7e8dffaf5afcd2de96f8e3c1f4612c3a9ec43feb50bbec8094ce31b5333ed85f14aaba5461e715024dff9ac9c librem5-base-pureos-49pureos1.tar.gz
|
2021-06-02 17:59:27 +00:00
|
|
|
2e72d9a084ecd6c96cafbbd8fda461ae8b2ebd14ffda601d9f36d73f08f04088213de17da078293ddd958d4c76d33148c7af6e252eb0709f6934855a55578509 00-mesa.sh
|
2021-01-12 07:29:07 +00:00
|
|
|
8b6fa7b12c15f439c561901f3ffe24a1ef2a0c343401c0a79281060854ab29e08a1fb5e7adae8684b12aa9f535ed99e2dad993dce9724822cb0fbf2497dd86e5 70-wifi-pm.rules
|
2020-06-19 18:14:53 +00:00
|
|
|
00355d9ad085a77e157f3c62eb4f1bcac2823d3b341e34d1128edbfb1444fba83e8eacd263ea61da9f6d853f1328ab7fbe5ea63bd08c8a1bc9b8eaf44ae1f1c6 77-mm-broadmobi-port-types.rules
|
2022-03-08 01:07:36 +00:00
|
|
|
17c4cf3cfefddee8b47c62c311e177d829fc25140c56c2910ad37f64768e09dc209516d5f97c187ebdf5b1d7851ad7a3518ea5b16b01390b2906407c4f18eae1 deviceinfo
|
|
|
|
ccb47fd421c5e35a8def8e6fb61dad99e42cf542690068a68f90c257e41d33f45f1069db0a8d89372d9029681812957033995639a6a8a5e3eed48019325e0f4d flash_script.lst
|
2021-03-15 22:15:03 +00:00
|
|
|
110630f959e3f3a2acc335d755defeb0f49fb40f46cb2423205511f43d1dfdbb91722271fac34a6cbf04a5f0406e6a34ed77e75555acc3f420041d32224027d6 modprobe.d-ship_mode.conf
|
2021-04-03 02:21:55 +00:00
|
|
|
3f62c04eb92d850e32d5e1b17534dec753563342ea6c4f9dc2572700d4f6eeb8ae8cd8e8e4f1b0f5c61f21d87bc61c02212f27313986157220003d78e2d69505 modprobe.d_rsi.conf
|
2020-06-19 18:14:53 +00:00
|
|
|
a0740e405781ec6ef765fdc9f5700c95adbb241c45c97b9384ba68cdece662cb216ca5918640042f6e65a5d1b1a9099936382c99b49a44303f7b6d77a075a471 modules-load.d_librem5.conf
|
2021-02-26 01:02:26 +00:00
|
|
|
8ef4ec7a9e9a4fb801d207e7d94b627aacc9243a93b0ec28e0823a6f44b8102416c040e4ddf499f87bb9dfa960cf6f627b008b79f197f6814b3fd881e18ae8ef pcscd-librem5-reader.conf
|
|
|
|
2618b40eebd3602066ee75ab85cbdbb4cfee498def9879c95a304f05a6eeedf1ab28c5dd9fa5efc8f88c790f49c96458c61d5dfe8a3ca0f96bcc0e244313ab01 pcscd-librem5.initd
|
2022-03-08 01:07:36 +00:00
|
|
|
6971669a7ae4206f6d38f5050747ebc9ffb591a92921a00623e20bb9369ed25d6168dba719de0abec900f1dc5f2f02089a05b5f4e871d6a7cee5afcf38c581fc uboot-script.cmd
|
2021-06-02 17:59:27 +00:00
|
|
|
1cbc65cf2cb8fad4b0332d012a0256a266205b9b64371f5c0dae09dbb7f1e45b254e8c43993b896097e9d7035a72d547d9bce1ab2133addc56a5abdb80b44616 xorg.conf
|
2022-03-29 20:36:01 +00:00
|
|
|
fad386071fc45f9880a94cc8004fabd5d98b3e6a12606c98d8e72e0208f22ab54f03b921f5967a959782507e2bff67d2fa92e46d8cd242011a3afcdbda529279 70-librem5-xwayland-accel.sh
|
2022-02-09 20:52:34 +00:00
|
|
|
b45749fcddfd65a302b502bcabfa5828d1b63e45d844fd50e44009a756b919db20fe9526102947c0f0dfcdffe4a037e5050fe1b24fb915933ce0837f49759378 0002-udev-cameras-use-correct-path-for-modprobe-on-Alpine.patch
|
2021-06-02 17:59:27 +00:00
|
|
|
"
|