Makefile 3.1 KB

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