Skip to content

Commit 384bdbc

Browse files
authored
use unified version management and saperate script files (#85)
* Add unified version management and update package versions for qmodem applications and saperate script files * qmodem: define package architecture as 'all' in Makefile
1 parent b14742d commit 384bdbc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+276
-79
lines changed

.github/workflows/commit_check_supportlist.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- 'main'
66
# only run when "luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json" is changed
77
paths:
8-
- 'luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json'
8+
- 'application/qmodem/files/usr/share/qmodem/modem_support.json'
99

1010
env:
1111
TZ: Asia/Shanghai
@@ -29,7 +29,7 @@ jobs:
2929
cd qmodem
3030
is_json_invalid=0
3131
is_diff=0
32-
python3 ./scripts/update_support_list.py temp_support_list ./luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json || is_json_invalid=1
32+
python3 ./scripts/update_support_list.py temp_support_list ./application/qmodem/files/usr/share/qmodem/modem_support.json || is_json_invalid=1
3333
diff ./temp_support_list.md ./docs/support_list.md -u > /tmp/file_diff.txt || is_diff=1
3434
if [ "$is_json_invalid" == "1" ];then
3535
exit 1

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
id: update_modem_support_list
5959
run: |
6060
cd qmodem
61-
python3 ./scripts/update_support_list.py temp_support_list ./luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json
61+
python3 ./scripts/update_support_list.py temp_support_list ./application/qmodem/files/usr/share/qmodem/modem_support.json
6262
mv temp_support_list_release_notes.md ./release_note.md
6363
6464
- name: Upload Release Note

.github/workflows/pr_check_supportlist.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
# only run when "luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json" is changed
55
paths:
6-
- 'luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json'
6+
- 'application/qmodem/files/usr/share/qmodem/modem_support.json'
77

88
env:
99
TZ: Asia/Shanghai
@@ -31,7 +31,7 @@ jobs:
3131
run: |
3232
cd pr_branch
3333
is_json_invalid=0
34-
python3 ./scripts/update_support_list.py temp_support_list ./luci/luci-app-qmodem/root/usr/share/qmodem/modem_support.json || is_json_invalid=1
34+
python3 ./scripts/update_support_list.py temp_support_list ./application/qmodem/files/usr/share/qmodem/modem_support.json || is_json_invalid=1
3535
3636
if [ "$is_json_invalid" = "1" ]; then
3737
echo "pr_close=1" >> $GITHUB_OUTPUT
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
luci-app-qmodem
22
luci-app-qmodem-sms
3+
qmodem

application/qmodem/Makefile

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
include $(TOPDIR)/rules.mk
2+
include $(INCLUDE_DIR)/kernel.mk
3+
4+
# Include unified version
5+
include ../../version.mk
6+
7+
PKG_NAME:=qmodem
8+
PKG_RELEASE:=$(QMODEM_RELEASE)
9+
PKG_VERSION:=$(QMODEM_VERSION)
10+
11+
include $(INCLUDE_DIR)/package.mk
12+
13+
define Package/$(PKG_NAME)
14+
PKGARCH:=all
15+
SECTION:=utils
16+
CATEGORY:=Utilities
17+
TITLE:=QModem scripts
18+
DEPENDS:= \
19+
+kmod-usb2 +kmod-usb3 \
20+
+kmod-usb-serial +kmod-usb-serial-option +kmod-usb-serial-qualcomm \
21+
+kmod-usb-net +kmod-usb-acm \
22+
+kmod-usb-wdm \
23+
+kmod-usb-net-cdc-ether \
24+
+kmod-usb-net-cdc-mbim \
25+
+kmod-usb-net-rndis \
26+
+kmod-usb-net-cdc-ncm +kmod-usb-net-huawei-cdc-ncm \
27+
+tom_modem +terminfo +sms-tool_q \
28+
+jq +bc\
29+
+coreutils +coreutils-stat \
30+
+usbutils \
31+
+ndisc6 \
32+
+PACKAGE_luci-app-qmodem_INCLUDE_generic-qmi-wwan:kmod-usb-net-qmi-wwan \
33+
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_q \
34+
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_f \
35+
+PACKAGE_luci-app-qmodem_INCLUDE_vendor-qmi-wwan:kmod-qmi_wwan_s \
36+
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:kmod-pcie_mhi \
37+
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_PCI_SUPPORT:pciutils \
38+
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_MTK_T7XX_SUPPORT:umbim \
39+
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_MTK_T7XX_SUPPORT:kmod-mtk-t7xx \
40+
+PACKAGE_luci-app-qmodem_INCLUDE_ADD_QFIREHOSE_SUPPORT:qfirehose \
41+
+PACKAGE_luci-app-qmodem_USE_TOM_CUSTOMIZED_QUECTEL_CM:quectel-CM-5G-M \
42+
+PACKAGE_luci-app-qmodem_USING_QWRT_QUECTEL_CM_5G:quectel-CM-5G \
43+
+PACKAGE_luci-app-qmodem_USING_NORMAL_QUECTEL_CM:quectel-cm
44+
endef
45+
46+
define Package/$(PKG_NAME)/description
47+
QModem scripts
48+
endef
49+
50+
define Build/Prepare
51+
endef
52+
53+
define Build/Compile
54+
endef
55+
56+
define Package/$(PKG_NAME)/install
57+
$(CP) ./files/* $(1)/
58+
endef
59+
60+
$(eval $(call BuildPackage,$(PKG_NAME)))

0 commit comments

Comments
 (0)