1
0

Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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:=3.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_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. ABI_VERSION:=2
  33. endef
  34. define Package/libjson-c/description
  35. This package contains a library for javascript object notation backends.
  36. endef
  37. define Build/InstallDev
  38. $(INSTALL_DIR) $(1)/usr/include
  39. $(CP) $(PKG_INSTALL_DIR)/usr/include/json-c $(1)/usr/include/
  40. $(INSTALL_DIR) $(1)/usr/lib
  41. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.{a,so*} $(1)/usr/lib/
  42. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  43. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-c.pc $(1)/usr/lib/pkgconfig/
  44. endef
  45. define Package/libjson-c/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,libjson-c))
  50. $(eval $(call HostBuild))