Merge pull request #2105 from dddaniel/master
[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_RELEASE:=1
12
13 PKG_SOURCE_PROTO:=git
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
18
19 PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
20 PKG_LICENSE:=GPL-2.0+ BSD-2-Clause
21 PKG_LICENSE_FILE:=COPYING LICENSE.GPL LICENSE.BSD
22
23 PKG_FIXUP:=autoreconf
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 define Package/libcoap
29 SECTION:=libs
30 CATEGORY:=Libraries
31 TITLE:=CoAP (RFC 7252) library
32 URL:=http://libcoap.net/
33 endef
34
35 define Package/libcoap/description
36 Constrained Application Protocol (RFC 7252) library
37 endef
38
39 TARGET_CFLAGS += $(FPIC)
40
41 CONFIGURE_ARGS += \
42 --disable-examples \
43 --disable-documentation
44
45 ifeq ($(CONFIG_BIG_ENDIAN),y)
46 TARGET_CFLAGS += -DWORDS_BIGENDIAN
47 endif
48
49 define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
52
53 $(INSTALL_DIR) $(1)/usr/lib
54 $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
55 endef
56
57 define Package/libcoap/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcoap-1.so* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libcoap))