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.

83 lines
2.1 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.4.4
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@GNOME/json-glib/1.4
  13. PKG_HASH:=720c5f4379513dc11fd97dc75336eb0c0d3338c53128044d9fabec4374f4bc47
  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. endef
  30. define Package/json-glib/description
  31. JSON-GLib is a library providing serialization and deserialization
  32. support for the JavaScript Object Notation (JSON) format described by
  33. RFC 4627.
  34. endef
  35. MESON_ARGS += \
  36. -Ddocs=false \
  37. -Dintrospection=false \
  38. -Dman=false
  39. # Disable installed-tests; this also indirectly removes
  40. # build_aux/gen-installed-test.py calls (copied from Gentoo)
  41. define Build/Prepare
  42. $(call Build/Prepare/Default)
  43. $(SED) 's/install: true/install: false/g' \
  44. $(PKG_BUILD_DIR)/json-glib/tests/meson.build
  45. $(SED) '/install_data/d' \
  46. $(PKG_BUILD_DIR)/json-glib/tests/meson.build
  47. $(SED) '/error=format=2/d' $(PKG_BUILD_DIR)/meson.build
  48. endef
  49. define Build/InstallDev
  50. $(INSTALL_DIR) $(1)/usr/include/json-glib-1.0/json-glib
  51. $(INSTALL_DATA) \
  52. $(PKG_INSTALL_DIR)/usr/include/json-glib-1.0/json-glib/*.h \
  53. $(1)/usr/include/json-glib-1.0/json-glib
  54. $(INSTALL_DIR) $(1)/usr/lib
  55. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so* \
  56. $(1)/usr/lib
  57. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/json-glib-1.0.pc \
  59. $(1)/usr/lib/pkgconfig
  60. endef
  61. define Package/json-glib/install
  62. $(INSTALL_DIR) $(1)/usr/lib
  63. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjson-glib-1.0.so.* \
  64. $(1)/usr/lib
  65. endef
  66. $(eval $(call BuildPackage,json-glib))