blob: 28aedaca15c0b770a8c660aeab4c2999a6052e98 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001#
2# Copyright (C) 2019 Daniel Engberg <daniel.engberg.lists@pyret.net>
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=jsoncpp
11PKG_VERSION:=1.9.5
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
16PKG_HASH:=f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2
17
18PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
19PKG_LICENSE:=MIT
20PKG_LICENSE_FILES:=LICENSE
21PKG_CPE_ID:=cpe:/a:jsoncpp_project:jsoncpp
22
23include $(INCLUDE_DIR)/package.mk
24include $(INCLUDE_DIR)/meson.mk
25
26define Package/jsoncpp
27 SECTION:=libs
28 CATEGORY:=Libraries
29 TITLE:=jsoncpp
30 URL:=https://github.com/open-source-parsers/jsoncpp
31 DEPENDS:=+libstdcpp
32endef
33
34define Package/jsoncpp/description
35 JsonCpp is a C++ library that allows manipulating
36 JSON values, including serialization and
37 deserialization to and from strings. It can also
38 preserve existing comment in
39 unserialization/serialization steps, making it a
40 convenient format to store user input files.
41endef
42
43MESON_ARGS += \
44 -Db_lto=true \
45 -Dtests=false
46
47TARGET_LDFLAGS += -Wl,--gc-sections
48
49define Build/InstallDev
50 $(INSTALL_DIR) $(1)/usr/include
51 $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/
52 $(INSTALL_DIR) $(1)/usr/lib
53 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
56endef
57
58define Package/jsoncpp/install
59 $(INSTALL_DIR) $(1)/usr/lib/
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
61endef
62
63$(eval $(call BuildPackage,jsoncpp))