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.

118 lines
2.8 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_VERSION:=1.30.4
  10. PKG_RELEASE:=$(AUTORELEASE)
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=https://www.freedesktop.org/software/libqmi
  13. PKG_HASH:=00d7da30a4f8d1185f37cba289cfaf1dfcd04a58f2f76d6acfdf5b85312d6ed6
  14. PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/nls.mk
  19. define Package/libqmi/config
  20. source "$(SOURCE)/Config.in"
  21. endef
  22. define Package/libqmi
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. DEPENDS:= \
  26. +glib2 \
  27. +LIBQMI_WITH_MBIM_QMUX:libmbim \
  28. +LIBQMI_WITH_QRTR_GLIB:libqrtr-glib
  29. TITLE:=Helper library to talk to QMI enabled modems
  30. URL:=https://www.freedesktop.org/wiki/Software/libqmi
  31. LICENSE:=LGPL-2.0-or-later
  32. LICENSE_FILES:=COPYING.LIB
  33. endef
  34. define Package/libqmi/description
  35. Helper library talk to QMI enabled modems.
  36. Add qmi-utils for extra utilities.
  37. endef
  38. define Package/qmi-utils
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. DEPENDS:=+libqmi
  42. TITLE:=Utilities to talk to QMI enabled modems
  43. URL:=https://www.freedesktop.org/wiki/Software/libqmi
  44. LICENSE:=GPL-2.0-or-later
  45. LICENSE_FILES:=COPYING
  46. endef
  47. define Package/libqmi-utils/description
  48. Utils to talk to QMI enabled modems
  49. endef
  50. CONFIGURE_ARGS += \
  51. --disable-static \
  52. --disable-gtk-doc \
  53. --disable-gtk-doc-html \
  54. --disable-gtk-doc-pdf \
  55. --disable-silent-rules \
  56. --enable-firmware-update \
  57. --without-udev \
  58. --without-udev-base-dir
  59. ifeq ($(CONFIG_LIBQMI_WITH_MBIM_QMUX),y)
  60. CONFIGURE_ARGS += --enable-mbim-qmux
  61. else
  62. CONFIGURE_ARGS += --disable-mbim-qmux
  63. endif
  64. ifeq ($(CONFIG_LIBQMI_WITH_QRTR_GLIB),y)
  65. CONFIGURE_ARGS += --enable-qrtr
  66. else
  67. CONFIGURE_ARGS += --disable-qrtr
  68. endif
  69. define Build/InstallDev
  70. $(INSTALL_DIR) $(1)/usr/include
  71. $(CP) \
  72. $(PKG_INSTALL_DIR)/usr/include/libqmi-glib \
  73. $(1)/usr/include/
  74. $(INSTALL_DIR) $(1)/usr/lib
  75. $(CP) \
  76. $(PKG_INSTALL_DIR)/usr/lib/libqmi*.so* \
  77. $(1)/usr/lib/
  78. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  79. $(CP) \
  80. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/qmi-glib.pc \
  81. $(1)/usr/lib/pkgconfig
  82. endef
  83. define Package/libqmi/install
  84. $(INSTALL_DIR) $(1)/usr/lib
  85. $(CP) \
  86. $(PKG_INSTALL_DIR)/usr/lib/libqmi*.so.* \
  87. $(1)/usr/lib/
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/qmi-proxy $(1)/usr/lib/
  89. endef
  90. define Package/qmi-utils/install
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmicli $(1)/usr/bin/
  93. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-network $(1)/usr/bin/
  94. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/qmi-firmware-update $(1)/usr/bin/
  95. endef
  96. $(eval $(call BuildPackage,libqmi))
  97. $(eval $(call BuildPackage,qmi-utils))