From 4d75fcd7927ed2ec0bb23c1106c6b7d19cdac9b7 Mon Sep 17 00:00:00 2001 From: Christian Buchinger Date: Sat, 22 Dec 2018 10:00:40 +0100 Subject: net-misc/anydesk: Install to /opt, change desc. * Install to /opt * Adjusted package description * Fixed elog Package-Manager: Portage-2.3.52, Repoman-2.3.12 Signed-off-by: Christian Buchinger Closes: https://github.com/gentoo/gentoo/pull/10678 Signed-off-by: Thomas Deutschmann --- net-misc/anydesk/anydesk-4.0.1-r1.ebuild | 104 +++++++++++++++++++++++++++ net-misc/anydesk/anydesk-4.0.1.ebuild | 98 ------------------------- net-misc/anydesk/files/anydesk-4.0.1.service | 16 +++++ net-misc/anydesk/files/anydesk.init | 2 +- 4 files changed, 121 insertions(+), 99 deletions(-) create mode 100644 net-misc/anydesk/anydesk-4.0.1-r1.ebuild delete mode 100644 net-misc/anydesk/anydesk-4.0.1.ebuild create mode 100644 net-misc/anydesk/files/anydesk-4.0.1.service (limited to 'net-misc/anydesk') diff --git a/net-misc/anydesk/anydesk-4.0.1-r1.ebuild b/net-misc/anydesk/anydesk-4.0.1-r1.ebuild new file mode 100644 index 000000000000..0d1c769a03b3 --- /dev/null +++ b/net-misc/anydesk/anydesk-4.0.1-r1.ebuild @@ -0,0 +1,104 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="6" + +inherit desktop gnome2-utils systemd xdg-utils + +DESCRIPTION="Feature rich multi-platform remote desktop application" +HOMEPAGE="https://anydesk.com" +SRC_URI="amd64? ( https://download.anydesk.com/linux/${P}-amd64.tar.gz ) + x86? ( https://download.anydesk.com/linux/${P}-i686.tar.gz )" + +# OpeSSL/SSLeay, libvpx, zlib, Xiph, xxHash +LICENSE="AnyDesk-TOS BSD BSD-2 openssl ZLIB" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" + +RDEPEND=" + dev-libs/atk + dev-libs/glib + media-libs/fontconfig + media-libs/freetype + media-libs/glu + media-libs/mesa + sys-auth/polkit + x11-libs/cairo + x11-libs/gdk-pixbuf + x11-libs/gtk+ + x11-libs/gtkglext + x11-libs/libICE + x11-libs/libSM + x11-libs/libX11 + x11-libs/libXdamage + x11-libs/libXext + x11-libs/libXfixes + x11-libs/libXi + x11-libs/libXmu + x11-libs/libXrandr + x11-libs/libXt + x11-libs/libXtst + x11-libs/libxcb + x11-libs/pango + x11-libs/pangox-compat +" + +RESTRICT="bindist mirror" + +QA_PREBUILT="opt/${PN}/*" + +src_install() { + local dst="/opt/${PN}" + + dodir ${dst} + exeinto ${dst} + doexe ${PN} + + dodir /opt/bin + dosym ${dst}/${PN} /opt/bin/${PN} + + newinitd "${FILESDIR}"/anydesk.init anydesk + systemd_newunit "${FILESDIR}"/anydesk-4.0.1.service anydesk.service + + insinto /usr/share/polkit-1/actions + doins polkit-1/com.philandro.anydesk.policy + + insinto /usr/share + doins -r icons + + domenu anydesk.desktop + + keepdir /etc/${PN} + + dodoc changelog copyright README +} + +pkg_postinst() { + xdg_desktop_database_update + gnome2_icon_cache_update + + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "To run AnyDesk as background service use:" + elog + elog "OpenRC:" + elog "# rc-service anydesk start" + elog "# rc-update add anydesk default" + elog + elog "Systemd:" + elog "# systemctl start anydesk.service" + elog "# systemctl enable anydesk.service" + elog + elog "Please see README at /usr/share/doc/${PF}/README.bz2 for" + elog "further information about the linux version of AnyDesk." + elog + elog "AnyDesk might require the following commands/packages" + elog "for some functions:" + elog "* lsb_release (sys-apps/lsb-release)" + elog "* lsusb (sys-apps/usbutils)" + fi +} + +pkg_postrm() { + xdg_desktop_database_update + gnome2_icon_cache_update +} diff --git a/net-misc/anydesk/anydesk-4.0.1.ebuild b/net-misc/anydesk/anydesk-4.0.1.ebuild deleted file mode 100644 index 45ede2ba5a90..000000000000 --- a/net-misc/anydesk/anydesk-4.0.1.ebuild +++ /dev/null @@ -1,98 +0,0 @@ -# Copyright 1999-2018 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI="6" - -inherit desktop gnome2-utils systemd xdg-utils - -DESCRIPTION="The world's fastest remote desktop application" -HOMEPAGE="https://anydesk.com" -SRC_URI="amd64? ( https://download.anydesk.com/linux/${P}-amd64.tar.gz ) - x86? ( https://download.anydesk.com/linux/${P}-i686.tar.gz )" - -# OpeSSL/SSLeay, libvpx, zlib, Xiph, xxHash -LICENSE="AnyDesk-TOS BSD BSD-2 openssl ZLIB" -SLOT="0" -KEYWORDS="-* ~amd64 ~x86" - -RDEPEND=" - dev-libs/atk - dev-libs/glib - media-libs/fontconfig - media-libs/freetype - media-libs/glu - media-libs/mesa - sys-auth/polkit - x11-libs/cairo - x11-libs/gdk-pixbuf - x11-libs/gtk+ - x11-libs/gtkglext - x11-libs/libICE - x11-libs/libSM - x11-libs/libX11 - x11-libs/libXdamage - x11-libs/libXext - x11-libs/libXfixes - x11-libs/libXi - x11-libs/libXmu - x11-libs/libXrandr - x11-libs/libXt - x11-libs/libXtst - x11-libs/libxcb - x11-libs/pango - x11-libs/pangox-compat -" - -RESTRICT="bindist mirror" - -QA_PREBUILT="usr/bin/${PN}" - -src_install() { - exeinto /usr/bin - doexe ${PN} - - newinitd "${FILESDIR}"/anydesk.init anydesk - systemd_dounit systemd/anydesk.service - - insinto /usr/share/polkit-1/actions - doins polkit-1/com.philandro.anydesk.policy - - insinto /usr/share - doins -r icons - - domenu anydesk.desktop - - keepdir /etc/${PN} - - dodoc changelog copyright README -} - -pkg_postinst() { - xdg_desktop_database_update - gnome2_icon_cache_update - - if [[ -n ${REPLACING_VERSIONS} ]]; then - elog "To run AnyDesk as background service use:" - elog - elog "OpenRC:" - elog "# rc-service anydesk start" - elog "# rc-update add anydesk default" - elog - elog "Systemd:" - elog "# systemctl start anydesk.service" - elog "# systemctl enable anydesk.service" - elog - elog "Please see README at /usr/share/doc/${PF}/README.bz2 for" - elog "further information about the linux version of AnyDesk." - elog - elog "AnyDesk might require the following commands/packages" - elog "for some functions:" - elog "* lsb_release (sys-apps/lsb-release)" - elog "* lsusb (sys-apps/usbutils)" - fi -} - -pkg_postrm() { - xdg_desktop_database_update - gnome2_icon_cache_update -} diff --git a/net-misc/anydesk/files/anydesk-4.0.1.service b/net-misc/anydesk/files/anydesk-4.0.1.service new file mode 100644 index 000000000000..e7a3ef008374 --- /dev/null +++ b/net-misc/anydesk/files/anydesk-4.0.1.service @@ -0,0 +1,16 @@ +[Unit] +Description=AnyDesk +Requires=network.target +After=systemd-user-sessions.service + +[Service] +Type=simple +ExecStart=/opt/bin/anydesk --service +PIDFile=/var/run/anydesk.pid +KillMode=mixed +TimeoutStopSec=30 +User=root +LimitNOFILE=100000 + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/anydesk/files/anydesk.init b/net-misc/anydesk/files/anydesk.init index 193f6a24721a..5b8986ed8d1b 100644 --- a/net-misc/anydesk/files/anydesk.init +++ b/net-misc/anydesk/files/anydesk.init @@ -4,7 +4,7 @@ name="AnyDesk service" description="AnyDesk global service" -command="/usr/bin/anydesk" +command="/opt/bin/anydesk" command_args="--service" pidfile="/var/run/anydesk.pid" command_background=true -- cgit v1.2.3-65-gdbad