You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

81 lines
1.9 KiB

  1. #
  2. # Copyright (C) 2020 Sebastian Kemper <sebastian_ml@gmx.net>
  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-glib
  9. PKG_VERSION:=1.6.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/json-glib/1.6
  13. PKG_HASH:=0d7c67602c4161ea7070fab6c5823afd9bd7f7bc955f652a50d3753b08494e73
  14. PKG_INSTALL:=1
  15. PKG_LICENSE:=LGPL-2.1-or-later
  16. PKG_LICENSE_FILES:=COPYING
  17. PKG_MAINTAINER:=Sebastian Kemper <sebastian_ml@gmx.net>
  18. PKG_BUILD_DEPENDS:=glib2/host meson/host
  19. OPENWRT_VERBOSE:=c
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. include ../../devel/meson/meson.mk
  23. define Package/json-glib
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=JSON GLib Library
  27. URL:=https://wiki.gnome.org/Projects/JsonGlib
  28. DEPENDS:=+glib2
  29. ABI_VERSION:=0
  30. endef
  31. define Package/json-glib/description
  32. JSON-GLib is a library providing serialization and deserialization
  33. support for the JavaScript Object Notation (JSON) format described by
  34. RFC 4627.
  35. endef
  36. MESON_ARGS += \
  37. -Dgtk_doc=disabled \
  38. -Dintrospection=disabled \
  39. -Dman=false \
  40. -Dtests=false
  41. define Build/Prepare
  42. $(call Build/Prepare/Default)
  43. ifeq ($(QUILT),)
  44. $(SED) '/error=format=2/d' $(PKG_BUILD_DIR)/meson.build
  45. endif
  46. endef
  47. define Build/InstallDev
  48. $(INSTALL_DIR) $(1)/usr/include/json-glib-1.0/json-glib
  49. $(INSTALL_DATA) \
  50. $(PKG_INSTALL_DIR)/usr/include/json-glib-1.0/json-glib/*.h \
  51. $(1)/usr/include/json-glib-1.0/json-glib
  52. $(INSTALL_DIR) $(1)/usr/lib
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so* \
  54. $(1)/usr/lib
  55. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  56. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-glib-1.0.pc \
  57. $(1)/usr/lib/pkgconfig
  58. endef
  59. define Package/json-glib/install
  60. $(INSTALL_DIR) $(1)/usr/lib
  61. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so.$(ABI_VERSION)* \
  62. $(1)/usr/lib
  63. endef
  64. $(eval $(call BuildPackage,json-glib))