Merge pull request #4863 from lucize/dovesql
[feed/packages.git] / libs / jansson / Makefile
1 #
2 # Copyright (C) 2011-2017 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:=jansson
11 PKG_VERSION:=2.10
12 PKG_RELEASE:=1
13 PKG_LICENSE:=MIT
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
16 PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
17 PKG_HASH:=241125a55f739cd713808c4e0089986b8c3da746da8b384952912ad659fa2f5a
18
19 PKG_INSTALL:=1
20 PKG_BUILD_PARALLEL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/jansson
25 SECTION:=libs
26 CATEGORY:=Libraries
27 TITLE:=Jansson library
28 URL:=http://www.digip.org/jansson/
29 MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
30 endef
31
32 define Package/jansson/description
33 Jansson is a C library for encoding, decoding and manipulating JSON data
34 endef
35
36 TARGET_CFLAGS += $(FPIC)
37 TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lm
38
39 define Build/InstallDev
40 $(INSTALL_DIR) $(1)/usr/{lib,include}
41 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
42 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson* $(1)/usr/lib
43 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig
44 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
45 endef
46
47 define Package/jansson/install
48 $(INSTALL_DIR) $(1)/usr/lib
49 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/
50 endef
51
52 $(eval $(call BuildPackage,jansson))