comgt: Use TCGETS and TCSETS ioctls for struct termios
[openwrt/svn-archive/archive.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:=25
13
14 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=@SF/comgt
16 PKG_MD5SUM:=db2452680c3d953631299e331daf49ef
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
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 include $(INCLUDE_DIR)/package.mk
25
26 define Package/comgt/Default
27 SECTION:=utils
28 CATEGORY:=Utilities
29 endef
30
31 define Package/comgt
32 $(call Package/comgt/Default)
33 TITLE:=Option/Vodafone 3G/GPRS control tool
34 DEPENDS:=+chat
35 URL:=http://www.pharscape.org/comgt.html
36 endef
37
38 define Package/comgt-directip
39 $(call Package/comgt/Default)
40 TITLE:=Sierra Wireless Direct-IP support
41 DEPENDS:=+comgt +kmod-usb-serial +kmod-usb-serial-sierrawireless +kmod-usb-net +kmod-usb-net-sierrawireless
42 endef
43
44 define Package/comgt-ncm
45 $(call Package/comgt/Default)
46 TITLE+=NCM 3G/4G Support
47 DEPENDS:=+comgt
48 endef
49
50 define Package/comgt/description
51 comgt is a scripting language interpreter useful for establishing
52 communications on serial lines and through PCMCIA modems as well as GPRS
53 and 3G datacards.
54 endef
55
56 define Build/Compile
57 $(MAKE) -C $(PKG_BUILD_DIR) \
58 $(TARGET_CONFIGURE_OPTS) \
59 CFLAGS="$(TARGET_CFLAGS)" \
60 LDFLAGS="" \
61 comgt
62 endef
63
64 define Package/comgt/install
65 $(INSTALL_DIR) $(1)/usr/bin
66 $(INSTALL_BIN) $(PKG_BUILD_DIR)/comgt $(1)/usr/bin/
67 ln -s comgt $(1)/usr/bin/gcom
68 $(INSTALL_DIR) $(1)/etc/chatscripts
69 $(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat
70 $(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat
71 $(INSTALL_DIR) $(1)/etc/gcom
72 $(INSTALL_DATA) ./files/setpin.gcom $(1)/etc/gcom/setpin.gcom
73 $(INSTALL_DATA) ./files/setmode.gcom $(1)/etc/gcom/setmode.gcom
74 $(INSTALL_DATA) ./files/getcardinfo.gcom $(1)/etc/gcom/getcardinfo.gcom
75 $(INSTALL_DATA) ./files/getstrength.gcom $(1)/etc/gcom/getstrength.gcom
76 $(INSTALL_DATA) ./files/getcarrier.gcom $(1)/etc/gcom/getcarrier.gcom
77 $(INSTALL_DATA) ./files/getcnum.gcom $(1)/etc/gcom/getcnum.gcom
78 $(INSTALL_DATA) ./files/getimsi.gcom $(1)/etc/gcom/getimsi.gcom
79 $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
80 $(INSTALL_DATA) ./files/3g.usb $(1)/etc/hotplug.d/tty/30-3g
81 $(INSTALL_DIR) $(1)/lib/netifd/proto
82 $(INSTALL_BIN) ./files/3g.sh $(1)/lib/netifd/proto/3g.sh
83 $(INSTALL_BIN) ./files/directip.sh $(1)/lib/netifd/proto/directip.sh
84 $(INSTALL_DIR) $(1)/lib/network/wwan/
85 $(INSTALL_DATA) ./files/data/* $(1)/lib/network/wwan/
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))