libftdi1: add version check override
authorGeorge Sapkin <redacted>
Mon, 11 May 2026 14:50:26 +0000 (16:50 +0200)
committerGeorge Sapkin <redacted>
Sun, 17 May 2026 11:35:31 +0000 (14:35 +0300)
Add explicit ftdi_eeprom version and a matching version check override.

Signed-off-by: George Sapkin <redacted>
libs/libftdi1/Makefile
libs/libftdi1/test-version.sh [new file with mode: 0755]

index 09688603b149904a63b0613e9ab7f39110a3a221..33713c665de925fb008ee1438d041033887b5575 100644 (file)
@@ -1,4 +1,3 @@
-#
 # Copyright (C) 2014-2017 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
@@ -9,7 +8,8 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libftdi1
 PKG_VERSION:=1.5
-PKG_RELEASE:=2
+PKG_FTDI_EEPROM_VERSION:=0.17
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://www.intra2net.com/en/developer/libftdi/download/
@@ -35,7 +35,7 @@ endef
 
 define Package/libftdi1/description
   libFTDI - FTDI USB driver with bitbang mode
-  libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode. 
+  libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, FT2232C, FT2232H, FT4232H, FT2232D and FT245R, including the popular bitbang mode.
   The library is linked with your program in userspace, no kernel driver required.
 endef
 
@@ -45,6 +45,7 @@ define Package/ftdi_eeprom
   DEPENDS:=+confuse +libftdi1
   TITLE:=Tool for reading/erasing/flashing FTDI USB chip eeproms
   URL:=https://www.intra2net.com/en/developer/libftdi/
+  VERSION:=$(PKG_FTDI_EEPROM_VERSION)-r$(PKG_RELEASE)
 endef
 
 define Package/ftdi_eeprom/description
diff --git a/libs/libftdi1/test-version.sh b/libs/libftdi1/test-version.sh
new file mode 100755 (executable)
index 0000000..9f102a0
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# shellckeck shell=busybox
+
+case "$PKG_NAME" in
+ftdi_eeprom)
+       ftdi_eeprom --version 2>&1 | grep -F "$PKG_VERSION"
+       ;;
+
+libftdi1)
+       exit 0
+       ;;
+
+*)
+       echo "Untested package: $PKG_NAME" >&2
+       exit 1
+       ;;
+esac
git clone https://git.99rst.org/PROJECT