1
0

Makefile 3.2 KB

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