This commit is contained in:
Gerben Jan Dijkman 2022-10-03 12:10:24 +02:00
parent f2ff9c6e41
commit 2a88cd700e
3 changed files with 74 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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