treewide: fix shellscript syntax errors/typos
[openwrt/openwrt.git] / package / network / utils / comgt / Makefile
1 #
2 # Copyright (C) 2006-2014 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=comgt
11 PKG_VERSION:=0.32
12 PKG_RELEASE:=30
13
14 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=@SF/comgt
16 PKG_HASH:=0cedb2a5aa608510da66a99aab74df3db363df495032e57e791a2ff55f1d7913
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19 PKG_LICENSE:=GPL-2.0+
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
22 PKG_CHECK_FORMAT_SECURITY:=0
23
24 PKG_FLAGS:=nonshared
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/comgt/Default
29 SECTION:=net
30 CATEGORY:=Network
31 SUBMENU:=WWAN
32 endef
33
34 define Package/comgt
35 $(call Package/comgt/Default)
36 TITLE:=Option/Vodafone 3G/GPRS control tool
37 DEPENDS:=+chat
38 URL:=http://manpages.ubuntu.com/manpages/trusty/man1/comgt.1.html
39 endef
40
41 define Package/comgt-directip
42 $(call Package/comgt/Default)
43 TITLE:=Sierra Wireless Direct-IP support
44 DEPENDS:=+comgt +kmod-usb-serial +kmod-usb-serial-sierrawireless +kmod-usb-net +kmod-usb-net-sierrawireless
45 endef
46
47 define Package/comgt-ncm
48 $(call Package/comgt/Default)
49 TITLE+=NCM 3G/4G Support
50 DEPENDS:=+comgt +wwan
51 endef
52
53 define Package/comgt/description
54 comgt is a scripting language interpreter useful for establishing
55 communications on serial lines and through PCMCIA modems as well as GPRS
56 and 3G datacards.
57 endef
58
59 define Build/Compile
60 $(MAKE) -C $(PKG_BUILD_DIR) \
61 $(TARGET_CONFIGURE_OPTS) \
62 CFLAGS="$(TARGET_CFLAGS)" \
63 LDFLAGS="" \
64 comgt
65 endef
66
67 define Package/comgt/install
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_BIN) $(PKG_BUILD_DIR)/comgt $(1)/usr/bin/
70 $(LN) comgt $(1)/usr/bin/gcom
71 $(INSTALL_DIR) $(1)/etc/chatscripts
72 $(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat
73 $(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat
74 $(INSTALL_DIR) $(1)/etc/gcom
75 $(INSTALL_DATA) ./files/setpin.gcom $(1)/etc/gcom/setpin.gcom
76 $(INSTALL_DATA) ./files/setmode.gcom $(1)/etc/gcom/setmode.gcom
77 $(INSTALL_DATA) ./files/getcardinfo.gcom $(1)/etc/gcom/getcardinfo.gcom
78 $(INSTALL_DATA) ./files/getstrength.gcom $(1)/etc/gcom/getstrength.gcom
79 $(INSTALL_DATA) ./files/getcarrier.gcom $(1)/etc/gcom/getcarrier.gcom
80 $(INSTALL_DATA) ./files/getcnum.gcom $(1)/etc/gcom/getcnum.gcom
81 $(INSTALL_DATA) ./files/getimsi.gcom $(1)/etc/gcom/getimsi.gcom
82 $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
83 $(INSTALL_DATA) ./files/3g.usb $(1)/etc/hotplug.d/tty/30-3g
84 $(INSTALL_DIR) $(1)/lib/netifd/proto
85 $(INSTALL_BIN) ./files/3g.sh $(1)/lib/netifd/proto/3g.sh
86 endef
87
88 define Package/comgt-directip/install
89 $(INSTALL_DIR) $(1)/etc/gcom
90 $(INSTALL_DATA) ./files/directip.gcom $(1)/etc/gcom/directip.gcom
91 $(INSTALL_DATA) ./files/directip-stop.gcom $(1)/etc/gcom/directip-stop.gcom
92 $(INSTALL_DIR) $(1)/lib/netifd/proto
93 $(INSTALL_BIN) ./files/directip.sh $(1)/lib/netifd/proto/directip.sh
94 endef
95
96 define Package/comgt-ncm/install
97 $(INSTALL_DIR) $(1)/etc/gcom
98 $(INSTALL_DATA) ./files/ncm.json $(1)/etc/gcom/ncm.json
99 $(INSTALL_DATA) ./files/runcommand.gcom $(1)/etc/gcom/runcommand.gcom
100 $(INSTALL_DIR) $(1)/lib/netifd/proto
101 $(INSTALL_BIN) ./files/ncm.sh $(1)/lib/netifd/proto/ncm.sh
102 endef
103
104 $(eval $(call BuildPackage,comgt))
105 $(eval $(call BuildPackage,comgt-directip))
106 $(eval $(call BuildPackage,comgt-ncm))