diff --git a/gui-wm/phosh/files/phosh.service b/gui-wm/phosh/files/phosh.service new file mode 100755 index 0000000..6a1bda3 --- /dev/null +++ b/gui-wm/phosh/files/phosh.service @@ -0,0 +1,56 @@ +[Unit] +Description=Phosh, a shell for mobile phones +Documentation=https://gitlab.gnome.org/World/Phosh/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] +Environment=LANG=C.UTF-8 +Environment=XDG_CURRENT_DESKTOP=GNOME:Phosh +Environment=XDG_SESSION_DESKTOP=phosh +Environment=XDG_SESSION_TYPE=wayland +ExecStart=/usr/bin/phosh +TimeoutStartSec=30 +User=1000 +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/gui-wm/phosh/phosh-0.17.0-r1.ebuild b/gui-wm/phosh/phosh-0.17.0-r1.ebuild index 5b71e5a..286ffee 100755 --- a/gui-wm/phosh/phosh-0.17.0-r1.ebuild +++ b/gui-wm/phosh/phosh-0.17.0-r1.ebuild @@ -61,11 +61,20 @@ src_prepare() { eapply "${FILESDIR}"/0002-build-Adjust-to-polkit-version-changes.patch eapply "${FILESDIR}"/0003-fix-locale-issue-in-service-file.patch } + +src_configure() { + local mycmakeargs=( + -Dsystemd=true + ) + + cmake_src_configure +} 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 diff --git a/gui-wm/phosh/phosh-0.21.1-r1.ebuild b/gui-wm/phosh/phosh-0.21.1-r1.ebuild index 585bbd3..244ef97 100755 --- a/gui-wm/phosh/phosh-0.21.1-r1.ebuild +++ b/gui-wm/phosh/phosh-0.21.1-r1.ebuild @@ -66,10 +66,19 @@ src_prepare() { } +src_configure() { + local mycmakeargs=( + -Dsystemd=true + ) + + cmake_src_configure +} + 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