From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C286A138359 for ; Fri, 24 Jul 2020 08:28:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 145CCE0849; Fri, 24 Jul 2020 08:28:41 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DD189E0849 for ; Fri, 24 Jul 2020 08:28:40 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C0F1534F22F for ; Fri, 24 Jul 2020 08:28:39 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 393F429A for ; Fri, 24 Jul 2020 08:28:34 +0000 (UTC) From: "Joonas Niilola" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Joonas Niilola" Message-ID: <1595579294.fbe4d7edd5babecb7e886fdbdfb2efbfe19da98a.juippis@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/razercfg/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/razercfg/Manifest sys-apps/razercfg/metadata.xml sys-apps/razercfg/razercfg-0.42.ebuild X-VCS-Directories: sys-apps/razercfg/ X-VCS-Committer: juippis X-VCS-Committer-Name: Joonas Niilola X-VCS-Revision: fbe4d7edd5babecb7e886fdbdfb2efbfe19da98a X-VCS-Branch: master Date: Fri, 24 Jul 2020 08:28:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 5d68e345-e17e-4d5e-9229-37aae46ba1d8 X-Archives-Hash: 983bee05e35604f2c27b6f6b7284974d commit: fbe4d7edd5babecb7e886fdbdfb2efbfe19da98a Author: Alexey Korepanov yandex ru> AuthorDate: Sat Jul 4 16:55:43 2020 +0000 Commit: Joonas Niilola gentoo org> CommitDate: Fri Jul 24 08:28:14 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fbe4d7ed sys-apps/razercfg: version bump 0.42 Closes: https://bugs.gentoo.org/657772 Signed-off-by: Alexey Korepanov yandex.ru> Signed-off-by: Joonas Niilola gentoo.org> sys-apps/razercfg/Manifest | 1 + sys-apps/razercfg/metadata.xml | 15 +++--- sys-apps/razercfg/razercfg-0.42.ebuild | 96 ++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+), 7 deletions(-) diff --git a/sys-apps/razercfg/Manifest b/sys-apps/razercfg/Manifest index 53abff61283..d8ef4efa14f 100644 --- a/sys-apps/razercfg/Manifest +++ b/sys-apps/razercfg/Manifest @@ -1 +1,2 @@ DIST razercfg-0.39.tar.bz2 178142 BLAKE2B cf2d92d24a0dbfdae4045c2dab30a64bc4de64d730c075a4d852790ff62bcbadd714953fac925e69b671355cbdfdec7ce9db5693fbfa8e2aab69de6247c95c1a SHA512 165fee898a01b7f0086eb6705ef9f24fd8b8836025c071f7851a493181b8d193d0db70fc1731a8586de1f1c795aab4d20bb4ee8526b612c66ba3c434c6e10137 +DIST razercfg-0.42.tar.xz 103300 BLAKE2B 83f9432edf4deda78514dd1e2a65e04981d3646c543ebf3b74060f5d6ee5f9c3ddec5b0c544c11c9968c790172ae2bd4d4503adaf1428ca31337fdcd33d8545c SHA512 3856f4133b620fb639a46a5bb02fe8e6c47ae3928a04fe9d1bbef2792a44fdd4f5dff2efa43a1e43d75312025d3c65c626e331e723092e4e0b8d6622657fb197 diff --git a/sys-apps/razercfg/metadata.xml b/sys-apps/razercfg/metadata.xml index 77b7acea528..ba604d21bb6 100644 --- a/sys-apps/razercfg/metadata.xml +++ b/sys-apps/razercfg/metadata.xml @@ -2,17 +2,18 @@ -Utility to for advanced configuration of the following Razer mice: Copperhead -Lachesis (Classic), DeathAdder (Classic, 3500 DPI, Black Edition, 2013), Taipan -Naga (Classic, 2012, 2014, Hex), Krait, Boomslang CE. The tool architecture is -based on "razerd", which is a background daemon doing all of the lowlevel -privilege hardware accesses. The user interface tools are "razercfg", a -commandline tool; and "qrazercfg", a QT4 based graphical device configuration -tool. +The next generation Razer device configuration tool bringing the Razer gaming +experience to the free OpenSource world. +The tool architecture is based on "razerd", which is a background daemon doing +all of the lowlevel privileged hardware accesses. The user interface tools are +"razercfg", a commandline tool; and "qrazercfg", a Qt based graphical device +configuration tool. Installs the pm-utils hooks for suspend/resume and requires sys-power/pm-utils + Installs GUI configuration utility and status bar applet. + Requires dev-python/PyQt5 diff --git a/sys-apps/razercfg/razercfg-0.42.ebuild b/sys-apps/razercfg/razercfg-0.42.ebuild new file mode 100644 index 00000000000..1236531897a --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.42.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) + +inherit cmake python-single-r1 systemd tmpfiles udev + +DESCRIPTION="Utility for advanced configuration of Razer mice" +HOMEPAGE="https://bues.ch/cms/hacking/razercfg.html https://github.com/mbuesch/razer" +SRC_URI="https://bues.ch/${PN}/${P}.tar.xz" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="gui +udev" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +DEPEND="${PYTHON_DEPS} + virtual/libusb:1 +" +BDEPEND="virtual/pkgconfig" +RDEPEND="${DEPEND} + gui? ( + $(python_gen_cond_dep ' + dev-python/PyQt5[${PYTHON_USEDEP}] + ') + ) + udev? ( virtual/udev ) +" + +PATCHES=( "${FILESDIR}/${PN}-0.39-unit-variables.patch" ) + +src_prepare() { + cmake_src_prepare + + sed -i librazer/CMakeLists.txt \ + -e '/ldconfig/{N;d}' \ + -e "s:DESTINATION lib:DESTINATION $(get_libdir):" \ + || die + + sed -i ui/razercfg.desktop.template \ + -e '/^Categories=/s/=.*$/=Qt;Settings/' \ + || die +} + +src_configure() { + local mycmakeargs=( + -DPYTHON="${PYTHON}" + -DSYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" + -DUDEV_DIR="$(get_udevdir)" + ) + RAZERCFG_PKG_BUILD=1 cmake_src_configure +} + +src_install() { + RAZERCFG_PKG_BUILD=1 cmake_src_install + + python_optimize + + newinitd "${FILESDIR}"/razerd.init.d-r2 razerd + dodoc README.* HACKING.* razer.conf + + if ! use gui; then + rm "${D}"/usr/bin/qrazercfg{,-applet} || die + rm -r "${D}"/usr/share/icons || die + rm -r "${D}"/usr/share/applications || die + fi + + # sys-power/pm-utils is deprecated, so we delete related files + # (they contain a hook for resume from suspend) + # TODO: test resume from suspend + rm -r "${D}/etc/pm" || die +} + +pkg_postinst() { + if use udev ; then + udevadm control --reload-rules + udevadm trigger --subsystem-match=usb + fi + + xdg_icon_cache_update + + tmpfiles_process razerd.conf + + if [[ -e "${ROOT}/usr/bin/pyrazer.pyc" ]]; then + eerror "A stale ${ROOT}/usr/bin/pyrazer.pyc exists and will prevent" + eerror "the Python frontends from working until removed manually." + fi +} + +pkg_postrm() { + xdg_icon_cache_update +}