mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-05-08 12:30:44 +02:00
razercfg: moved to Gentoo finally
This commit is contained in:
parent
f8af040eda
commit
131d8307e1
4 changed files with 0 additions and 141 deletions
|
|
@ -1 +0,0 @@
|
|||
DIST razercfg-0.42.tar.xz 103300 BLAKE2B 83f9432edf4deda78514dd1e2a65e04981d3646c543ebf3b74060f5d6ee5f9c3ddec5b0c544c11c9968c790172ae2bd4d4503adaf1428ca31337fdcd33d8545c SHA512 3856f4133b620fb639a46a5bb02fe8e6c47ae3928a04fe9d1bbef2792a44fdd4f5dff2efa43a1e43d75312025d3c65c626e331e723092e4e0b8d6622657fb197
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2014 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
depend() {
|
||||
use logger
|
||||
}
|
||||
|
||||
PIDFILE=/run/razerd/razerd.pid
|
||||
|
||||
start() {
|
||||
ebegin "Starting razerd"
|
||||
start-stop-daemon --start \
|
||||
--pidfile ${PIDFILE} \
|
||||
--exec /usr/bin/razerd \
|
||||
-- --background --pidfile ${PIDFILE}
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping razerd"
|
||||
start-stop-daemon --stop --pidfile ${PIDFILE}
|
||||
eend $?
|
||||
}
|
||||
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<longdescription>
|
||||
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.
|
||||
</longdescription>
|
||||
<!-- maintainer-needed -->
|
||||
<use>
|
||||
<flag name="pm-utils">Installs the pm-utils hooks for suspend/resume and
|
||||
requires <pkg>sys-power/pm-utils</pkg></flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
|
@ -1,97 +0,0 @@
|
|||
# Copyright 1999-2020 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=7
|
||||
|
||||
PYTHON_COMPAT=( python3_{6..9} )
|
||||
|
||||
inherit cmake python-single-r1 systemd udev
|
||||
|
||||
DESCRIPTION="Utility for advanced configuration of Razer mice"
|
||||
HOMEPAGE="https://bues.ch/cms/hacking/razercfg.html"
|
||||
SRC_URI="https://bues.ch/${PN}/${P}.tar.xz"
|
||||
|
||||
LICENSE="GPL-2+"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64 ~x86"
|
||||
IUSE="+pm-utils +udev qt5"
|
||||
|
||||
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
|
||||
|
||||
CDEPEND="${PYTHON_DEPS}
|
||||
virtual/libusb:1"
|
||||
|
||||
RDEPEND="${CDEPEND}
|
||||
pm-utils? ( sys-power/pm-utils )
|
||||
udev? ( virtual/udev )
|
||||
qt5? ( dev-python/PyQt5 )"
|
||||
|
||||
DEPEND="${CDEPEND}"
|
||||
BDEPEND="virtual/pkgconfig"
|
||||
|
||||
#PATCHES=( "${FILESDIR}/${P}-unit-variables.patch" )
|
||||
|
||||
pkg_setup() {
|
||||
python-single-r1_pkg_setup
|
||||
}
|
||||
|
||||
src_prepare() {
|
||||
sed -i CMakeLists.txt \
|
||||
-e '/udevadm control/{N;d}' \
|
||||
-e '/systemctl/{N;d}' \
|
||||
-e "s:/etc/pm/sleep.d:/usr/$(get_libdir)/pm-utils/sleep.d/:" \
|
||||
-e 's:50-razer:80razer:' \
|
||||
|| die
|
||||
|
||||
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
|
||||
|
||||
cmake_src_prepare
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
newinitd "${FILESDIR}"/razerd.init.d-r2 razerd
|
||||
dodoc README.* HACKING.* razer.conf
|
||||
|
||||
if ! use qt5; then
|
||||
rm "${D%/}"/usr/bin/qrazercfg{,-applet} || die
|
||||
rm "${D%/}"/usr/share/icons/hicolor/scalable/apps/razercfg* || die
|
||||
rm "${D%/}"/usr/share/applications/razercfg.desktop || die
|
||||
fi
|
||||
|
||||
if ! use pm-utils; then
|
||||
rm "${D%/}/usr/$(get_libdir)/pm-utils/sleep.d/80razer" || die
|
||||
fi
|
||||
|
||||
python_optimize "${ED}/$(python_get_sitedir)"
|
||||
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
if use udev ; then
|
||||
udevadm control --reload-rules
|
||||
udevadm trigger --subsystem-match=usb
|
||||
fi
|
||||
|
||||
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
|
||||
}
|
||||
Loading…
Reference in a new issue