1
0

Makefile 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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.28.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
  13. PKG_MIRROR_HASH:=7ecc6d1e565392817311254045337907bbad015b46ec88542ea63594f47778be
  14. PKG_BUILD_FLAGS:=gc-sections
  15. PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/nls.mk
  18. include $(INCLUDE_DIR)/meson.mk
  19. TARGET_CFLAGS += -fno-merge-all-constants -fmerge-constants
  20. MESON_ARGS += \
  21. -Dintrospection=false \
  22. -Dman=false \
  23. -Dbash_completion=false \
  24. -Db_lto=true
  25. define Package/libmbim
  26. SECTION:=libs
  27. CATEGORY:=Libraries
  28. DEPENDS:=+glib2
  29. TITLE:=Helper library and utils to talk to MBIM enabled modems
  30. URL:=https://www.freedesktop.org/wiki/Software/libmbim
  31. LICENSE:=LGPL-2.0-or-later
  32. LICENSE_FILES:=COPYING.LIB
  33. endef
  34. define Package/libmbim/description
  35. Helper library to talk to MBIM enabled modems.
  36. Add mbim-utils for extra utilities.
  37. endef
  38. define Package/mbim-utils
  39. SECTION:=utils
  40. CATEGORY:=Utilities
  41. DEPENDS:=+libmbim
  42. TITLE:=Utilities to talk to MBIM enabled modems
  43. URL:=https://www.freedesktop.org/wiki/Software/libmbim
  44. LICENSE:=GPL-2.0-or-later
  45. LICENSE_FILES:=COPYING
  46. endef
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include
  49. $(CP) \
  50. $(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
  51. $(1)/usr/include/
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) \
  54. $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
  55. $(1)/usr/lib/
  56. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  57. $(CP) \
  58. $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
  59. $(1)/usr/lib/pkgconfig
  60. endef
  61. define Package/libmbim/install
  62. $(INSTALL_DIR) \
  63. $(1)/usr/lib \
  64. $(1)/usr/libexec
  65. $(CP) \
  66. $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
  67. $(1)/usr/lib/
  68. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/mbim-proxy $(1)/usr/libexec/
  69. endef
  70. define Package/mbim-utils/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
  73. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
  74. endef
  75. $(eval $(call BuildPackage,libmbim))
  76. $(eval $(call BuildPackage,mbim-utils))