1
0

Makefile 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # Copyright (C) 2011-2017 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:=jansson
  9. PKG_VERSION:=2.12
  10. PKG_RELEASE:=1
  11. PKG_LICENSE:=MIT
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  13. PKG_SOURCE_URL:=http://www.digip.org/jansson/releases/
  14. PKG_HASH:=645d72cc5dbebd4df608d33988e55aa42a7661039e19a379fcbe5c79d1aee1d2
  15. PKG_INSTALL:=1
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/jansson
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=Jansson library
  22. URL:=http://www.digip.org/jansson/
  23. MAINTAINER:=Gergely Kiss <mail.gery@gmail.com>
  24. endef
  25. define Package/jansson/description
  26. Jansson is a C library for encoding, decoding and manipulating JSON data
  27. endef
  28. TARGET_CFLAGS += $(FPIC)
  29. TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib -lm
  30. define Build/InstallDev
  31. $(INSTALL_DIR) $(1)/usr/{lib,include}
  32. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  33. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson* $(1)/usr/lib
  34. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig
  35. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  36. endef
  37. define Package/jansson/install
  38. $(INSTALL_DIR) $(1)/usr/lib
  39. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjansson*so* $(1)/usr/lib/
  40. endef
  41. $(eval $(call BuildPackage,jansson))