[packages] Use default templates instead of custom reimplementations where applicable
[packages.git] / libs / libjson-c / Makefile
1 #
2 # Copyright (C) 2006 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.9
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://oss.metaparadigm.com/json-c/
16 PKG_MD5SUM:=3a13d264528dcbaf3931b0cede24abae
17
18 PKG_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21
22 TARGET_CFLAGS += $(FPIC)
23
24 define Package/libjson
25   SECTION:=libs
26   CATEGORY:=Libraries
27   TITLE:=javascript object notation
28   URL:=http://oss.metaparadigm.com/json-c/
29 endef
30
31 define Package/libjson/description
32  This package contains a library for javascript object notation backends.
33 endef
34
35 define Build/InstallDev
36         $(INSTALL_DIR) $(1)/usr/include
37         $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/
38         $(INSTALL_DIR) $(1)/usr/lib
39         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.{a,so*} $(1)/usr/lib/
40         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
41         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json.pc $(1)/usr/lib/pkgconfig/
42 endef
43
44 define Package/libjson/install
45         $(INSTALL_DIR) $(1)/usr/lib
46         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.so.* $(1)/usr/lib/
47 endef
48
49 $(eval $(call BuildPackage,libjson))