libmbim: add libmbim to pagkages
authorNicholas Smith <nicholas.smith@telcoantennas.com.au>
Fri, 27 Sep 2019 01:26:06 +0000 (11:26 +1000)
committerNicholas Smith <nicholas.smith@telcoantennas.com.au>
Fri, 27 Sep 2019 01:26:06 +0000 (11:26 +1000)
Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au>
libs/libmbim/Makefile [new file with mode: 0644]

diff --git a/libs/libmbim/Makefile b/libs/libmbim/Makefile
new file mode 100644 (file)
index 0000000..7731133
--- /dev/null
@@ -0,0 +1,88 @@
+#
+# Copyright (C) 2016 Velocloud Inc.
+# Copyright (C) 2016 Aleksander Morgado <aleksander@aleksander.es>
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=libmbim
+PKG_VERSION:=1.20.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_URL:=https://www.freedesktop.org/software/libmbim
+PKG_HASH=2cf7c6c7aa9e962a589f61bff2766035b61792ef961131a21fcbbe043f91a866
+
+PKG_MAINTAINER:=Nicholas Smith <nicholas.smith@telcoantennas.com.au>
+
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS += \
+       --disable-static \
+       --disable-gtk-doc \
+       --disable-gtk-doc-html \
+       --disable-gtk-doc-pdf
+
+define Package/libmbim
+  SECTION:=libs
+  CATEGORY:=Libraries
+  DEPENDS:=+glib2
+  TITLE:=Helper library and utils to talk to MBIM enabled modems
+  URL:=https://www.freedesktop.org/wiki/Software/libmbim
+  LICENSE:=LGPL-2.0-or-later
+  LICENSE_FILES:=COPYING.LIB
+endef
+
+define Package/libmbim/description
+  Helper library to talk to MBIM enabled modems.
+  Add mbim-utils for extra utilities.
+endef
+
+define Package/mbim-utils
+  SECTION:=utils
+  CATEGORY:=Utilities
+  DEPENDS:=+libmbim
+  TITLE:=Utilities to talk to MBIM enabled modems
+  URL:=https://www.freedesktop.org/wiki/Software/libmbim
+  LICENSE:=GPL-2.0-or-later
+  LICENSE_FILES:=COPYING
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
+               $(1)/usr/include/
+
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
+               $(1)/usr/lib/
+
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
+               $(1)/usr/lib/pkgconfig
+endef
+
+define Package/libmbim/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) \
+               $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
+               $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/mbim-proxy $(1)/usr/lib/
+endef
+
+define Package/mbim-utils/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,libmbim))
+$(eval $(call BuildPackage,mbim-utils))