Merge pull request #18472 from sotux/master
[feed/packages.git] / libs / libmbim / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=libmbim
11 PKG_SOURCE_VERSION:=1.26.4
12 PKG_RELEASE:=$(AUTORELEASE)
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=https://gitlab.freedesktop.org/mobile-broadband/libmbim.git
16 PKG_MIRROR_HASH:=4963f9135f8ad26165d969d0b2028b00d68243201113c94a2ebe22c4227058a4
17
18 PKG_MAINTAINER:=Nicholas Smith <nicholas@nbembedded.com>
19
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23 include $(INCLUDE_DIR)/nls.mk
24 include $(INCLUDE_DIR)/meson.mk
25
26 TARGET_CFLAGS += -ffunction-sections -fdata-sections -fno-merge-all-constants -fmerge-constants
27 TARGET_LDFLAGS += -Wl,--gc-sections
28
29 MESON_ARGS += \
30 -Dintrospection=false \
31 -Dman=false \
32 -Dbash_completion=false \
33 -Db_lto=true
34
35 define Package/libmbim
36 SECTION:=libs
37 CATEGORY:=Libraries
38 DEPENDS:=+glib2
39 TITLE:=Helper library and utils to talk to MBIM enabled modems
40 URL:=https://www.freedesktop.org/wiki/Software/libmbim
41 LICENSE:=LGPL-2.0-or-later
42 LICENSE_FILES:=COPYING.LIB
43 endef
44
45 define Package/libmbim/description
46 Helper library to talk to MBIM enabled modems.
47 Add mbim-utils for extra utilities.
48 endef
49
50 define Package/mbim-utils
51 SECTION:=utils
52 CATEGORY:=Utilities
53 DEPENDS:=+libmbim
54 TITLE:=Utilities to talk to MBIM enabled modems
55 URL:=https://www.freedesktop.org/wiki/Software/libmbim
56 LICENSE:=GPL-2.0-or-later
57 LICENSE_FILES:=COPYING
58 endef
59
60 define Build/InstallDev
61 $(INSTALL_DIR) $(1)/usr/include
62 $(CP) \
63 $(PKG_INSTALL_DIR)/usr/include/libmbim-glib \
64 $(1)/usr/include/
65
66 $(INSTALL_DIR) $(1)/usr/lib
67 $(CP) \
68 $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so* \
69 $(1)/usr/lib/
70
71 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
72 $(CP) \
73 $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbim-glib.pc \
74 $(1)/usr/lib/pkgconfig
75 endef
76
77 define Package/libmbim/install
78 $(INSTALL_DIR) \
79 $(1)/usr/lib \
80 $(1)/usr/libexec
81
82 $(CP) \
83 $(PKG_INSTALL_DIR)/usr/lib/libmbim*.so.* \
84 $(1)/usr/lib/
85
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/libexec/mbim-proxy $(1)/usr/libexec/
87 endef
88
89 define Package/mbim-utils/install
90 $(INSTALL_DIR) $(1)/usr/bin
91 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbimcli $(1)/usr/bin/
92 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mbim-network $(1)/usr/bin/
93 endef
94
95 $(eval $(call BuildPackage,libmbim))
96 $(eval $(call BuildPackage,mbim-utils))