c11bf085b4516fe0d84848f9444e550bfaebeb83
[openwrt.git] / package / 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 # $Id: Makefile 6643 2007-03-23 08:11:08Z nico $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=json-c
12 PKG_VERSION:=0.7
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://oss.metaparadigm.com/json-c/
17 PKG_MD5SUM:=
18
19 include $(INCLUDE_DIR)/package.mk
20
21 define Package/libjson
22 SECTION:=libs
23 CATEGORY:=Libraries
24 TITLE:=javascript object notation
25 URL:=http://oss.metaparadigm.com/json-c/
26 endef
27
28 define Package/libjson/description
29 This package contains a library for javascript object notation backends.
30 endef
31
32 define Build/Compile
33 $(MAKE) -C $(PKG_BUILD_DIR) \
34 DESTDIR="$(PKG_INSTALL_DIR)" \
35 all install
36 endef
37
38 define Build/InstallDev
39 mkdir -p $(STAGING_DIR)/usr/include
40 $(CP) -r $(PKG_INSTALL_DIR)/usr/include/json $(STAGING_DIR)/usr/include/
41 mkdir -p $(STAGING_DIR)/usr/lib
42 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/libjson.{a,so*} $(STAGING_DIR)/usr/lib/
43 mkdir -p $(STAGING_DIR)/usr/lib/pkgconfig
44 $(CP) -r $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json.pc $(STAGING_DIR)/usr/lib/pkgconfig/
45 $(SED) 's,-I$$$${includedir}/,-I$(STAGING_DIR)/usr/include/,g' $(STAGING_DIR)/usr/lib/pkgconfig/json.pc
46 $(SED) 's,-L$$$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/json.pc
47 endef
48
49 define Build/UninstallDev
50 rm -rf $(STAGING_DIR)/usr/include/json \
51 $(STAGING_DIR)/usr/lib/libjson.{a,so*} \
52 $(STAGING_DIR)/usr/lib/pkgconfig/json.pc
53 endef
54
55 define Package/libjson/install
56 $(INSTALL_DIR) $(1)/usr/lib
57 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson.so.* $(1)/usr/lib/
58 endef
59
60 $(eval $(call BuildPackage,libjson))
This page took 0.039413 seconds and 3 git commands to generate.