converters/py-tlv8: encoder of arbitrary data

Sponsored by:   Serenity Cybersecurity, LLC
Co-authored-by:	Gleb Popov <arrowd@FreeBSD.org>
This commit is contained in:
Shapovalov Alexey 2024-07-02 21:36:38 +03:00 committed by Gleb Popov
parent e5c2e9d228
commit 3d1012dcda
8 changed files with 68 additions and 0 deletions

View file

@ -137,6 +137,7 @@
SUBDIR += py-libimobiledevice
SUBDIR += py-libscrc
SUBDIR += py-libusbsio
SUBDIR += py-nkdfu
SUBDIR += py-pylink-square
SUBDIR += py-pymodbus
SUBDIR += py-pyocd

31
comms/py-nkdfu/Makefile Normal file
View file

@ -0,0 +1,31 @@
PORTNAME= nkdfu
PORTVERSION= 0.2
CATEGORIES= comms python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= aishapoval@mts.ru
COMMENT= Python DFU tool for updating Nitrokeys' firmware (Nitrokey Pro only)
WWW= https://github.com/Nitrokey/nkdfu
LICENSE= GPLv2
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fire>=0:devel/py-fire@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tqdm>=0:misc/py-tqdm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}intelhex>=2.3.0:devel/py-intelhex@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}libusb1>=1.9.3:devel/py-libusb1@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}fire>=0:devel/py-fire@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tqdm>=0:misc/py-tqdm@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}intelhex>=2.3.0:devel/py-intelhex@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}libusb1>=1.9.3:devel/py-libusb1@${PY_FLAVOR}
PEP517_BUILD_CMD= ${PYTHON_CMD} -m flit_core.wheel
PEP517_BUILD_DEPEND= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.2.0<4:devel/py-flit-core@${PY_FLAVOR}
USES= python shebangfix
USE_PYTHON= autoplist pep517
SHEBANG_FILES= nkdfu/dfu_flash.py
NO_ARCH= yes
.include <bsd.port.mk>

3
comms/py-nkdfu/distinfo Normal file
View file

@ -0,0 +1,3 @@
TIMESTAMP = 1706027633
SHA256 (nkdfu-0.2.tar.gz) = f25f75ddd382c47285b6943cde9f51577b1496ed284f93d58b5e054ae609f5f8
SIZE (nkdfu-0.2.tar.gz) = 16700

3
comms/py-nkdfu/pkg-descr Normal file
View file

@ -0,0 +1,3 @@
nkdfu is a Python DFU tool for updating Nitrokeys' firmware. Currently
supports Nitrokey Pro only. Based on python-dfu project, which brings
implementation of USB DFU 1.1 spec

View file

@ -155,6 +155,7 @@
SUBDIR += py-rencode
SUBDIR += py-svglib
SUBDIR += py-text-unidecode
SUBDIR += py-tlv8
SUBDIR += py-unidecode
SUBDIR += py-webencodings
SUBDIR += py-zfec

View file

@ -0,0 +1,22 @@
PORTNAME= tlv8
PORTVERSION= 0.10.0
CATEGORIES= converters python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= awoonyaa@gmail.com
COMMENT= Python module to handle type-length-value encoded data 8-bit type
WWW= https://pypi.org/project/tlv8/
LICENSE= APACHE20
BUILD_DEPENDS= ${PY_SETUPTOOLS} \
${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}setuptools-scm>0:devel/py-setuptools-scm@${PY_FLAVOR}
USES= python
USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1706036438
SHA256 (tlv8-0.10.0.tar.gz) = 7930a590267b809952272ac2a27ee81b99ec5191fa2eba08050e0daee4262684
SIZE (tlv8-0.10.0.tar.gz) = 16054

View file

@ -0,0 +1,4 @@
Type-Length-Value (TLV) are used to encode arbitrary data. In this case the type
and length are represented by 1 byte each. Hence the name TLV8.
This Python library implements encoding and decoding of TLV8 data.