1
0

Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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.16
  10. PKG_RELEASE:=3
  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:=ac8a3dd6820daaca579b23fbc74664310fbc3d67f52f6707cda67d21dde5570f
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_CPE_ID:=cpe:/a:json-c_project:json-c
  18. HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. CMAKE_HOST_OPTIONS += \
  23. -DDISABLE_EXTRA_LIBS=TRUE \
  24. -DBUILD_SHARED_LIBS=FALSE
  25. CMAKE_OPTIONS += \
  26. -DDISABLE_EXTRA_LIBS=TRUE
  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:=5
  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. $(call Build/InstallDev/cmake,$(1))
  39. $(SED) 's,/usr/include,$$$${prefix}/include,g' $(1)/usr/lib/pkgconfig/json-c.pc
  40. $(SED) 's,/usr/lib,$$$${exec_prefix}/lib,g' $(1)/usr/lib/pkgconfig/json-c.pc
  41. endef
  42. define Package/libjson-c/install
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-c.so.* $(1)/usr/lib/
  45. endef
  46. $(eval $(call BuildPackage,libjson-c))
  47. $(eval $(call HostBuild))