sys-apps/openrazer: bump to 3.10.3

Signed-off-by: Maciej Barć <xgqt@gentoo.org>
This commit is contained in:
Maciej Barć 2025-05-07 23:50:19 +02:00
parent 2e07053942
commit 2bc0dd7069
No known key found for this signature in database
GPG Key ID: 031C9FE65BED714A
2 changed files with 176 additions and 0 deletions

View File

@ -1,2 +1,3 @@
DIST openrazer-3.10.1.tar.gz 257196 BLAKE2B 57e6a6957e17d38ec21556ed9f5f7649f29d8713fef823f5b58b2856566f1f7846ca053c951858035c7e87ae2e114f54103d0af0d4a3453d8c46b069e3fea859 SHA512 0887b8321959ad5c4aa34e2bfb13b544890ce4475e7a31db634bd60b0d6bcd95e57489ba5b1781187420113c285b72febdefedc8bf9d9fea42292fd3787b15ca
DIST openrazer-3.10.2.tar.gz 256993 BLAKE2B d1a750d3cb7472289dad5904ad8f9d5941be9e20fe0142d75d8f8742301f29cbfa75cb795412682a24285bc6a48994dd5d3e3254db97b171fed8f1409c1b551a SHA512 2d99c1210581887a6d3231faf2bba132b8c3bfd0377c4c25fdef7a993bf40c6e52cfed97ac5aea4022ac7b2a4f34271a45f8ba51b65ded2fd40aec45aca6bb0b
DIST openrazer-3.10.3.tar.gz 258683 BLAKE2B 5dc0fb388e3a20c3d0a7d214b9c9a179579ec6321abf81bfca5dc859e41aed7884190f3bc12e2bcc4b5d6710dd94e2a865dea77142625be9ccd5c28fa720d705 SHA512 ca4a78a28141b77c133149dee5aa3d996f74a54a590fe57280830ea4b2df527274feb6087fcbc96a6eb85e25bd3178d8dceb140e8fff4f020931c1ffe234601a

View File

@ -0,0 +1,175 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{11..13} )
inherit readme.gentoo-r1 systemd udev xdg-utils distutils-r1 linux-mod-r1
DESCRIPTION="Drivers and user-space daemon to control Razer devices on GNU/Linux"
HOMEPAGE="https://openrazer.github.io/
https://github.com/openrazer/openrazer/"
if [[ "${PV}" == *9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="https://github.com/${PN}/${PN}.git"
else
SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz
-> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="GPL-2+"
SLOT="0"
IUSE="+client +daemon"
REQUIRED_USE="
client? ( daemon )
daemon? ( ${PYTHON_REQUIRED_USE} )
test? ( daemon )
"
RDEPEND="
client? ( dev-python/numpy[${PYTHON_USEDEP}] )
daemon? (
acct-group/plugdev
dev-python/daemonize[${PYTHON_USEDEP}]
dev-python/dbus-python[${PYTHON_USEDEP}]
dev-python/notify2[${PYTHON_USEDEP}]
dev-python/pygobject:3[${PYTHON_USEDEP}]
dev-python/pyudev[${PYTHON_USEDEP}]
dev-python/setproctitle[${PYTHON_USEDEP}]
x11-libs/gtk+:3[introspection]
x11-misc/xautomation
x11-misc/xdotool
)
"
BDEPEND="
${RDEPEND}
virtual/linux-sources
"
DOCS=( README.md )
DOC_CONTENTS="To successfully use OpenRazer: load desired kernel module
(razeraccessory, razerkbd, razerkraken and/or razermouse),
add your user to the \"plugdev\" group and start the OpenRazer daemon.
To automatically start up the OpenRazer daemon on session login copy
/usr/share/openrazer/openrazer-daemon.desktop file into Your user's
~/.config/autostart/ directory."
distutils_enable_tests unittest
python_compile() {
cd "${S}/daemon" || die
distutils_pep517_install "${BUILD_DIR}/install"
if use client ; then
cd "${S}/pylib" || die
distutils_pep517_install "${BUILD_DIR}/install"
fi
}
python_install() {
distutils-r1_python_install
python_scriptinto /usr/bin
python_newscript daemon/run_openrazer_daemon.py "${PN}-daemon"
}
src_prepare() {
xdg_environment_reset
if use daemon ; then
distutils-r1_src_prepare
else
default
fi
# Remove bad tests.
rm daemon/tests/test_effect_sync.py || die
}
src_compile() {
local -a modargs=(
SUBDIRS="${S}/driver"
KERNELDIR="${KERNEL_DIR}"
)
local -a modlist=(
{razeraccessory,razerkbd,razerkraken,razermouse}="hid:${S}:driver"
)
linux-mod-r1_src_compile
if use daemon ; then
distutils-r1_src_compile
emake -C "${S}/daemon" PREFIX=/usr service
fi
readme.gentoo_create_doc
}
src_test() {
cd daemon/tests || die
distutils-r1_src_test
}
src_install() {
linux-mod-r1_src_install
udev_dorules install_files/udev/99-razer.rules
exeinto "$(get_udevdir)"
doexe install_files/udev/razer_mount
# Install configuration example so that the daemon does not complain.
insinto /usr/share/${PN}
newins daemon/resources/razer.conf razer.conf.example
if use daemon ; then
# Python libraries/scripts, "client" also requires USE="daemon"
distutils-r1_src_install
# dbus service
insinto /usr/share/dbus-1/services
doins daemon/org.razer.service
# systemd unit
systemd_douserunit "daemon/${PN}-daemon.service"
# xdg autostart example file
insinto /usr/share/${PN}
doins install_files/desktop/openrazer-daemon.desktop
# Manpages
doman daemon/resources/man/${PN}-daemon.8
doman daemon/resources/man/razer.conf.5
fi
}
pkg_postinst() {
linux-mod-r1_pkg_postinst
udev_reload
if use daemon ; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
readme.gentoo_print_elog
}
pkg_postrm() {
udev_reload
if use daemon ; then
xdg_icon_cache_update
xdg_desktop_database_update
fi
}