From 9e52e7423f779e7c43a0fd3f780823b19db6818e Mon Sep 17 00:00:00 2001 From: Ronald Farrer Date: Fri, 21 Apr 2023 15:52:36 -0700 Subject: [PATCH] Removed binary build of surface-dtx-daemon and added git source. --- .../surface-dtx-daemon-0.3.1.ebuild | 36 --------------- .../surface-dtx-daemon-0.3.4.ebuild | 36 --------------- .../surface-control-9999.ebuild | 0 .../surface-dtx-daemon-9999.ebuild | 44 +++++++++++++++++++ 4 files changed, 44 insertions(+), 72 deletions(-) delete mode 100644 app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.1.ebuild delete mode 100644 app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.4.ebuild rename {app-misc => sys-apps}/surface-control/surface-control-9999.ebuild (100%) create mode 100644 sys-apps/surface-dtx-daemon/surface-dtx-daemon-9999.ebuild diff --git a/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.1.ebuild b/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.1.ebuild deleted file mode 100644 index 29eb8af..0000000 --- a/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.1.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Utility to control attach/detach of clipboard on Surface Book devices." -HOMEPAGE="https://github.com/linux-surface/linux-surface" -SRC_URI="https://github.com/linux-surface/surface-dtx-daemon/releases/download/v${PV}-2/${PN}_${PV}-2_amd64.deb" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND="" -RDEPEND="${DEPEND}" -BDEPEND="" - -S="${WORKDIR}" - -src_prepare() { - unpack ./control.tar.xz - unpack ./data.tar.xz - - eapply_user - -} - -src_install() { - doins -r etc - doins -r usr - fperms 0755 /usr/bin/surface-dtx-userd - fperms 0755 /usr/bin/surface-dtx-daemon - fperms 0755 /etc/surface-dtx/attach.sh - fperms 0755 /etc/surface-dtx/detach.sh -} - diff --git a/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.4.ebuild b/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.4.ebuild deleted file mode 100644 index 4d04db9..0000000 --- a/app-misc/surface-dtx-daemon/surface-dtx-daemon-0.3.4.ebuild +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Utility to control attach/detach of clipboard on Surface Book devices." -HOMEPAGE="https://github.com/linux-surface/linux-surface" -SRC_URI="https://github.com/linux-surface/surface-dtx-daemon/releases/download/v${PV}-1/${PN}_${PV}-1_amd64.deb" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~x86" - -DEPEND="" -RDEPEND="${DEPEND}" -BDEPEND="" - -S="${WORKDIR}" - -src_prepare() { - unpack ./control.tar.xz - unpack ./data.tar.xz - - eapply_user - -} - -src_install() { - doins -r etc - doins -r usr - fperms 0755 /usr/bin/surface-dtx-userd - fperms 0755 /usr/bin/surface-dtx-daemon - fperms 0755 /etc/surface-dtx/attach.sh - fperms 0755 /etc/surface-dtx/detach.sh -} - diff --git a/app-misc/surface-control/surface-control-9999.ebuild b/sys-apps/surface-control/surface-control-9999.ebuild similarity index 100% rename from app-misc/surface-control/surface-control-9999.ebuild rename to sys-apps/surface-control/surface-control-9999.ebuild diff --git a/sys-apps/surface-dtx-daemon/surface-dtx-daemon-9999.ebuild b/sys-apps/surface-dtx-daemon/surface-dtx-daemon-9999.ebuild new file mode 100644 index 0000000..88a1daa --- /dev/null +++ b/sys-apps/surface-dtx-daemon/surface-dtx-daemon-9999.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +EGIT_REPO_URI="https://github.com/linux-surface/surface-dtx-daemon.git" +inherit git-r3 cargo + +DESCRIPTION="Surface Detach (DTX) Daemon" +HOMEPAGE="https://github.com/linux-surface/surface-dtx-daemon" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND} + dev-libs/libdbusmenu + dev-libs/glib + sys-apps/dbus +" +src_unpack(){ + git-r3_src_unpack + cargo_live_src_unpack +} + +src_configure() { + cargo_src_configure +} + +src_compile() { + cargo_src_compile --locked +} + +src_install() { + cargo_src_install --path surface-dtx-daemon + cargo_src_install --path surface-dtx-userd + insinto /etc + doins -r etc/dtx + doins -r etc/systemd + doins -r etc/dbus + doins -r etc/udev +} +