Makefile 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=wwan
  3. PKG_VERSION:=2014-07-17
  4. PKG_RELEASE=1
  5. PKG_LICENSE:=GPL-2.0
  6. PKG_LICENSE_FILES:=
  7. PKG_MAINTAINER:=John Crispin <john@phrozen.org>
  8. include $(INCLUDE_DIR)/package.mk
  9. define Package/wwan
  10. SECTION:=net
  11. CATEGORY:=Network
  12. TITLE:=Generic OpenWrt 3G/4G proto handler
  13. endef
  14. define Build/Compile
  15. true
  16. endef
  17. define Package/wwan/install
  18. $(INSTALL_DIR) $(1)/lib/netifd/proto/
  19. $(CP) ./files/wwan.sh $(1)/lib/netifd/proto/
  20. $(INSTALL_DIR) $(1)/etc/hotplug.d/usb
  21. $(INSTALL_BIN) ./files/wwan.usb $(1)/etc/hotplug.d/usb/00_wwan.sh
  22. $(INSTALL_DIR) $(1)/etc/hotplug.d/usbmisc
  23. $(INSTALL_BIN) ./files/wwan.usbmisc $(1)/etc/hotplug.d/usbmisc/00_wwan.sh
  24. $(INSTALL_DIR) $(1)/lib/network/wwan/
  25. $(INSTALL_DATA) ./files/data/* $(1)/lib/network/wwan/
  26. #in order to keep the Lede GIT repo free of filenames with colons,
  27. #we name the files xxxx-yyyy
  28. # and rename here after copying to the build directory
  29. shopt -s nullglob ; \
  30. for filevar in $(1)/lib/network/wwan/*-* ; \
  31. do \
  32. FILENAME=$$$$(basename $$$$filevar) ; \
  33. NEWNAME=$$$${FILENAME//-/:} ; \
  34. mv "$(1)/lib/network/wwan/$$$$FILENAME" "$(1)/lib/network/wwan/$$$$NEWNAME" ; \
  35. done
  36. endef
  37. $(eval $(call BuildPackage,wwan))