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.

113 lines
2.9 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:=libqmi
  9. PKG_SOURCE_VERSION:=1.30.6
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libqmi.git
  13. PKG_MIRROR_HASH:=034dc3b9e5ddb1acd9bb8c2a07f3f8a576d47b7f70942b61b82c4dfc8f805186
  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. define Package/libqmi/config
  22. source "$(SOURCE)/Config.in"
  23. endef
  24. define Package/libqmi
  25. SECTION:=libs
  26. CATEGORY:=Libraries
  27. DEPENDS:= \
  28. +glib2 \
  29. +LIBQMI_WITH_MBIM_QMUX:libmbim \
  30. +LIBQMI_WITH_QRTR_GLIB:libqrtr-glib
  31. TITLE:=Helper library to talk to QMI enabled modems
  32. URL:=https://www.freedesktop.org/wiki/Software/libqmi
  33. LICENSE:=LGPL-2.0-or-later
  34. LICENSE_FILES:=COPYING.LIB
  35. endef
  36. define Package/libqmi/description
  37. Helper library talk to QMI enabled modems.
  38. Add qmi-utils for extra utilities.
  39. endef
  40. define Package/qmi-utils
  41. SECTION:=utils
  42. CATEGORY:=Utilities
  43. DEPENDS:=+libqmi
  44. TITLE:=Utilities to talk to QMI enabled modems
  45. URL:=https://www.freedesktop.org/wiki/Software/libqmi
  46. LICENSE:=GPL-2.0-or-later
  47. LICENSE_FILES:=COPYING
  48. endef
  49. define Package/libqmi-utils/description
  50. Utils to talk to QMI enabled modems
  51. endef
  52. MESON_ARGS += \
  53. -Dudev=false \
  54. -Dintrospection=false \
  55. -Dman=false \
  56. -Dbash_completion=false \
  57. -Db_lto=true \
  58. -Dmbim_qmux=$(if $(CONFIG_LIBQMI_WITH_MBIM_QMUX),true,false) \
  59. -Dqrtr=$(if $(CONFIG_LIBQMI_WITH_QRTR_GLIB),true,false) \
  60. -Dcollection=$(if $(CONFIG_LIBQMI_COLLECTION_MINIMAL),minimal\
  61. ,$(if $(CONFIG_LIBQMI_COLLECTION_BASIC),basic,full))
  62. define Build/InstallDev
  63. $(INSTALL_DIR) $(1)/usr/include
  64. $(CP) \
  65. $(PKG_INSTALL_DIR)/usr/include/libqmi-glib \
  66. $(1)/usr/include/
  67. $(INSTALL_DIR) $(1)/usr/lib
  68. $(CP) \
  69. $(PKG_INSTALL_DIR)/usr/lib/libqmi*.so* \
  70. $(1)/usr/lib/
  71. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  72. $(CP) \
  73. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/qmi-glib.pc \
  74. $(1)/usr/lib/pkgconfig
  75. endef
  76. define Package/libqmi/install
  77. $(INSTALL_DIR) \
  78. $(1)/usr/lib \
  79. $(1)/usr/libexec
  80. $(CP) \
  81. $(PKG_INSTALL_DIR)/usr/lib/libqmi*.so.* \
  82. $(1)/usr/lib/
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/qmi-proxy $(1)/usr/libexec/
  84. endef
  85. define Package/qmi-utils/install
  86. $(INSTALL_DIR) $(1)/usr/bin
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmicli $(1)/usr/bin/
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-network $(1)/usr/bin/
  89. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-firmware-update $(1)/usr/bin/
  90. endef
  91. $(eval $(call BuildPackage,libqmi))
  92. $(eval $(call BuildPackage,qmi-utils))