avahi: backport CVE fixes from upstream
[feed/packages.git] / libs / libcoap / Makefile
1 #
2 # Copyright (C) 2015 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:=libcoap
11 PKG_VERSION:=4.3.0
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://codeload.github.com/obgm/libcoap/tar.gz/v$(PKG_VERSION)?
16 PKG_HASH:=1a195adacd6188d3b71c476e7b21706fef7f3663ab1fb138652e8da49a9ec556
17
18 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
19 PKG_LICENSE:=GPL-2.0-or-later BSD-2-Clause
20 PKG_LICENSE_FILES:=COPYING LICENSE.GPL LICENSE.BSD
21 PKG_CPE_ID:=cpe:/a:libcoap:libcoap
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libcoap
30 SECTION:=libs
31 CATEGORY:=Libraries
32 TITLE:=CoAP (RFC 7252) library
33 URL:=https://libcoap.net/
34 ABI_VERSION:=3
35 endef
36
37 define Package/libcoap/description
38 Constrained Application Protocol (RFC 7252) library
39 endef
40
41 define Package/coap-client
42 SECTION:=utils
43 CATEGORY:=Utilities
44 DEPENDS:=+libcoap
45 TITLE:=CoAP (RFC 7252) client tool
46 endef
47
48 define Package/coap-client/description
49 Constrained Application Protocol (RFC7252) client tool
50 endef
51
52 define Package/coap-server
53 SECTION:=net
54 CATEGORY:=Network
55 DEPENDS:=+libcoap
56 TITLE:=CoAP (RFC 7252) server programs
57 endef
58
59 define Package/coap-server/description
60 Constrained Application Protocol (RFC 7252) server and resource directory server
61 endef
62
63 TARGET_CFLAGS += $(FPIC)
64
65 CONFIGURE_ARGS += \
66 --enable-examples \
67 --disable-documentation \
68 --disable-doxygen \
69 --disable-dtls \
70 --disable-gcov \
71 --disable-tests
72
73 define Build/InstallDev
74 $(INSTALL_DIR) $(1)/usr/include
75 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
76
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
79 endef
80
81 define Package/libcoap/install
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-$(ABI_VERSION)*.so* $(1)/usr/lib/
84 endef
85
86 define Package/coap-client/install
87 $(INSTALL_DIR) $(1)/usr/bin
88 $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-client $(1)/usr/bin/
89 endef
90
91 define Package/coap-server/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-server $(1)/usr/bin/
94 $(CP) $(PKG_INSTALL_DIR)/usr/bin/coap-rd $(1)/usr/bin/
95 endef
96
97 $(eval $(call BuildPackage,libcoap))
98 $(eval $(call BuildPackage,coap-client))
99 $(eval $(call BuildPackage,coap-server))