Makefile 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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:=2
  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_CPE_ID:=cpe:/a:json-c_project:json-c
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/host-build.mk
  24. TARGET_CFLAGS += $(FPIC) -Wno-implicit-fallthrough
  25. HOST_CFLAGS += -Wno-implicit-fallthrough
  26. HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
  27. define Package/libjson-c
  28. SECTION:=libs
  29. CATEGORY:=Libraries
  30. TITLE:=javascript object notation
  31. URL:=https://json-c.github.io/json-c/
  32. endef
  33. define Package/libjson-c/description
  34. This package contains a library for javascript object notation backends.
  35. endef
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/
  41. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  42. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/
  43. endef
  44. define Package/libjson-c/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,libjson-c))
  49. $(eval $(call HostBuild))