gsmlib: set C++ standard to 11
[feed/telephony.git] / libs / gsmlib / Makefile
1 #
2 # Copyright (C) 2018 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=gsmlib
11 PKG_VERSION:=1.10-20140304
12 PKG_RELEASE:=4
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=https://github.com/vbouchaud/gsmlib.git
16 PKG_SOURCE_PROTO:=git
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_VERSION:=cd5442de07cfe052316ede58640ef81b20627276
19 PKG_MIRROR_HASH:=bc24d7ddcb5f4b5f9160351d9f38cf6f35f3feef969f675f883b32d04c8c80fa
20
21 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
22
23 # Need Makefile.in.in from gettext-full/host and po.m4 from gettext-full
24 PKG_BUILD_DEPENDS:=gettext-full/host gettext-full
25
26 PKG_FIXUP:=autoreconf
27
28 PKG_INSTALL:=1
29
30 PKG_LICENSE:=LGPL-2.1+
31 PKG_LICENSE_FILES:=COPYING
32 PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
33
34 include $(INCLUDE_DIR)/package.mk
35
36 define Package/$(PKG_NAME)/Default
37 SUBMENU:=Telephony
38 URL:=https://github.com/vbouchaud/gsmlib
39 endef
40
41 define Package/$(PKG_NAME)
42 $(call Package/$(PKG_NAME)/Default)
43 SECTION:=libs
44 CATEGORY:=Libraries
45 TITLE:=GSM mobile phone access lib
46 DEPENDS:=+libstdcpp
47 endef
48
49 define Package/gsm-utils
50 $(call Package/$(PKG_NAME)/Default)
51 SECTION:=utils
52 CATEGORY:=Utilities
53 TITLE:=GSM mobile phone access apps
54 DEPENDS:=+$(PKG_NAME)
55 endef
56
57 define Package/$(PKG_NAME)/description
58 A library to access GSM mobile phones via GSM modems.
59 endef
60
61 define Package/gsm-utils/description
62 Some simple command line programs to access GSM mobile phones via GSM modems.
63 endef
64
65 TARGET_CXXFLAGS += -std=c++11
66
67 define Build/InstallDev
68 $(INSTALL_DIR) $(1)/usr/include/$(PKG_NAME)
69 $(INSTALL_DATA) \
70 $(PKG_INSTALL_DIR)/usr/include/$(PKG_NAME)/*.h \
71 $(1)/usr/include/$(PKG_NAME)
72 $(INSTALL_DIR) $(1)/usr/lib
73 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsmme.so* $(1)/usr/lib
74 endef
75
76 define Build/Prepare
77 $(call Build/Prepare/Default)
78 $(INSTALL_DATA) \
79 $(STAGING_DIR_HOSTPKG)/share/gettext/po/Makefile.in.in \
80 $(PKG_BUILD_DIR)/po
81 endef
82
83 define Package/$(PKG_NAME)/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgsmme.so* $(1)/usr/lib
86 endef
87
88 define Package/gsm-utils/install
89 $(INSTALL_DIR) $(1)/usr/bin
90 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin
91 endef
92
93 $(eval $(call BuildPackage,$(PKG_NAME)))
94 $(eval $(call BuildPackage,gsm-utils))