🎉 Sync 2026-05-08 08:37:16

This commit is contained in:
github-actions[bot] committed 2026-05-08 08:37:16 +08:00
1 parent 8ab3d7cd74
commit dc55b8fdfe
7 files changed
+1244 -20

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
#
# Copyright (C) 2011-2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=qminfo
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=QMI modeminfo
MAINTAINER:=Konstantine Shevlakov
DEPENDS:= +libqmi
endef
define Package/$(PKG_NAME)/description
QMI info
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin/
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
+56
View File
@@ -0,0 +1,56 @@
# ─────────────────────────────────────────────────────────────────
# Makefile for qminfo
#
# Usage:
# make — compile
# make install — install /usr/local/bin
# make uninstall — remove
# make clean — remove build
# make run [DEV=/dev/cdc-wdm0] — run text mode
# make json [DEV=/dev/cdc-wdm0] — run JSON output
# ─────────────────────────────────────────────────────────────────
CC := gcc
TARGET := qminfo
SRC := qminfo.c
OBJ := $(SRC:.c=.o)
PKG := qmi-glib
CFLAGS := $(shell pkg-config --cflags $(PKG)) -Wall -Wextra -O2
LIBS := $(shell pkg-config --libs $(PKG)) -lm
PREFIX := /usr/local
BINDIR := $(PREFIX)/bin
DEV := /dev/cdc-wdm0
# ─────────────────────────────────────────────────────────────────
.PHONY: all clean install uninstall run json check-pkg
all: check-pkg $(TARGET)
check-pkg:
@pkg-config --exists $(PKG) || \
{ echo "Error: $(PKG) not found. Install libqmi-glib-dev"; exit 1; }
$(OBJ): $(SRC)
$(CC) $(CFLAGS) -c -o $@ $<
$(TARGET): $(OBJ)
$(CC) $(CFLAGS) -o $@ $^ $(LIBS)
install: $(TARGET)
install -d $(DESTDIR)$(BINDIR)
install -m 755 $(TARGET) $(DESTDIR)$(BINDIR)/$(TARGET)
uninstall:
rm -f $(DESTDIR)$(BINDIR)/$(TARGET)
run: $(TARGET)
sudo ./$(TARGET) $(DEV)
json: $(TARGET)
sudo ./$(TARGET) $(DEV) --json
clean:
rm -f $(OBJ) $(TARGET)
+1124
View File
File diff suppressed because it is too large. Load diff