diff --git a/app-misc/unified-remote/files/unified-remote.conf b/app-misc/unified-remote/files/unified-remote.conf new file mode 100644 index 0000000..8335040 --- /dev/null +++ b/app-misc/unified-remote/files/unified-remote.conf @@ -0,0 +1,6 @@ +URSERVER_PID="${XDG_RUNTIME_DIR}/urserver.pid" +REMOTES_PATH="$HOME/.urserver/remotes" + +NO_COPY=false +NO_MANAGER=true +NO_NOTIFY=true diff --git a/app-misc/unified-remote/files/unified-remote.init b/app-misc/unified-remote/files/unified-remote.init new file mode 100755 index 0000000..1eadb8f --- /dev/null +++ b/app-misc/unified-remote/files/unified-remote.init @@ -0,0 +1,29 @@ +#!/sbin/openrc-run +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License, v2 or later + +command="/opt/urserver/urserver-start" +command_stop="/opt/urserver/urserver-stop" +command_env="PID_PATH=${URSERVER_PID} REMOTES_PATH=${REMOTES_PATH}" +command_args="" +[[ $NO_COPY == "true" ]] && command_args+=" --no-copy" +[[ $NO_MANAGER == "true" ]] && command_args+=" --no-manager" +[[ $NO_NOTIFY == "true" ]] && command_args+=" --no-notify" + +pidfile="${URSERVER_PID}" + +start_pre() { + echo ${URSERVER_PID} +} + +start() { + ebegin "Starting unified-remote server" + env ${command_env} ${command} ${command_args[@]} + eend $? +} + +stop() { + ebegin "Stopping unified-remote server" + env ${command_env} ${command_stop} ${command_args[@]} + eend $? +} diff --git a/app-misc/unified-remote/files/unified-remote-clickfix.patch b/app-misc/unified-remote/files/urserver-clickfix.patch similarity index 100% rename from app-misc/unified-remote/files/unified-remote-clickfix.patch rename to app-misc/unified-remote/files/urserver-clickfix.patch diff --git a/app-misc/unified-remote/files/urserver-start-stop-fix.patch b/app-misc/unified-remote/files/urserver-start-stop-fix.patch new file mode 100644 index 0000000..e691dc1 --- /dev/null +++ b/app-misc/unified-remote/files/urserver-start-stop-fix.patch @@ -0,0 +1,61 @@ +diff --git a/opt/urserver/urserver-start b/opt/urserver/urserver-start +index 8c41392..9b2172b 100755 +--- a/opt/urserver/urserver-start ++++ b/opt/urserver/urserver-start +@@ -5,11 +5,11 @@ + # Path to installation directory + # + EXEC_PATH="/opt/urserver/urserver" +-PID_PATH="$HOME/.urserver/urserver.pid" + ICON_PATH="/usr/share/icons/hicolor/96x96/apps/urserver.png" +-REMOTES_PATH="$HOME/.urserver/remotes" +-BACKUP_PATH="$HOME/.urserver/backup" + ++: "${PID_PATH:=$HOME/.urserver/urserver.pid}" ++: "${REMOTES_PATH:=$HOME/.urserver/remotes}" ++: "${BACKUP_PATH:=$HOME/.urserver/backup}" + + # + # Check arguments +diff --git a/opt/urserver/urserver-stop b/opt/urserver/urserver-stop +index 7abe2f0..5a3c7b5 100755 +--- a/opt/urserver/urserver-stop ++++ b/opt/urserver/urserver-stop +@@ -4,16 +4,32 @@ + # Path to installation directory + # + EXEC_PATH="/opt/urserver/urserver" +-PID_PATH="$HOME/.urserver/urserver.pid" + ICON_PATH="/usr/share/icons/hicolor/96x96/apps/urserver.png" + ++: "${PID_PATH:=$HOME/.urserver/urserver.pid}" ++ ++# ++# Check arguments ++# ++NO_NOTIFY=false ++ ++for var in "$@" ++do ++ if [ "$var" = "--no-notify" ]; then ++ NO_NOTIFY=true ++ fi ++done ++ ++ + # + # Try to show notification + # +-if hash notify-send 2>/dev/null; then +- notify-send -i $ICON_PATH 'Unified Remote' 'Stopping Unified Remote Server' +-else +- echo "notify-send not available" ++if ! "$NO_NOTIFY" = true; then ++ if hash notify-send 2>/dev/null; then ++ notify-send -i $ICON_PATH 'Unified Remote' 'Stopping Unified Remote Server' ++ else ++ echo "notify-send not available" ++ fi + fi + + # diff --git a/app-misc/unified-remote/unified-remote-9999.ebuild b/app-misc/unified-remote/unified-remote-9999.ebuild index 308be82..d569d7c 100755 --- a/app-misc/unified-remote/unified-remote-9999.ebuild +++ b/app-misc/unified-remote/unified-remote-9999.ebuild @@ -21,7 +21,10 @@ RESTRICT="strip mirror bindist fetch" DEPEND=" " -PATCHES=("${FILESDIR}/unified-remote-clickfix.patch") +PATCHES=( + "${FILESDIR}/urserver-clickfix.patch" + "${FILESDIR}/urserver-start-stop-fix.patch" +) src_unpack() { unpack_deb "${SRC_URI}" @@ -31,6 +34,11 @@ src_install() { sed -i '/^OnlyShowIn=/d' ${S}/usr/share/applications/urserver.desktop cp -r ${S}/usr ${D} cp -r ${S}/opt ${D} + # newinitd "${FILESDIR}"/${PN}.init ${PN} + # newconfd "${FILESDIR}"/${PN}.conf ${PN} + mkdir -p ${D}/etc/user/{init.d,conf.d} + cp "${FILESDIR}/${PN}.init" ${D}/etc/user/init.d/${PN} + cp "${FILESDIR}/${PN}.conf" ${D}/etc/user/conf.d/${PN} } pkg_nofetch() { diff --git a/metadata/md5-cache/app-misc/unified-remote-9999 b/metadata/md5-cache/app-misc/unified-remote-9999 index 2c0c68a..7ddf6ed 100644 --- a/metadata/md5-cache/app-misc/unified-remote-9999 +++ b/metadata/md5-cache/app-misc/unified-remote-9999 @@ -10,4 +10,4 @@ RESTRICT=strip mirror bindist fetch SLOT=0 SRC_URI=urserver.deb _eclasses_=desktop 26d57169ca094c04be416993844ec8bc eapi9-pipestatus d2c134036ac31c3085aebc9147f572bd multiprocessing 1e32df7deee68372153dca65f4a7c21f toolchain-funcs da0a71e3a72194ca0b88d5b045d721ac unpacker a89c769f7dcf68bd2a6d23da9ede2ad2 xdg-utils 42869b3c8d86a70ef3cf75165a395e09 xdg 3ef49a87c52c8b77c476351195dfe575 -_md5_=a964c26f3966e6e0ee87d850556e2853 +_md5_=2eb1dd6a8c546251182c35296c52c21b diff --git a/net-im/signal-desktop-bin/signal-desktop-bin-8.2.0.ebuild b/net-im/signal-desktop-bin/signal-desktop-bin-8.2.0.ebuild old mode 100644 new mode 100755