procd: update to git head
[openwrt.git] / package / libs / libjson-c / Makefile
1 #
2 # Copyright (C) 2006-2010 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:=json-c
11 PKG_VERSION:=0.11
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
16 PKG_MD5SUM:=aa02367d2f7a830bf1e3376f77881e98
17
18 PKG_LICENSE:=MIT
19 PKG_LICENSE_FILES:=COPYING
20
21 PKG_FIXUP:=autoreconf
22 PKG_INSTALL:=1
23
24 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
25
26 include $(INCLUDE_DIR)/package.mk
27
28 TARGET_CFLAGS += $(FPIC)
29
30 define Package/libjson-c
31   SECTION:=libs
32   CATEGORY:=Libraries
33   TITLE:=javascript object notation
34   URL:=http://oss.metaparadigm.com/json-c/
35 endef
36
37 define Package/libjson-c/description
38  This package contains a library for javascript object notation backends.
39 endef
40
41 define Package/libjson
42   SECTION:=libs
43   CATEGORY:=Libraries
44   DEPENDS:=+libjson-c
45   TITLE:=javascript object notation (compat library)
46   URL:=http://oss.metaparadigm.com/json-c/
47 endef
48
49 define Package/libjson/description
50  This package contains a compatibility library for packages that have not
51  been adapted to the json-c library rename yet
52 endef
53
54
55 define Build/InstallDev
56         $(INSTALL_DIR) $(1)/usr/include
57         $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/
58         $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
59         $(INSTALL_DIR) $(1)/usr/lib
60         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.{a,so*} $(1)/usr/lib/
61         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/
62         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
63         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/
64 endef
65
66 define Package/libjson-c/install
67         $(INSTALL_DIR) $(1)/usr/lib
68         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
69 endef
70
71 define Package/libjson/install
72         $(INSTALL_DIR) $(1)/usr/lib
73         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.so.* $(1)/usr/lib/
74 endef
75
76 $(eval $(call BuildPackage,libjson-c))
77 $(eval $(call BuildPackage,libjson))