ae8aa668baa2155e5ee7ce3f17a81e828ed45b90
[openwrt.git] / package / comgt / Makefile
1 #
2 # Copyright (C) 2006-2012 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:=20
13
14 PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
15 PKG_SOURCE_URL:=@SF/comgt
16 PKG_MD5SUM:=db2452680c3d953631299e331daf49ef
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME).$(PKG_VERSION)
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/comgt
23   SECTION:=utils
24   CATEGORY:=Utilities
25   TITLE:=Option/Vodafone 3G/GPRS control tool
26   DEPENDS:=+chat
27   URL:=http://www.pharscape.org/comgt.html
28 endef
29
30 define Package/comgt/description
31  comgt is a scripting language interpreter useful for establishing 
32  communications on serial lines and through PCMCIA modems as well as GPRS 
33  and 3G datacards.
34 endef
35
36 define Build/Compile
37         $(MAKE) -C $(PKG_BUILD_DIR) \
38                 $(TARGET_CONFIGURE_OPTS) \
39                 CFLAGS="$(TARGET_CFLAGS)" \
40                 LDFLAGS="" \
41                 comgt
42 endef
43
44 define Package/comgt/install
45         $(INSTALL_DIR) $(1)/usr/bin
46         $(INSTALL_BIN) $(PKG_BUILD_DIR)/comgt $(1)/usr/bin/
47         ln -s comgt $(1)/usr/bin/gcom
48         $(INSTALL_DIR) $(1)/etc/chatscripts
49         $(INSTALL_DATA) ./files/3g.chat $(1)/etc/chatscripts/3g.chat
50         $(INSTALL_DATA) ./files/evdo.chat $(1)/etc/chatscripts/evdo.chat
51         $(INSTALL_DIR) $(1)/etc/gcom
52         $(INSTALL_DATA) ./files/setpin.gcom $(1)/etc/gcom/setpin.gcom
53         $(INSTALL_DATA) ./files/setmode.gcom $(1)/etc/gcom/setmode.gcom
54         $(INSTALL_DATA) ./files/getcardinfo.gcom $(1)/etc/gcom/getcardinfo.gcom
55         $(INSTALL_DATA) ./files/getstrength.gcom $(1)/etc/gcom/getstrength.gcom
56         $(INSTALL_DATA) ./files/getcarrier.gcom $(1)/etc/gcom/getcarrier.gcom
57         $(INSTALL_DATA) ./files/getcnum.gcom $(1)/etc/gcom/getcnum.gcom
58         $(INSTALL_DATA) ./files/getimsi.gcom $(1)/etc/gcom/getimsi.gcom
59         $(INSTALL_DIR) $(1)/etc/hotplug.d/tty
60         $(INSTALL_DATA) ./files/3g.usb $(1)/etc/hotplug.d/tty/30-3g
61         $(INSTALL_DIR) $(1)/lib/netifd/proto
62         $(INSTALL_BIN) ./files/3g.sh $(1)/lib/netifd/proto/3g.sh
63 endef
64
65 $(eval $(call BuildPackage,comgt))