diff options
Diffstat (limited to 'sys-apps/razercfg')
-rw-r--r-- | sys-apps/razercfg/Manifest | 11 | ||||
-rw-r--r-- | sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch | 21 | ||||
-rw-r--r-- | sys-apps/razercfg/files/razerd.init.d-r1 | 25 | ||||
-rw-r--r-- | sys-apps/razercfg/files/razerd.init.d-r2 | 25 | ||||
-rw-r--r-- | sys-apps/razercfg/metadata.xml | 19 | ||||
-rw-r--r-- | sys-apps/razercfg/razercfg-0.23.ebuild | 55 | ||||
-rw-r--r-- | sys-apps/razercfg/razercfg-0.39-r1.ebuild | 91 | ||||
-rw-r--r-- | sys-apps/razercfg/razercfg-0.39.ebuild | 82 |
8 files changed, 329 insertions, 0 deletions
diff --git a/sys-apps/razercfg/Manifest b/sys-apps/razercfg/Manifest new file mode 100644 index 000000000000..c862a5a050db --- /dev/null +++ b/sys-apps/razercfg/Manifest @@ -0,0 +1,11 @@ +AUX razercfg-0.39-unit-variables.patch 712 SHA256 41b515c8d79d73e768b09b10f8affc6d59f51f3b13a06f816d0e9af200ed6a07 SHA512 c34c7f314420a1597b0c5aa44f6ae3b55e212d1bb9c00498f5e1525390bb2e62d68ebbe5dabc48468e79f0fe8f2f30b81459a5e9cc0b3e837239d39230fd7238 WHIRLPOOL ccf042f695db5e16dddcc09139eab0bd02fe01c777a45bca9c07057dd270a494d1b5ab6f486d899766f7191def150a5a565ac6d5f78197abfdde514025a99668 +AUX razerd.init.d-r1 448 SHA256 1692cc4e52fa4d8232d022cd68fc14f8b714a0aebd63aaa1a396b77ea051ea75 SHA512 4228b7d18c546e6c8d840c3ff3b4e3690e89e70bab156e3f6646c9fb68c23adb0ec0ca40fbbe28d3c768c75a0b27deec2890df26566e40c02e4dbe7f4890530a WHIRLPOOL bec0898ba58559365804caff0ec68de9eb8a2c227a1a8752c62e504877bf80772162616f915fe1923181e3f27fee9e35abc02e66a2410570e0a63d73dfc3d228 +AUX razerd.init.d-r2 447 SHA256 1c1c7b547fa1fbcb29ecc6379d10b1824d332f2b050d8c4fb4d8529f4f3fa820 SHA512 8c9e307bd2a76086f9fa462f04019c9c840681232f1833292d4f64ed030ce83392cf039919f9f830abb4b61e0be65e2637c6bfdb7551291f68626c876ec92af1 WHIRLPOOL 5522850950a4fd13181de0ed66e1aedfc5b1dd58d00ca5f2fa10971cf05f18278519ff5c088b20059f034c11c97715188c745db888eb61b71dafbe040bba6529 +DIST razercfg-0.23.tar.bz2 69425 SHA256 44bdc48588c504a937d811e84a0ecb054e35d3e2e4980d7d76b3ea8c2f0d1b43 SHA512 79c795870efa960b42abc70710b4bebe793acb9e732943207ca4b34d35ba926af4877993db888829dbacedbe327324fba0ab2ef82ced1d653b4aee23e154fd8b WHIRLPOOL 11c57842daeb241d19b3546db0c4b3a98e59b565176f89227dd159f31b3037ce08130014dc35ae4db5dc81744a94a405252787b6a42c67129857f81f6eb0411c +DIST razercfg-0.39.tar.bz2 178142 SHA256 b8554a529fc02a05f515b56d335c326d660058d6fcdb2e3c4929b9b9dedf614d SHA512 165fee898a01b7f0086eb6705ef9f24fd8b8836025c071f7851a493181b8d193d0db70fc1731a8586de1f1c795aab4d20bb4ee8526b612c66ba3c434c6e10137 WHIRLPOOL eb5122226ad79594ea9396e141b9f7d98b52298fc09f06bcdd92be53101af6430a56864aa285c10b52ae004f734385c9155ba2d995ad661f764855e4a724ae05 +EBUILD razercfg-0.23.ebuild 1394 SHA256 b788cc096a579263bad6dfdad2dd74109f0402b7d4fb65a5c10ee9e5328a3bde SHA512 052e0c1258382a048f8d85e86788b9b69cdf7bc620c8d0434558fb55f3066564b4d9a7cbdf48b9b37f5a30f8f9a4dd4047df3954058d77823a7a3b1837e2e6af WHIRLPOOL 749cccdf78026b214a46e3225fc72c3b4cb39f4b3544b1554dccd0596615be13e02553ef193cf00849a57c77adc87e407485b53ef467be322a5391e5d94834b7 +EBUILD razercfg-0.39-r1.ebuild 2183 SHA256 8d933046d0ed94a2f9d6e752bb6ad3a549a8749d5c5f4ec7465097427a087c18 SHA512 3384e569c0fd3f20ea61aee8e65ba0c27a3af312be94bca6ed27ea4c1179a3ea0cd1b9431d5d1b8f997d5b4f99a6e74285a5fcf2fc50bdc9780e8cd08dfde260 WHIRLPOOL f378fdbe2a2dbd5a9e206d3df75d7561fea1c5388911d75400b31b8fd75e6ac0c25af577dc80385728af0a8ff9ef4a7d677c679636126b553d751652c28c8789 +EBUILD razercfg-0.39.ebuild 2068 SHA256 07e2ac08e11c7e18f7fc4b99ee18e9f46c21965a4ea32161f4a4eb526317277e SHA512 62d71180d95d67250ca7e44005274b62f561ceedd4bf5b71792513772c013a308b16e848f1396d6b6c25e513d17f2ca83d79f778721b2cd9cff4a13d6ae29ac3 WHIRLPOOL 882b028add037f52c043a073224c96c53ca87c9750cf59862e07a97725d09d67aec9049048cc07488b7ce20aa3abd209f55bccbf9093738478732b30681a8841 +MISC ChangeLog 3832 SHA256 57ee1f1ffcc4cdb9abdb1120eb3957f07dfa61a7c6aabed4581be81d94a47ed9 SHA512 082de68d14c326f154e24d44797a99f1e87fe529835bf206884b18bc863dcae468714f9b5ebd201e227dc953edd9f46fc03b4516226f250179e1575407599b96 WHIRLPOOL e12280e98e90a7e25ea2ae65fb186964573c5c66a389c57075e0cf1c41ea0bff2054472b67274d1fac5c994595ae4424487bdac056aa04fe1d5cc91391c53cc5 +MISC ChangeLog-2015 5436 SHA256 67f3a8e880c8437bc02b29b6e92c54829ee706e78cfb05da7beebce86a3dae88 SHA512 1fd478ee79b3f6d93fd5d858692b3d17f9d5a33e9d8b1d6ef894259bcc4c31bdbfdccc09adbc8263f7cae5fc54fadb12b9d4ed50c0987563f10c476810db32af WHIRLPOOL c521303e2152bd17358d79539d319168dc0894b8407a2571d0df78b31dac11d45ebf4716c8e50515786f20c076e1430ef1e3f78db653a49742ef7869f5f511dc +MISC metadata.xml 886 SHA256 65366b8ec3bc391cb2e31a56cd9e455d24118134d047b320a676f7022fb39a3a SHA512 2076e37094d47851ca979be25c695bdb40533d1adfa81520992a1a6c88191c5cfac2e61f0ad2ee50efef0b7fcfe3b0aca993275aa1c05559d09644d37f466599 WHIRLPOOL 95fa33be10979d95123d4b765397f8de58c9229180900f9f82de479c0fb84a3bcc4a9f6031659517a004a418f91733849ddf80673a650365c3b509f447d4588d diff --git a/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch b/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch new file mode 100644 index 000000000000..c17e529c49f2 --- /dev/null +++ b/sys-apps/razercfg/files/razercfg-0.39-unit-variables.patch @@ -0,0 +1,21 @@ +We set these variables in the ebuild, so don't override them. + +--- a/scripts/cmake.global ++++ b/scripts/cmake.global +@@ -27,16 +27,6 @@ + include_directories(AFTER ${LIBUSB_INCLUDE_PATH}) + set(CMAKE_REQUIRED_INCLUDES "${LIBUSB_INCLUDE_PATH};${CMAKE_REQUIRED_INCLUDES}") + +-execute_process(COMMAND pkg-config --variable=systemdsystemunitdir systemd +- OUTPUT_VARIABLE SYSTEMD_UNIT_DIR +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- +-execute_process(COMMAND pkg-config --variable=udevdir udev +- OUTPUT_VARIABLE UDEV_DIR +- ERROR_QUIET +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- + macro(INSTALL_EXEC_CMD _COMMAND _FAILMSG) + install(CODE " + execute_process(COMMAND ${_COMMAND} RESULT_VARIABLE install_exec_res) diff --git a/sys-apps/razercfg/files/razerd.init.d-r1 b/sys-apps/razercfg/files/razerd.init.d-r1 new file mode 100644 index 000000000000..304d91196bc0 --- /dev/null +++ b/sys-apps/razercfg/files/razerd.init.d-r1 @@ -0,0 +1,25 @@ +#!/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/sbin/razerd \ + -- --background --pidfile ${PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping razerd" + start-stop-daemon --stop --pidfile ${PIDFILE} + eend $? +} + diff --git a/sys-apps/razercfg/files/razerd.init.d-r2 b/sys-apps/razercfg/files/razerd.init.d-r2 new file mode 100644 index 000000000000..dd4ab9fd40b2 --- /dev/null +++ b/sys-apps/razercfg/files/razerd.init.d-r2 @@ -0,0 +1,25 @@ +#!/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 $? +} + diff --git a/sys-apps/razercfg/metadata.xml b/sys-apps/razercfg/metadata.xml new file mode 100644 index 000000000000..101f51bc68a6 --- /dev/null +++ b/sys-apps/razercfg/metadata.xml @@ -0,0 +1,19 @@ +<?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> + <flag name="qt4">Installs a qt UI. Requires <pkg>dev-python/pyside</pkg></flag> +</use> +</pkgmetadata> diff --git a/sys-apps/razercfg/razercfg-0.23.ebuild b/sys-apps/razercfg/razercfg-0.23.ebuild new file mode 100644 index 000000000000..da7963b40fd4 --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.23.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit cmake-utils multilib eutils udev python-single-r1 + +DESCRIPTION="Utility for advanced configuration of Razer mice (DeathAdder, Krait, Lachesis)" + +HOMEPAGE="http://bues.ch/cms/hacking/razercfg.html" +SRC_URI="http://bues.ch/${PN}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 x86" +IUSE="+pm-utils qt4" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + pm-utils? ( sys-power/pm-utils ) + qt4? ( dev-python/PyQt4 )" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -i \ + -e '/ldconfig/{N;d}' \ + -e '/udevadm control/{N;d}' \ + -e "s:/etc/udev/rules.d/:$(get_udevdir)/rules.d/:" \ + -e 's:01-razer-udev.rules:40-razercfg.rules:' \ + -e "s:/etc/pm/sleep.d:/usr/$(get_libdir)/pm-utils/sleep.d/:" \ + -e 's:50-razer:80razer:' \ + librazer/CMakeLists.txt \ + || die "sed failed" +} + +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}"/razerd.init.d-r1 razerd + dodoc README razer.conf + + if ! use qt4; then + rm "${D}"/usr/bin/qrazercfg + else + make_desktop_entry qrazercfg "Razer Mouse Settings" mouse "Qt;Settings" + fi + + use pm-utils || rm "${D}"/usr/$(get_libdir)/pm-utils/sleep.d/80razer + + python_fix_shebang "${ED}"usr/bin +} + +pkg_postinst() { + udevadm control --reload-rules && udevadm trigger --subsystem-match=usb +} diff --git a/sys-apps/razercfg/razercfg-0.39-r1.ebuild b/sys-apps/razercfg/razercfg-0.39-r1.ebuild new file mode 100644 index 000000000000..ec711690643a --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.39-r1.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python{3_4,3_5,3_6} ) + +inherit cmake-utils 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.bz2" + +LICENSE="GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+pm-utils qt4 +udev" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + virtual/libusb:1 + pm-utils? ( sys-power/pm-utils ) + qt4? ( >=dev-python/pyside-1.2.1[${PYTHON_USEDEP}] ) + udev? ( virtual/udev ) +" +DEPEND="${PYTHON_DEPS} + dev-python/setuptools[${PYTHON_USEDEP}] + virtual/libusb:1 + virtual/pkgconfig +" + +PATCHES=( "${FILESDIR}/${P}-unit-variables.patch" ) + +src_prepare() { + default + + 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 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-utils_src_configure +} + +src_install() { + RAZERCFG_PKG_BUILD=1 cmake-utils_src_install + + newinitd "${FILESDIR}"/razerd.init.d-r2 razerd + dodoc README.* HACKING.* razer.conf + + if ! use qt4; 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 +} + +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 +} diff --git a/sys-apps/razercfg/razercfg-0.39.ebuild b/sys-apps/razercfg/razercfg-0.39.ebuild new file mode 100644 index 000000000000..22ec48cf5caf --- /dev/null +++ b/sys-apps/razercfg/razercfg-0.39.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python3_4 python3_5 python3_6 ) + +inherit cmake-utils multilib udev python-single-r1 + +DESCRIPTION="Utility for advanced configuration of Razer mice" + +HOMEPAGE="http://bues.ch/cms/hacking/razercfg.html" +SRC_URI="http://bues.ch/${PN}/${P}.tar.bz2" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+pm-utils qt4 systemd +udev" +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +RDEPEND="${PYTHON_DEPS} + qt4? ( >=dev-python/pyside-1.2.1[${PYTHON_USEDEP}] ) + systemd? ( sys-apps/systemd ) + udev? ( virtual/udev ) + pm-utils? ( sys-power/pm-utils ) + virtual/libusb:1" +DEPEND="${PYTHON_DEPS} + virtual/pkgconfig + dev-python/setuptools[${PYTHON_USEDEP}] + virtual/libusb:1" + +src_prepare() { + default + + 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 failed" + + sed -i librazer/CMakeLists.txt \ + -e '/ldconfig/{N;d}' \ + -e "s:DESTINATION lib:DESTINATION $(get_libdir):" \ + || die "sed failed" + + sed -i razercfg.desktop.template \ + -e '/^Categories=/s/=.*$/=Qt;Settings/' \ + || die 'sed failed' +} + +src_configure() { + mycmakeargs=( -DPYTHON="${PYTHON}" ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + newinitd "${FILESDIR}"/razerd.init.d-r2 razerd + dodoc README.* HACKING.* razer.conf + + if ! use qt4; 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 +} + +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 +} |