diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-10-04 23:52:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-10-04 23:52:39 +0100 |
commit | 1b2c0d19f75523db182b267901484f87abf732cf (patch) | |
tree | 3c4832e97c3846189d07c64c2eba333bf33b8ab2 /sys-apps/razercfg | |
parent | dd851ab76c56a249df7a0ec052acd90940bc014f (diff) |
gentoo auto-resync : 04:10:2023 - 23:52:39
Diffstat (limited to 'sys-apps/razercfg')
-rw-r--r-- | sys-apps/razercfg/Manifest | 1 | ||||
-rw-r--r-- | sys-apps/razercfg/razercfg-0.42-r1.ebuild | 99 |
2 files changed, 100 insertions, 0 deletions
diff --git a/sys-apps/razercfg/Manifest b/sys-apps/razercfg/Manifest index 8a938f448efe..d0d0fa913931 100644 --- a/sys-apps/razercfg/Manifest +++ b/sys-apps/razercfg/Manifest @@ -1,5 +1,6 @@ AUX razercfg-0.39-unit-variables.patch 712 BLAKE2B 2aeea04ea744bb6ed708d6d1128026ffc5112f9a0611d6eff9fbf2aacb9660bd3698727da5812da5b8937205246d70a20a5f876156b6ebe46638289c0e6cabd9 SHA512 c34c7f314420a1597b0c5aa44f6ae3b55e212d1bb9c00498f5e1525390bb2e62d68ebbe5dabc48468e79f0fe8f2f30b81459a5e9cc0b3e837239d39230fd7238 AUX razerd.init.d-r2 447 BLAKE2B ea72b6e9fa2f32ecede29e910f76f75a0de538c84271245eb8cf4f0715aa36c954e05cedb31c8af8a39b222c001bcdbd738ec5163c18eb58730b8868ae8da592 SHA512 8c9e307bd2a76086f9fa462f04019c9c840681232f1833292d4f64ed030ce83392cf039919f9f830abb4b61e0be65e2637c6bfdb7551291f68626c876ec92af1 DIST razercfg-0.42.tar.xz 103300 BLAKE2B 83f9432edf4deda78514dd1e2a65e04981d3646c543ebf3b74060f5d6ee5f9c3ddec5b0c544c11c9968c790172ae2bd4d4503adaf1428ca31337fdcd33d8545c SHA512 3856f4133b620fb639a46a5bb02fe8e6c47ae3928a04fe9d1bbef2792a44fdd4f5dff2efa43a1e43d75312025d3c65c626e331e723092e4e0b8d6622657fb197 +EBUILD razercfg-0.42-r1.ebuild 2215 BLAKE2B 99c91338ccb23db55cead186ce65bf457d4c08e76d5b3eaf3301364b7788bcf0aa55b8c865c7f1ff5466fc8275827b1cf4d6fd9daf25ac99a623a45ab9f592e8 SHA512 5780af33b5af5212aba1d9cd6b9241824cc6bcb6dd02be091a07b30c63b8cd63071eddfbe4b65e6470e9a2a7c017b67c34fd06725ee2b929e2c227f2623dd474 EBUILD razercfg-0.42.ebuild 2114 BLAKE2B 0a4f134474559139d9d79f4fb396e6c6cf53f86fcc9d55d65ab1515161e15fa52a216aa0958122f0412dd436f03a1b7e5ae7d9e9997154ebee637a6faacbf60a SHA512 79135054b84c439d2b28c3ea650bbf4fe5fa9f52a1e6296e2a797e16264843d4cf5b076bb8c1c566577131f51eebaf85ea645c7cf27eddb931e480c279b8572f MISC metadata.xml 809 BLAKE2B 5b46066b524415984e133f732d0802d7c32f90ce6e856e555bd0bd7cf1a02907e2777a9a1aba74829ec55917b342d01cae78e9f784e4f66ea28cbc2522d9639f SHA512 5f9a513fbe36af7f824fa5f99c8f5fb637cfd4cd3ea6e8cd28f18698986efa0fb8cf40fea7b89ec7c838c0173320d305caca2ebc02c2f285da858836a1503bf7 diff --git a/sys-apps/razercfg/razercfg-0.42-r1.ebuild b/sys-apps/razercfg/razercfg-0.42-r1.ebuild new file mode 100644 index 000000000000..d4ebc90bca0f --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.42-r1.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{9..10} ) + +inherit cmake python-single-r1 systemd tmpfiles udev xdg-utils + +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 + + # Don't clobber toolchain defaults + sed -i -e '/-D_FORTIFY_SOURCE=2/d' scripts/cmake.global || 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 +} + +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 +} |