2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 6643 2007-03-23 08:11:08Z nico $
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://oss.metaparadigm.com
/json-c
/
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/libjson
24 TITLE
:=javascript object notation
25 DESCRIPTION
:=library for javascript object notation backends
26 URL
:=http
://oss.metaparadigm.com
/json-c
/
30 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
31 DESTDIR
="$(PKG_INSTALL_DIR)" \
35 define Build
/InstallDev
36 mkdir
-p
$(STAGING_DIR
)/usr
/include
37 $(CP
) -r
$(PKG_INSTALL_DIR
)/usr
/include/json
$(STAGING_DIR
)/usr
/include/
38 mkdir
-p
$(STAGING_DIR
)/usr
/lib
39 $(CP
) -r
$(PKG_INSTALL_DIR
)/usr
/lib
/libjson.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
40 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
41 $(CP
) -r
$(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/json.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
42 $(SED
) 's,-I$$$${includedir}/,-I$(STAGING_DIR)/usr/include/,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/json.
pc
43 $(SED
) 's,-L$$$${libdir},,g' $(STAGING_DIR
)/usr
/lib
/pkgconfig
/json.
pc
46 define Build
/UninstallDev
47 rm -rf
$(STAGING_DIR
)/usr
/include/json \
48 $(STAGING_DIR
)/usr
/lib
/libjson.
{a
,so
*} \
49 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/json.
pc
52 define Package
/libjson
/install
53 $(INSTALL_DIR
) $(1)/usr
/lib
54 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libjson.so.
* $(1)/usr
/lib
/
57 $(eval
$(call BuildPackage
,libjson
))