Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=json-c
  9. PKG_VERSION:=0.12.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-nodoc.tar.gz
  12. PKG_SOURCE_URL:=https://s3.amazonaws.com/json-c_releases/releases/
  13. PKG_HASH:=5a617da9aade997938197ef0f8aabd7f97b670c216dc173977e1d56eef9e1291
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR)
  16. PKG_LICENSE:=MIT
  17. PKG_LICENSE_FILES:=COPYING
  18. PKG_FIXUP:=autoreconf
  19. PKG_INSTALL:=1
  20. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  21. include $(INCLUDE_DIR)/package.mk
  22. TARGET_CFLAGS += $(FPIC)
  23. define Package/libjson-c
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=javascript object notation
  27. URL:=http://oss.metaparadigm.com/json-c/
  28. endef
  29. define Package/libjson-c/description
  30. This package contains a library for javascript object notation backends.
  31. endef
  32. define Build/InstallDev
  33. $(INSTALL_DIR) $(1)/usr/include
  34. $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
  35. $(INSTALL_DIR) $(1)/usr/lib
  36. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/
  37. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  38. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/
  39. endef
  40. define Package/libjson-c/install
  41. $(INSTALL_DIR) $(1)/usr/lib
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
  43. endef
  44. $(eval $(call BuildPackage,libjson-c))