You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.4 KiB

  1. #
  2. # Copyright (C) 2016 Velocloud Inc.
  3. # Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libmbim
  9. PKG_SOURCE_VERSION:=1.26.4
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
  13. PKG_MIRROR_HASH:=4963f9135f8ad26165d969d0b2028b00d68243201113c94a2ebe22c4227058a4
  14. PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/nls.mk
  18. include $(INCLUDE_DIR)/meson.mk
  19. TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants
  20. TARGET_LDFLAGS += -Wl,--gc-sections
  21. MESON_ARGS += \
  22. -Dintrospection=false \
  23. -Dman=false \
  24. -Dbash_completion=false \
  25. -Db_lto=true
  26. define Package/libmbim
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. DEPENDS:=+glib2
  30. TITLE:=Helper library and utils to talk to MBIM enabled modems
  31. URL:=https://www.freedesktop.org/wiki/Software/libmbim
  32. LICENSE:=LGPL-2.0-or-later
  33. LICENSE_FILES:=COPYING.LIB
  34. endef
  35. define Package/libmbim/description
  36. Helper library to talk to MBIM enabled modems.
  37. Add mbim-utils for extra utilities.
  38. endef
  39. define Package/mbim-utils
  40. SECTION:=utils
  41. CATEGORY:=Utilities
  42. DEPENDS:=+libmbim
  43. TITLE:=Utilities to talk to MBIM enabled modems
  44. URL:=https://www.freedesktop.org/wiki/Software/libmbim
  45. LICENSE:=GPL-2.0-or-later
  46. LICENSE_FILES:=COPYING
  47. endef
  48. define Build/InstallDev
  49. $(INSTALL_DIR) $(1)/usr/include
  50. $(CP) \
  51. $(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
  52. $(1)/usr/include/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) \
  55. $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
  56. $(1)/usr/lib/
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(CP) \
  59. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
  60. $(1)/usr/lib/pkgconfig
  61. endef
  62. define Package/libmbim/install
  63. $(INSTALL_DIR) \
  64. $(1)/usr/lib \
  65. $(1)/usr/libexec
  66. $(CP) \
  67. $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
  68. $(1)/usr/lib/
  69. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/mbim-proxy $(1)/usr/libexec/
  70. endef
  71. define Package/mbim-utils/install
  72. $(INSTALL_DIR) $(1)/usr/bin
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
  74. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
  75. endef
  76. $(eval $(call BuildPackage,libmbim))
  77. $(eval $(call BuildPackage,mbim-utils))