2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE_URL
:=https
://github.com
/obgm
/libcoap
15 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)
16 PKG_SOURCE_VERSION
:=2da31de732c0e51a9bc9e1d4aea21e25da89cf87
17 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_SOURCE_VERSION
).
tar.bz2
19 PKG_MAINTAINER
:=Anton Glukhov
<anton.a.glukhov@gmail.com
>
20 PKG_LICENSE
:=GPL-2.0
+ BSD-2-Clause
21 PKG_LICENSE_FILES
:=COPYING LICENSE.GPL LICENSE.BSD
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/libcoap
31 TITLE
:=CoAP
(RFC
7252) library
32 URL
:=http
://libcoap.net
/
35 define Package
/libcoap
/description
36 Constrained Application Protocol
(RFC
7252) library
39 TARGET_CFLAGS
+= $(FPIC
)
43 --disable-documentation
45 ifeq ($(CONFIG_BIG_ENDIAN
),y
)
46 TARGET_CFLAGS
+= -DWORDS_BIGENDIAN
49 define Build
/InstallDev
50 $(INSTALL_DIR
) $(1)/usr
/include
51 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/* $(1)/usr
/include/
53 $(INSTALL_DIR
) $(1)/usr
/lib
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/* $(1)/usr
/lib
/
57 define Package
/libcoap
/install
58 $(INSTALL_DIR
) $(1)/usr
/lib
59 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libcoap-1.so
* $(1)/usr
/lib
/
62 $(eval
$(call BuildPackage
,libcoap
))