pmaports/device/community/device-nokia-n900/APKBUILD
Sicelo A. Mhlongo 933f2b5703
device-nokia-n900: improve sxmo-dwm support (MR 5227)
(1) the deviceprofile differs from upstream 1.16.3 in the following respects:

  (a) -export SXMO_NO_KEYBOARD=1 - allow use of the virtual keyboard

  (b) +export SXMO_DMENU_LANDSCAPE_LINES="10"
      +export SXMO_DMENU_PORTRAIT_LINES="6" - these two adjust the size of the
         displayed dmenu menu.

    * NB: All foregoing changes are already merged in sxmo-utils master.

  (c) +export SXMO_TOUCHSCREEN_ID="TSC2005 touchscreen" - allows sxmo to
         reliably toggle touch screen's enabled status

    * The foregoing change is awaiting acceptance by upstream.

(2) The start hook differs from upstream 1.16.3 by the removal of the line that
      starts conky. That program pegs N900 CPU usage at 100% all the time. This
      change is not upstreamable, at least not for the time being
2024-06-12 10:25:59 +02:00

248 lines
12 KiB
Text

# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Sicelo <absicsz@gmail.com>
# Co-Maintainer: Danct12 <danct12@disroot.org>
pkgname=device-nokia-n900
pkgver=25
pkgrel=0
pkgdesc="Nokia N900"
url="https://postmarketos.org"
arch="armv7"
license="MIT"
depends="
alsa-utils
kbd
kbd-bkeymaps
linux-firmware-ti-connectivity
linux-postmarketos-omap
ofono
postmarketos-base
postmarketos-mvcfg
u-boot-tools
wl1251-cal
wl1251-cal-openrc
"
makedepends="devicepkg-dev u-boot-tools kbd kbd-bkeymaps"
install="$pkgname.pre-upgrade $pkgname.post-install"
subpackages="
$pkgname-x11
$pkgname-xkeyboard-config:xkeyboard_config
$pkgname-i3wm
$pkgname-sxmo
"
source="
10-initfs-keymap.files
10-initfs-keymap.sh
acpi.map
acpi_handler.sh
asound.state.headset
asound.state.speakers
backlight-enable.sh
device-nokia-n900.start
deviceinfo
modules-initfs
i3wm/i3blocks.conf
i3wm/i3wm.conf
i3wm/protip_shell.sh
i3wm/scripts/battery-bq27200
i3wm/scripts/calendar
i3wm/scripts/ofono
i3wm/scripts/wifi
keymaps/40-xkb.conf
keymaps/rx51_ch.map
keymaps/rx51_fise.map
keymaps/rx51_it.map
keymaps/rx51_ptes.map
keymaps/rx51_us.map
lock.sh
modem-load.conf
modem-opts.conf
modules.blocklist
pointercal
proxishot.sh
sxmo/deviceprofile.sh
sxmo/start_hook.sh
uboot-script.cmd
udev/10-nokia-modem.rules
udev/80-feedbackd-twl4030.rules
udev/90-touchscreen-dev.rules
upower.conf
x11-keymap
xdefaults
xorg.conf
"
options="!check !archcheck"
build() {
devicepkg_build $startdir $pkgname
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n postmarketos -d "$srcdir"/uboot-script.cmd "$srcdir"/boot.scr
cd "$srcdir"
mkdir keymaps
for i in ../keymaps/*.map; do
loadkeys -b $i > keymaps/"${i%.*}.bmap"
gzip keymaps/"${i%.*}.bmap"
done
return 0
}
package() {
devicepkg_package $startdir $pkgname
install -D -m644 "$srcdir"/boot.scr \
"$pkgdir"/boot/boot.scr
install -D -m644 "$srcdir"/backlight-enable.sh \
"$pkgdir"/usr/share/mkinitfs/hooks/00-$pkgname-backlight.sh
install -D -m644 "$srcdir"/pointercal \
"$pkgdir"/etc/pointercal
install -D -m644 "$srcdir"/asound.state.speakers \
"$pkgdir"/var/lib/alsa/asound.state.speakers
install -D -m644 "$srcdir"/asound.state.headset \
"$pkgdir"/var/lib/alsa/asound.state.headset
install -Dm644 "$srcdir"/10-initfs-keymap.files \
"$pkgdir"/usr/share/mkinitfs/files/10-initfs-keymap.files
install -Dm644 "$srcdir"/10-initfs-keymap.sh \
"$pkgdir"/usr/share/mkinitfs/hooks/10-initfs-keymap.sh
install -Dm755 "$srcdir"/$pkgname.start \
"$pkgdir"/etc/local.d/$pkgname.start
# Udev rules
install -D -m644 "$srcdir"/90-touchscreen-dev.rules \
"$pkgdir"/etc/udev/rules.d/90-touchscreen-dev.rules
install -D -m644 "$srcdir"/10-nokia-modem.rules \
"$pkgdir"/etc/udev/rules.d/10-nokia-modem.rules
install -Dm644 "$srcdir"/80-feedbackd-twl4030.rules \
"$pkgdir"/usr/lib/udev/rules.d/80-feedbackd-twl4030.rules
# Keymap
install -D -m644 "$srcdir"/keymaps/rx51_us.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/us/rx51_us.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_ch.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/ch/rx51_ch.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_it.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/it/rx51_it.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_fise.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/fi/rx51_fi.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_fise.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/se/rx51_se.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_ptes.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/pt/rx51_pt.bmap.gz
install -D -m644 "$srcdir"/keymaps/rx51_ptes.bmap.gz \
"$pkgdir"/usr/share/bkeymaps/es/rx51_es.bmap.gz
# Kernel module management
install -D -m644 "$srcdir"/modem-load.conf \
"$pkgdir"/etc/modules-load.d/10-nokia-modem.conf
install -D -m644 "$srcdir"/modem-opts.conf \
"$pkgdir"/etc/modprobe.d/nokia-modem.conf
install -D -m644 "$srcdir"/modules.blocklist \
"$pkgdir"/etc/modprobe.d/n900-module-blocklist.conf
postmarketos-mvcfg-package "$pkgdir" "$pkgname"
}
x11() {
install_if="$pkgname=$pkgver-r$pkgrel xorg-server"
depends="xset xinput scrot"
mkdir "$pkgdir"/etc/acpi
install -D -m755 "$srcdir"/acpi_handler.sh \
"$pkgdir"/etc/acpi/handler.sh
install -D -m644 "$srcdir"/acpi.map \
"$pkgdir"/etc/acpi.map
install -D -m644 "$srcdir"/40-xkb.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/40-xkb.conf
install -D -m644 "$srcdir"/xorg.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/11-n900.conf
install -Dm755 "$srcdir"/lock.sh \
"$pkgdir"/usr/bin/lock.sh
install -Dm755 "$srcdir"/proxishot.sh \
"$pkgdir"/usr/bin/proxishot.sh
}
xkeyboard_config() {
install_if="$pkgname=$pkgver-r$pkgrel xkeyboard-config"
replaces="xkeyboard-config"
install -D -m644 "$srcdir"/x11-keymap \
"$subpkgdir"/usr/share/X11/xkb/symbols/nokia_vndr/rx-51
}
i3wm() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-i3wm"
depends="unclutter-xfixes i3blocks rxvt-unicode upower brightnessctl"
install -D -m644 "$srcdir"/i3wm.conf \
"$subpkgdir"/etc/skel/.config/i3/config
install -D -m644 "$srcdir"/i3blocks.conf \
"$subpkgdir"/etc/skel/.config/i3blocks/config
install -D -m755 "$srcdir"/battery-bq27200 \
"$subpkgdir"/etc/skel/.config/i3blocks/battery-bq27200
install -D -m755 "$srcdir"/ofono \
"$subpkgdir"/etc/skel/.config/i3blocks/ofono
install -D -m755 "$srcdir"/calendar \
"$subpkgdir"/etc/skel/.config/i3blocks/calendar
install -D -m755 "$srcdir"/wifi \
"$subpkgdir"/etc/skel/.config/i3blocks/wifi
install -D -m755 "$srcdir"/protip_shell.sh \
"$subpkgdir"/etc/skel/.protip_shell.sh
install -D -m644 "$srcdir"/xdefaults \
"$subpkgdir"/etc/skel/.Xdefaults
}
sxmo() {
install_if="$pkgname=$pkgver-r$pkgrel sxmo-utils"
replaces="sxmo-utils"
# Set !tracedeps, so abuild doesn't extend provides with e.g.:
# "cmd:sxmo_deviceprofile_nokia,omap3-n900.sh=1.16.3-r0"
# Otherwise this cannot be installed together with sxmo-utils:
# conflicts: sxmo-utils-1.16.3-r0[cmd:sxmo_deviceprofile_nokia,omap3-n900.sh=25-r0]
options="!tracedeps"
install -Dm755 "$srcdir"/deviceprofile.sh \
"$subpkgdir"/usr/bin/sxmo_deviceprofile_nokia,omap3-n900.sh
install -Dm755 "$srcdir"/start_hook.sh \
"$subpkgdir"/usr/share/sxmo/default_hooks/sxmo_hook_start.sh
}
upower() {
install_if="$pkgname=$pkgver-r$pkgrel upower"
replaces="upower"
install -Dm644 "$srcdir"/upower.conf \
"$subpkgdir"/etc/UPower/UPower.conf
}
sha512sums="
6b475c12eca8563be48c562a1cb4ad8ca6a05d70fc54b21288b2dd7435a80a6f53351aa870db96d5bbecf1b1c5cb00dfe35f5066e6d3fd0ad0369e66aeef5a21 10-initfs-keymap.files
4656d3b3ced0a86e2d6315c89322899f646a689e9cb64609aa8ad5a676b23d93706d8a37f3be6f6b12c6b1e8501b7d26ecafecf27322333850513a6805c61910 10-initfs-keymap.sh
2e6c324c2a0627fb37ee2feff249d6c828116a9c1a32d572481dddc12648c98b726eb3a475838398742f76a60e3f2249d7707502360473b8bf2e794bf22f57ce acpi.map
ff51909873160c2d4c6f0c0119b6d4a02751df29f571b8596b4bc8b04ce2541913c11a583b0e5dabd43f240752a8131da45db0ddff194860f4c11198599686a1 acpi_handler.sh
5b87071834313a389f83d29f86f6e3ea108d0921f17dc918be7a46de7e74c73a4418044ef600a0fbf72c8fad22b7730dcd5bfe3d6d01d76bf01556f8540f0b32 asound.state.headset
67acc17a33bc75113300393b4a5bba15319014032407e774d079abf310368e75f4f697dbb4856ba2d2d8ea184b056bb33561f42918de3ee91ab6a77df89a133c asound.state.speakers
3d55e34b95791636e44a5f41754f3d0de039dbba41f7a556d43a95c9e64afcfa930046b4b96b40020b6f196096ffba93514682927e32fa4488686fdd19c6da5a backlight-enable.sh
e6bbac8de1a198ba716f44ade76606e1e0adcc574156b855ac41be5eb5308389d3277fd89cc34b119fbc33d9801ab9f79a6ff213392596bff40bc17e931c05ef device-nokia-n900.start
2463008d270ed09342f15b51f24ea455bd884021f95397991b85616b6840a6608d91cd1fc43186094f5c3d1bd25e88c16aa9ead07b018aea3d93cd2359bba0b1 deviceinfo
f48b8dd7297d03008f73e1ecd55b77ace535ecb03f9bdf021123b96fb5f4fb491ff4c532e226b835c8118fa8d505cc4c635a2b604a3e42a162746021552a551c modules-initfs
826a3790b49324c1e61c75b6c0ffc043a2a1d7c13a8c554fb5eae4977af47a1ca93d70ef8c783d712b953b70e18ae58fa4c6a49bf97263398a01a0c4f91ebc8f i3blocks.conf
506accabcf9fb3e2a270228ea53fdcb57f51092d6e7126a631af8eed697cd882cc805b19cf255422284bec12c928b58219d173a4a790d784db5335a059b6bb4f i3wm.conf
0b80af9fd1f36e6bc06bdfdf48352897234ac7457210649016665da8570a5a64b8a0841b4fbeb64fd7054a5246a64718cf4412f8a53024ce39b28a80984972d8 protip_shell.sh
6c6a70667f37807089adbb343c09d1f62d47b8e6c9c0a54f44790b822f8bff3dccae73341ef736b799fd6740bbd6e1f48e6e122c2e08520f71f6ad7434a47d2c battery-bq27200
d9ef88c714e9fce8822f63b7a9d7fc3e1ed472c8c876b44ba524d44efea322839f13ddd2fa652420608427ecf7279bfaac302c9b67667f32796ca21da332164d calendar
82038d38f94cb975a8d38914afca49b64957446bef7490ab684efa1df47ede2ea1c769045789bb9fded673345eea01911fbbf85fdb54c28685cad8022bfaafac ofono
d7f79fa0887110b85dfb676bd426fa76764fbbb8093df89184552838ddb703b62500f61d7cfa8decdb75a542e3ef577cc71ee4c12ed14d6a76827a3f5aa13073 wifi
181187db6d88b872233f594759373f32fd08065ee340b60f0c3ff06396d99f4b1250192d70a054fcc9e51e067f6cc063c62b7d8dfff3427b292f1d0c766db206 40-xkb.conf
dc585e11bf4e06e36c5c62bcc024eaacecc30437d9da5257df14be05e247a2f2bc208874be3058edc6f87cc2877da2ecafd2f627d9b465d4fd24475fc21fdc71 rx51_ch.map
0a3e58a3a81c463937caf508a76461b4cc43f593f0817a52b6581fdd132cc894c0960fe7b950b6e6bfac1fad15cd9dd230c103fcf08a30b44ef7d8fbe31cea28 rx51_fise.map
082a5166e38296b097e873b0b4aeaf007e594d3bf4470c74e91ee3efedcf28ad25cd55c23dd63e460339898ae08e77e111b0e1092fa5e661db90bb40732103a1 rx51_it.map
6e4e8b10a41d0957968736f5d780f14c7070b03913d80859cb07180e9cec9a36bbc9c639748765e48962772640974f5491627520cc36bd3d6c9d01748f9ddaff rx51_ptes.map
e440ed7a3070c17e003b86b72dbe6d8194d01b577ca8dd56dd066f216b6dda32bb965c780950f1789a66f7c948290016b048da9f1cf63aba9e11d7e7fd6873ba rx51_us.map
6cb3ad1253ceb682d5241e6661a4313cb88b16cbf855f45513b7320584cab062e6c6f472b4ba89ccf76c66493ea76dc3a7bed516b403e324a6fa5657621c7a09 lock.sh
157b27feebcfddf800a1ffd8c6e369d2b58e5db25b1a44b4443dada8d9fe74abb91d036b9f0e97769bbafbdc72020b5637313682c6932fe7b0bddb9ebebbad42 modem-load.conf
695feac7f69a0ec8c5e007cdb651adcc3492f1c6236e7fd183edec2a5e25cb957d3ace630ea5fdb87fd703e35ac368f1d097c2f881ecb52c9cfd433564db2a6c modem-opts.conf
862ebc7cd2d7a1b3d41b10701b8418308c89eb0732eb99c42ec1091d48e08db9421727f67a3272b7309549798d59afb1b8d7d2fa48d1447b208fcb2329472d4d modules.blocklist
143c21f0b18a016d37cb44178e9daea09f128a90769b48353c03c3f245cb9b1f7e773b9ccee084973fc78ddd7a18c2642e54888a85bda7c7daecddc9a8c62eff pointercal
134f51d20decc0c63ab08010931a0b410b70d2f85bf6899f2ff137b1680f59f706a6287d01f5fbb41fa5309125df75a430d0783149bd1a6a1bca07d22f4f6a21 proxishot.sh
fc21e3b7e045055c080a7f7ffb0cd4140b63a02690e92c8370dbccbef506fe271ee9584ac9f14725b8bc9fd6e74e7fafde589d2360f44491c614837472d8ad53 deviceprofile.sh
c067c9ff982f9405ec8acac764ed900261a96b1039d6a7e1f85bbcf1c69e130f5764b571fbec8c4652a67fc3878071c421b400752bd0c3dd869284f1d992c5b0 start_hook.sh
239a54ae5c5effb53ccf4d658652c0462da57604b16b77a63627a17caa171caf82e3d1769f9c5afea8756415acbbf3b73db9b57715fce6c70ea3f29e5c6ac84a uboot-script.cmd
9e72035c88632d12895534e5aa5746f2c130c7dcdafa8702748d62b71ed0e1b5911b6e1f07f9b9e39b6072bbb662f66aead585baa1dcacb7d8c8953ca89b6762 10-nokia-modem.rules
03079030237440080e833dbfeff80327c1ad6a8129c6c730b401a3052cd00a986783ec3473a526b14ae73ba1f20653b4c7b2a6590839bfe6cc156bbbc3b7bb74 80-feedbackd-twl4030.rules
c6012aef28b096141b924fced226ec99fb93eb53b69c064a8887d8fecdf8dc08a3ba3db399e18d88374c6ef4c59013a30699c7e4d76e5cb771040582573a0527 90-touchscreen-dev.rules
d46adf47194c02b434cb46751003e67ee008d60978458e69b1f59dc709a7135a70f542918c29e359ba8308bdeda58a21e8efa446d06625511af05403db90e455 upower.conf
c7837e6688f09c7d650ac7479b8881d4bad709480a71a1dea8b5bba4f4215d6b48a3aebd3f58923bbd48813559478d4ef137dcc9838d321722e141f0aa6a6085 x11-keymap
19694204f2f370a4132762ac1888eaf5736939bba2f12ec2bccd18dde0645cdb621dda3a0772d2ef6d26a65d14e39a628e0d23321fe3064777ad2b76ce45ed2d xdefaults
a91f98daa60efa2beb2ff6b405097f92edca5f1bbb9e7675499139be52ca2570712f8f06f9032ef29f636f99c8f8da8b992f746eab6424aac04260c16158bcc2 xorg.conf
"