-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1891 from pentoo/python3_12_testing
python3 12 testing
- Loading branch information
Showing
7 changed files
with
114 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/sh | ||
|
||
usage() { | ||
printf "The following firmware's are supported:\n" | ||
printf "Nordic Semiconductor Bootloader\n" | ||
printf "CrazyRadio Firmware\n" | ||
printf "RFStorm Research Firmware\n" | ||
printf "run \"mousejack install\"\n\n" | ||
printf "To flash Logitech Unifying Dongle C-U0007\n" | ||
printf "run \"mousejack logitech_install\"\n\n" | ||
} | ||
|
||
if [ -z "${1}" ]; then | ||
usage | ||
exit 1 | ||
fi | ||
|
||
#parse args | ||
while true; do | ||
case $1 in | ||
-h|--help) | ||
usage | ||
exit 0 | ||
;; | ||
install) | ||
/usr/share/mousejack/prog/usb-flash.py /usr/share/mousejack/dongle.bin | ||
exit $? | ||
;; | ||
logitech_install) | ||
/usr/share/mousejack/prog/logitech-usb-flash.py /usr/share/mousejack/dongle.formatted.bin /usr/share/mousejack/dongle.formatted.ihx | ||
exit $? | ||
;; | ||
--) | ||
shift | ||
break | ||
;; | ||
*) | ||
break | ||
;; | ||
esac | ||
shift | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>Zero_Chaos</name> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="github">kuzmin-no/nrf-research-firmware-python3</remote-id> | ||
</upstream> | ||
</pkgmetadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Copyright 1999-2024 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=8 | ||
PYTHON_COMPAT=( python3_{10..12} ) | ||
inherit python-single-r1 | ||
|
||
DESCRIPTION="Firmware and research tools for nRF24LU1+ based USB dongles and breakout boards" | ||
HOMEPAGE="https://www.mousejack.com/" | ||
if [ "${PV}" = "9999" ]; then | ||
inherit git-r3 | ||
EGIT_REPO_URI="https://github.com/kuzmin-no/nrf-research-firmware-python3.git" | ||
else | ||
COMMIT="e4de36685d9f9161430e724ce0e63f8c850e0fba" | ||
SRC_URI="https://github.com/kuzmin-no/nrf-research-firmware-python3/archive/${COMMIT}.tar.gz -> ${P}.tar.gz" | ||
S="${WORKDIR}/nrf-research-firmware-${COMMIT}" | ||
KEYWORDS="~amd64 ~x86" | ||
fi | ||
|
||
LICENSE="GPL-3+" | ||
SLOT="0" | ||
REQUIRED_USE=${PYTHON_REQUIRED_USE} | ||
|
||
DEPEND="dev-embedded/sdcc[device-lib,mcs51]" | ||
RDEPEND="${DEPEND} | ||
${PYTHON_DEPS} | ||
dev-embedded/platformio[${PYTHON_SINGLE_USEDEP}] | ||
$(python_gen_cond_dep ' | ||
dev-python/pyusb[${PYTHON_USEDEP}] | ||
')" | ||
|
||
src_prepare() { | ||
mv tools/lib tools/nrf24 || die | ||
# This is needed, qa warning is false because this is a no-op on tools/nrf24-reset-radio.py | ||
for file in tools/nrf24-*; do | ||
sed -i 's#from lib#from nrf24#' ${file} || die | ||
done | ||
default | ||
} | ||
src_install() { | ||
insinto /usr/share/${PN} | ||
doins bin/dongle.{bin,formatted.bin,formatted.ihx} | ||
|
||
python_domodule tools/nrf24 | ||
python_doscript tools/nrf24-* | ||
|
||
python_scriptinto /usr/share/${PN}/prog | ||
python_doscript prog/usb-flasher/usb-flash.py | ||
python_doscript prog/usb-flasher/logitech-usb-flash.py | ||
python_doscript prog/usb-flasher/unifying.py | ||
|
||
dosbin "${FILESDIR}/mousejack" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sys-apps/portage gentoo-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
# This script automatically deletes any local branches which have been merged | ||
git branch --merged | grep -v master | xargs git branch -d |