forked from liuran001/openwrt-packages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
80 lines (64 loc) · 1.66 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
include $(TOPDIR)/rules.mk
PKG_NAME:=3ginfo
PKG_VERSION:=20220205
include $(INCLUDE_DIR)/package.mk
define Package/3ginfo/Default
SECTION:=net
CATEGORY:=Network
TITLE:=Information about status of 3G/4G modem
MAINTAINER:=Cezary Jackiewicz <[email protected]>
PKGARCH:=all
endef
define Package/3ginfo
$(call Package/3ginfo/Default)
DEPENDS:=+3ginfo-text +uhttpd
endef
define Package/3ginfo-lite
$(call Package/3ginfo/Default)
TITLE+= (lite version)
DEPENDS:=+comgt
endef
define Package/3ginfo-qmisignal
$(call Package/3ginfo/Default)
TITLE+= (qmi signal)
DEPENDS:=+uqmi +uhttpd
endef
define Package/3ginfo-text
$(call Package/3ginfo/Default)
TITLE+= (text version)
DEPENDS:=+comgt
endef
define Package/3ginfo-text/conffiles
/etc/config/3ginfo
endef
define Build/Compile
endef
define Package/3ginfo/install
$(CP) ./files/* $(1)
endef
define Package/3ginfo-lite/install
$(CP) ./files-lite/* $(1)
$(CP) ./files-text/usr/share/3ginfo/mccmnc.dat $(1)/usr/share/3ginfo-lite
$(CP) ./files-text/usr/share/3ginfo/scripts/probeport.gcom $(1)/usr/share/3ginfo-lite
endef
define Package/3ginfo-qmisignal/install
$(CP) ./files-qmisignal/* $(1)
$(FIND) $(1) -type f -name '*.js' | while read src; do \
uglifyjs "$$$$src" -o "$$$$src".1 && \
mv "$$$$src".1 "$$$$src" || true; \
done
endef
define Package/3ginfo-text/install
$(CP) ./files-text/* $(1)
endef
define Package/3ginfo-text/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
ln -sf /usr/share/3ginfo/cgi-bin/3ginfo.sh /usr/bin/3ginfo
}
exit 0
endef
$(eval $(call BuildPackage,3ginfo))
$(eval $(call BuildPackage,3ginfo-lite))
$(eval $(call BuildPackage,3ginfo-qmisignal))
$(eval $(call BuildPackage,3ginfo-text))