diff --git a/main/postmarketos-base-ui-plasma/APKBUILD b/main/postmarketos-base-ui-plasma/APKBUILD index 78700fc90..680aa5c7f 100644 --- a/main/postmarketos-base-ui-plasma/APKBUILD +++ b/main/postmarketos-base-ui-plasma/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Bart Ribbers pkgname=postmarketos-base-ui-plasma pkgver=2 -pkgrel=1 +pkgrel=2 pkgdesc="Meta package for shared configuration for Plasma-based UIs" url="https://postmarketos.org" arch="noarch !armhf" # armhf is not supported @@ -12,28 +12,21 @@ depends=" bluez-openrc breeze dnsmasq - elogind - elogind-openrc iio-sensor-proxy - iio-sensor-proxy-openrc kscreen kwallet-pam kwayland-integration modemmanager - modemmanager-openrc polkit-kde-agent-1 postmarketos-base-ui postmarketos-base-ui-networkmanager powerdevil pulseaudio urfkill - urfkill-openrc xdg-desktop-portal-kde " # Required to launch depends="$depends - tinydm - tinydm-openrc xorg-server " _pmb_recommends=" @@ -50,7 +43,7 @@ _pmb_recommends=" postmarketos-artwork-wallpapers xdg-user-dirs " -install="$pkgname.post-install $pkgname.post-upgrade" +subpackages="$pkgname-openrc $pkgname-systemd" source=" gtk-app-wayland.sh kdewallet.kwl @@ -75,6 +68,25 @@ package() { "$srcdir"/kdewallet.salt } +openrc() { + install_if="$pkgname=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install $subpkgname.post-upgrade" + depends=" + elogind + elogind-openrc + iio-sensor-proxy-openrc + urfkill-openrc + " + + mkdir -p "$subpkgdir" +} + +systemd() { + install_if="$pkgname=$pkgver-r$pkgrel systemd" + install="$subpkgname.post-install $subpkgname.post-upgrade" + + mkdir -p "$subpkgdir" +} sha512sums=" 57793bb079c76ba3bdcfca7880aa887de11fe80e7a05557b78435e57feabab70fbaeedc42da3aec6f914c35bba8e8ee9918367516eb45ee247f63f694624f179 gtk-app-wayland.sh diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-install b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-install new file mode 100644 index 000000000..877ce952e --- /dev/null +++ b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-install @@ -0,0 +1,8 @@ +#!/bin/sh + +rc-update add bluetooth default +rc-update add elogind default +rc-update add hfd-service default +rc-update add iio-sensor-proxy default +rc-update add networkmanager default +rc-update add urfkill default diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-upgrade b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-upgrade new file mode 120000 index 000000000..66683b1b7 --- /dev/null +++ b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-openrc.post-upgrade @@ -0,0 +1 @@ +postmarketos-base-ui-plasma-openrc.post-install \ No newline at end of file diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-install b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-install new file mode 100644 index 000000000..d131c3b5e --- /dev/null +++ b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-install @@ -0,0 +1,7 @@ +#!/bin/sh + +systemctl enable bluetooth +#systemctl enable hfd-service +systemctl enable iio-sensor-proxy +#systemctl enable networkmanager +#systemctl enable urfkill diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-upgrade b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-upgrade new file mode 120000 index 000000000..b6072cb7f --- /dev/null +++ b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma-systemd.post-upgrade @@ -0,0 +1 @@ +postmarketos-base-ui-plasma-systemd.post-install \ No newline at end of file diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-install b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-install deleted file mode 100644 index ec6100ce1..000000000 --- a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-install +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -rc-update add bluetooth default -rc-update add elogind default -rc-update add hfd-service default -rc-update add iio-sensor-proxy default -rc-update add networkmanager default -rc-update add modemmanager default -rc-update add tinydm default -rc-update add urfkill default - - -# Migrate from the old ofono setup -if rc-update del ofono default; then - rc-update del ofono-auto-enable default - rc-service stop ofono - rc-service stop ofono-auto-enable - - rc-service start modemmanager -fi - -glib-compile-schemas /usr/share/glib-2.0/schemas diff --git a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-upgrade b/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-upgrade deleted file mode 120000 index 5891c62c3..000000000 --- a/main/postmarketos-base-ui-plasma/postmarketos-base-ui-plasma.post-upgrade +++ /dev/null @@ -1 +0,0 @@ -postmarketos-base-ui-plasma.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-desktop/APKBUILD b/main/postmarketos-ui-plasma-desktop/APKBUILD index bfe70e1d2..7d9f86085 100644 --- a/main/postmarketos-ui-plasma-desktop/APKBUILD +++ b/main/postmarketos-ui-plasma-desktop/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Bart Ribbers pkgname=postmarketos-ui-plasma-desktop pkgver=3 -pkgrel=1 +pkgrel=2 pkgdesc="(X11/Wayland) KDE Desktop Environment (works well with tablets)" url="https://www.kde.org" # armhf and riscv64 blocked by plasma @@ -37,8 +37,8 @@ _pmb_recommends="$_pmb_recommends wayland-utils xdpyinfo " -install="$pkgname.post-install $pkgname.post-upgrade" -options="!check" # No tests for a metapkg +options="!check pmb:systemd" # No tests for a metapkg +subpackages="$pkgname-openrc $pkgname-systemd" package() { mkdir -p "$pkgdir" @@ -57,3 +57,17 @@ extras() { mkdir -p "$subpkgdir" } + +openrc() { + install_if="$pkgname=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install $subpkgname.post-upgrade" + + mkdir -p "$subpkgdir" +} + +systemd() { + install_if="$pkgname=$pkgver-r$pkgrel systemd" + install="$subpkgname.post-install $subpkgname.post-upgrade" + + mkdir -p "$subpkgdir" +} diff --git a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-install b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-install similarity index 74% rename from main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-install rename to main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-install index e77add83b..376a4e970 100644 --- a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-install +++ b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-install @@ -8,6 +8,5 @@ if [ -f ${SDDM_CONF} ]; then fi fi +rc-update add modemmanager default rc-update add sddm default -rc-update add networkmanager default -rc-update add bluetooth default diff --git a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-upgrade b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-upgrade new file mode 120000 index 000000000..d416da382 --- /dev/null +++ b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-openrc.post-upgrade @@ -0,0 +1 @@ +postmarketos-ui-plasma-desktop-openrc.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-install b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-install new file mode 100644 index 000000000..99477db3a --- /dev/null +++ b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-install @@ -0,0 +1,11 @@ +#!/bin/sh + +SDDM_CONF=/etc/sddm.conf + +if [ -f ${SDDM_CONF} ]; then + if ! grep -q "InputMethod" $SDDM_CONF; then + echo "InputMethod=qtvirtualkeyboard" >> $SDDM_CONF + fi +fi + +systemctl enable sddm diff --git a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-upgrade b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-upgrade new file mode 120000 index 000000000..5dd862da7 --- /dev/null +++ b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop-systemd.post-upgrade @@ -0,0 +1 @@ +postmarketos-ui-plasma-desktop-systemd.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-upgrade b/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-upgrade deleted file mode 120000 index 936b37fdb..000000000 --- a/main/postmarketos-ui-plasma-desktop/postmarketos-ui-plasma-desktop.post-upgrade +++ /dev/null @@ -1 +0,0 @@ -postmarketos-ui-plasma-desktop.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-mobile/APKBUILD b/main/postmarketos-ui-plasma-mobile/APKBUILD index b7ad31c8e..6fddc708a 100644 --- a/main/postmarketos-ui-plasma-mobile/APKBUILD +++ b/main/postmarketos-ui-plasma-mobile/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Bart Ribbers pkgname=postmarketos-ui-plasma-mobile pkgver=5 -pkgrel=1 +pkgrel=2 pkgdesc="(Wayland) Mobile variant of KDE Plasma (does not run without hardware acceleration)" url="https://wiki.postmarketos.org/wiki/Plasma_Mobile" arch="noarch !armhf !x86" # armhf: pmaports#75, x86: aports#11807 @@ -29,15 +29,15 @@ _pmb_recommends=" spacebar ttyescape " -install="$pkgname.post-install $pkgname.post-upgrade" source=" + plasma-mobile.service kscreenlockerrc maliit-plasmamobile.json org.kde.phone.homescreen.js " -subpackages="$pkgname-extras" +subpackages="$pkgname-extras $pkgname-openrc $pkgname-systemd" replaces="plasma-mobile" -options="!check pmb:gpu-accel" +options="!check pmb:gpu-accel pmb:systemd" package() { install -Dm644 \ @@ -72,8 +72,30 @@ extras() { mkdir -p "$subpkgdir" } +openrc() { + install_if="$pkgname=$pkgver-r$pkgrel openrc" + install="$subpkgname.post-install $subpkgname.post-upgrade" + depends=" + modemmanager-openrc + tinydm + tinydm-openrc + " + + mkdir -p "$subpkgdir" +} + +systemd() { + install_if="$pkgname=$pkgver-r$pkgrel systemd" + install="$subpkgname.post-install $subpkgname.post-upgrade" + + install -Dm644 "$srcdir"/plasma-mobile.service \ + "$subpkgdir"/usr/lib/systemd/system/plasma-mobile.service +} + + sha512sums=" +e12d8e98e28a795f879aebcceb32a991ee4abcb3bc5ec458aa5378bb52ff86cf39be04bc4a196925f532d623304b3005f561fa5e55d1c87944d718058ec4c0e6 plasma-mobile.service b3aa8ee26c01de103c0c0af23532bf232f7071fdd02c53bd787d78e5974faa5662fc5776ce9be417392214ae73334b0eb0d073fe24f616a0ce99081f30b9158c kscreenlockerrc 70ee87860842057b557a433a9ae7d54653f076a612b3d9de2d413d598806d23ec19390262eaa398cddf39437f1213d14922402a8d978878e5e98f3767ce0b9eb maliit-plasmamobile.json 50dbb5e0b1550776ca6fc5b91468412b23d49aa502af77cf7d5d15af11eaf61b1632b205f42eac3274bf28a0b7b278a4d6bfc98c6c12ea29830fd258bad5107d org.kde.phone.homescreen.js diff --git a/main/postmarketos-ui-plasma-mobile/plasma-mobile.service b/main/postmarketos-ui-plasma-mobile/plasma-mobile.service new file mode 100644 index 000000000..c47bff113 --- /dev/null +++ b/main/postmarketos-ui-plasma-mobile/plasma-mobile.service @@ -0,0 +1,58 @@ +[Unit] +Description=Open-source user interface for phones, based on Plasma technologies +Documentation=https://invent.kde.org/plasma-mobile + +# replaces the getty +Conflicts=getty@tty1.service +After=getty@tty1.service + +# Needs all the dependencies of the services it's replacing +# (currently getty@tty1.service): +After=rc-local.service plymouth-quit-wait.service systemd-user-sessions.service + +OnFailure=getty@tty1.service + +# D-Bus is necessary for contacting logind. Logind is required. +Wants=dbus.socket +After=dbus.socket + +# This scope is created by pam_systemd when logging in as the user. +# This directive is a workaround to a systemd bug, where the setup of the +# user session by PAM has some race condition, possibly leading to a failure. +# See README for more details. +After=session-c1.scope + +# Since we are part of the graphical session, make sure we are started before +# it is complete. +Before=graphical.target + +# Prevent starting on systems without virtual consoles +ConditionPathExists=/dev/tty0 + +[Service] +Environment=LANG=C.UTF-8 +ExecStart=/usr/bin/startplasmamobile +TimeoutStartSec=30 +User=10000 +PAMName=login +WorkingDirectory=~ +Restart=always +RestartSec=5s + +# A virtual terminal is needed. +TTYPath=/dev/tty7 +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes + +# Fail to start if not controlling the tty. +StandardInput=tty-fail +StandardOutput=journal +StandardError=journal + +# Log this user with utmp, letting it show up with commands 'w' and 'who'. +UtmpIdentifier=tty7 +UtmpMode=user + +[Install] +WantedBy=graphical.target diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-install b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-install new file mode 100644 index 000000000..aa5a43068 --- /dev/null +++ b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-install @@ -0,0 +1,6 @@ +#!/bin/sh + +rc-update add modemmanager default +rc-update add tinydm default + +tinydm-set-session -s /usr/share/wayland-sessions/plasma-mobile.desktop diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-upgrade b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-upgrade new file mode 120000 index 000000000..4fb4d549a --- /dev/null +++ b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-openrc.post-upgrade @@ -0,0 +1 @@ +postmarketos-ui-plasma-mobile-openrc.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-install b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-install new file mode 100644 index 000000000..817c0feb7 --- /dev/null +++ b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-install @@ -0,0 +1,3 @@ +#!/bin/sh + +systemctl enable plasma-mobile diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-upgrade b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-upgrade new file mode 120000 index 000000000..02fc77d11 --- /dev/null +++ b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile-systemd.post-upgrade @@ -0,0 +1 @@ +postmarketos-ui-plasma-mobile-systemd.post-install \ No newline at end of file diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-install b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-install deleted file mode 100644 index eb719d26c..000000000 --- a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-install +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -rc-update add bluetooth default -rc-update add elogind default -rc-update add hfd-service default -rc-update add iio-sensor-proxy default -rc-update add networkmanager default -rc-update add modemmanager default -rc-update add tinydm default -rc-update add urfkill default - - -# Migrate from the old ofono setup -if rc-update del ofono default; then - rc-update del ofono-auto-enable default - rc-service stop ofono - rc-service stop ofono-auto-enable - - rc-service start modemmanager -fi - -tinydm-set-session -s /usr/share/wayland-sessions/plasma-mobile.desktop - -glib-compile-schemas /usr/share/glib-2.0/schemas diff --git a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-upgrade b/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-upgrade deleted file mode 120000 index de9b17e26..000000000 --- a/main/postmarketos-ui-plasma-mobile/postmarketos-ui-plasma-mobile.post-upgrade +++ /dev/null @@ -1 +0,0 @@ -postmarketos-ui-plasma-mobile.post-install \ No newline at end of file