From 329224d372fcfd92ba75398a42d1d54fde814d1f Mon Sep 17 00:00:00 2001 From: Gerben Jan Dijkman Date: Sat, 24 Jul 2021 03:56:36 +0200 Subject: [PATCH] Added phosh --- gui-wm/phosh/Manifest | 2 + gui-wm/phosh/files/pam_phosh | 5 ++ gui-wm/phosh/files/phosh.service | 52 +++++++++++++++++ gui-wm/phosh/files/sm.puri.OSK0.desktop | 12 ++++ gui-wm/phosh/metadata.xml | 15 +++++ gui-wm/phosh/phosh-0.12.1.ebuild | 74 +++++++++++++++++++++++++ 6 files changed, 160 insertions(+) create mode 100644 gui-wm/phosh/Manifest create mode 100644 gui-wm/phosh/files/pam_phosh create mode 100644 gui-wm/phosh/files/phosh.service create mode 100644 gui-wm/phosh/files/sm.puri.OSK0.desktop create mode 100644 gui-wm/phosh/metadata.xml create mode 100644 gui-wm/phosh/phosh-0.12.1.ebuild diff --git a/gui-wm/phosh/Manifest b/gui-wm/phosh/Manifest new file mode 100644 index 0000000..2f73a74 --- /dev/null +++ b/gui-wm/phosh/Manifest @@ -0,0 +1,2 @@ +DIST libgnome-volume-control-c5ab6037f460406ac9799b1e5765de3ce0097a8b.tar.gz 46481 BLAKE2B 7ea8424d640d71361905e2eff346f45e024f9cd430cc8cc92c53d8cf72a8ea312c00bdbd0d9c25f499e1af2122fcafbf08a600d69f053ff9fa04baeb44283ccf SHA512 368d56223907d3eaafd35fce643abddf00e963800eebe98fb5cbe6fbbd8da115d1afb93bd5d557167e787579e3ff8b8e7885cae74d8f0326b45085870ac8cc05 +DIST phosh-v0.12.1.tar.gz 477007 BLAKE2B 2b5f78cb07c10522832ca499fae86d0e27d6b2d1bcbfcef4631a6f23c17da455aa40f664e3bc6fb3e15701aef3eebac2ef1e8287c2d051b7db6ca3816578aa1b SHA512 dddc76e069ff35954411ba2cce5dd12732dd9f1afe8762078d53c061c98afd9486c76bc9423fb909d70e56dac446062dfb65101b40b3871c80ef52f027c2c924 diff --git a/gui-wm/phosh/files/pam_phosh b/gui-wm/phosh/files/pam_phosh new file mode 100644 index 0000000..0580d98 --- /dev/null +++ b/gui-wm/phosh/files/pam_phosh @@ -0,0 +1,5 @@ +#%PAM-1.0 + +auth include system-local-login +account include system-local-login +session include system-local-login diff --git a/gui-wm/phosh/files/phosh.service b/gui-wm/phosh/files/phosh.service new file mode 100644 index 0000000..698cdf0 --- /dev/null +++ b/gui-wm/phosh/files/phosh.service @@ -0,0 +1,52 @@ +[Unit] +Description=Phosh, a shell for mobile phones +Documentation=https://source.puri.sm/Librem5/phosh + +# Make sure we are started after logins are permitted. +After=systemd-user-sessions.service +# If Plymouth is used, we want to start when it is on its way out. +After=plymouth-quit-wait.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] +ExecStart=/usr/bin/phosh +TimeoutStartSec=30 +User=1000 +PAMName=login +WorkingDirectory=~ +Restart=on-failure +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/gui-wm/phosh/files/sm.puri.OSK0.desktop b/gui-wm/phosh/files/sm.puri.OSK0.desktop new file mode 100644 index 0000000..bb07569 --- /dev/null +++ b/gui-wm/phosh/files/sm.puri.OSK0.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Type=Application +Name=On-screen keyboard +Comment=Default on-screen keyboard +Exec=/usr/bin/osk-wayland +Categories=GNOME;Core; +OnlyShowIn=GNOME; +NoDisplay=true +X-GNOME-Autostart-Phase=Panel +X-GNOME-Provides=inputmethod +X-GNOME-Autostart-Notify=true +X-GNOME-AutoRestart=true diff --git a/gui-wm/phosh/metadata.xml b/gui-wm/phosh/metadata.xml new file mode 100644 index 0000000..64c8c7e --- /dev/null +++ b/gui-wm/phosh/metadata.xml @@ -0,0 +1,15 @@ + + + + + gjdijkman@gjdwebserver.nl + Gerben Jan Dijkman + + + A pure Wayland shell prototype for GNOME on mobile devices. For a matching compositor see x11-wm/phoc but others implementing wlr-layer-shell should work as well. + + + https://source.puri.sm/Librem5/phosh + https://source.puri.sm/Librem5/phosh/-/issues + + diff --git a/gui-wm/phosh/phosh-0.12.1.ebuild b/gui-wm/phosh/phosh-0.12.1.ebuild new file mode 100644 index 0000000..206aec9 --- /dev/null +++ b/gui-wm/phosh/phosh-0.12.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop gnome2-utils meson pam readme.gentoo-r1 vala systemd xdg + +MY_P="${PN}-v${PV}" +MY_COMMIT="c5ab6037f460406ac9799b1e5765de3ce0097a8b" + +DESCRIPTION="A pure Wayland shell prototype for GNOME on mobile devices" +HOMEPAGE="https://source.puri.sm/Librem5/phosh" +SRC_URI=" + https://source.puri.sm/Librem5/phosh/-/archive/v${PV}/${MY_P}.tar.gz + https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/archive/${MY_COMMIT}.tar.gz -> libgnome-volume-control-${MY_COMMIT}.tar.gz +" +S="${WORKDIR}/${MY_P}" + +KEYWORDS="~amd64 ~arm64" +LICENSE="GPL-3" +SLOT="0" +IUSE="+systemd" + +DEPEND=" + app-crypt/gcr + dev-libs/feedbackd + media-sound/pulseaudio + >=gui-libs/libhandy-1.1.90 + net-misc/networkmanager + gnome-base/gnome-desktop + gnome-base/gnome-session + x11-themes/gnome-backgrounds + x11-wm/phoc + systemd? ( sys-apps/systemd ) + sys-power/upower +" +RDEPEND="${DEPEND}" +BDEPEND=" + dev-util/ctags + dev-util/meson +" + +src_prepare() { + default + eapply_user + rm -r "${S}"/subprojects/gvc || die + mv "${WORKDIR}"/libgnome-volume-control-"${MY_COMMIT}" "${S}"/subprojects/gvc || die +} + +src_install() { + default + meson_src_install + newpamd "${FILESDIR}"/pam_phosh 'phosh' + systemd_newunit "${FILESDIR}"/phosh.service 'phosh.service' + domenu "${FILESDIR}"/sm.puri.OSK0.desktop + + DOC_CONTENTS=" + To amend the existing password policy please see the man 5 passwdqc.conf + page and then edit the /etc/security/passwdqc.conf file to change enforce=none + to allow use digit only password as phosh only support passcode for now + " + readme.gentoo_create_doc +} + +pkg_postinst() { + xdg_pkg_postinst + gnome2_schemas_update + readme.gentoo_print_elog +} + +pkg_postrm() { + xdg_pkg_postrm + gnome2_schemas_update +}