forked from freebsd/freebsd-ports
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 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,52 @@ | ||
PORTNAME= esphome-flasher | ||
DISTVERSION= 1.4.0 | ||
CATEGORIES= comms python | ||
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} | ||
|
||
MAINTAINER= [email protected] | ||
COMMENT= Simple GUI tool to flash ESPs over USB | ||
|
||
LICENSE= MIT | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= esphome | ||
USES= python:3.7+ | ||
USE_PYTHON= autoplist distutils | ||
USE_WX= 3.2+ | ||
WX_COMPS= python:run | ||
DESKTOP_ENTRIES="ESPHome-Flasher" "${COMMENT}" \ | ||
"${PREFIX}/share/pixmaps/${PORTNAME}.ico" \ | ||
"esphomeflasher" "" true | ||
PLIST_FILES= ${PREFIX}/share/pixmaps/${PORTNAME}.ico | ||
|
||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}esptool>=3.2:comms/py-esptool@${PY_FLAVOR} \ | ||
${PYTHON_PKGNAMEPREFIX}requests>=2.25.1:www/py-requests@${PY_FLAVOR} | ||
|
||
post-patch: | ||
.for __RUN_DEPEND in ${RUN_DEPENDS} | ||
@${ECHO} -n "${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}: " | ||
@${GREP} -E "^${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)" \ | ||
${WRKSRC}/requirements.txt | \ | ||
${SED} -E "s/${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)([.0-9]*)/\2/g" | \ | ||
${TR} -cd '[:print:]' | ||
@${ECHO} " -> ${__RUN_DEPEND:C/.*(>|<|==|>=|<=)(.*)[:].*/\2/}" | ||
|
||
@${REINPLACE_CMD} -E \ | ||
-e "s/(^|\")${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}(>|<|==|>=|<=)[.0-9]*/\1${__RUN_DEPEND:C/(.*)(>|<|==|>=|<=).*/\1/}>=${__RUN_DEPEND:C/.*(>|<|==|>=|<=)(.*)[:].*/\2/}/g" \ | ||
${WRKSRC}/setup.py \ | ||
${WRKSRC}/requirements.txt | ||
.endfor | ||
# Show all serial ports. | ||
@${REINPLACE_CMD} -e 's| or "VID:PID" not in info||g' \ | ||
${WRKSRC}/esphomeflasher/helpers.py | ||
# Patch for 4x esptool. | ||
@${REINPLACE_CMD} -e 's|esptool.ESPLoader.detect_chip|esptool.cmds.detect_chip|g' \ | ||
-e 's|esptool.DETECTED_FLASH_SIZES.get|esptool.cmds.DETECTED_FLASH_SIZES.get|g' \ | ||
${WRKSRC}/esphomeflasher/common.py | ||
|
||
post-install: | ||
${INSTALL_DATA} ${WRKSRC}/icon.ico \ | ||
${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.ico | ||
|
||
.include <bsd.port.mk> |
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 @@ | ||
TIMESTAMP = 1641801910 | ||
SHA256 (esphome-esphome-flasher-1.4.0_GH0.tar.gz) = 36054c3b9b2d66354dcafaf97ae629070a65732d30fd6a1e5ded3e0f052b6e60 | ||
SIZE (esphome-esphome-flasher-1.4.0_GH0.tar.gz) = 76985 |
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,15 @@ | ||
ESPHome-Flasher is a utility app for the ESPHome framework and is | ||
designed to make flashing ESPs with ESPHome as simple as possible by: | ||
- Having pre-built binaries for most operating systems. | ||
- Hiding all non-essential options for flashing. All necessary options | ||
for flashing (bootloader, flash mode) are automatically extracted from | ||
the binary. | ||
|
||
This project was originally intended to be a simple command-line tool, | ||
but then I decided that a GUI would be nice. As I don't like writing | ||
graphical front end code, the GUI largely is based on the NodeMCU | ||
PyFlasher project. | ||
|
||
The flashing process is done using the esptool library by espressif. | ||
|
||
WWW: https://github.com/esphome/esphome-flasher |