Name:           jsoncpp
Version:        1.9.5
Release:        1%{?_dist_release}
Summary:        JSON library implemented in C++
Summary(ja):    C++ で実装された JSON ライブラリ
Group:          system
Vendor:         Project Vine
Distribution:   Vine Linux

License:        Public Domain or MIT
URL:            https://github.com/open-source-parsers/jsoncpp
Source0:        https://github.com/open-source-parsers/jsoncpp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-root
BuildRequires:  cmake > 3.15.0
BuildRequires:  python3-devel
BuildRequires:  python3-rpm-macros

%description
%{name} is an implementation of a JSON (http://json.org) reader and writer in
C++. JSON (JavaScript Object Notation) is a lightweight data-interchange format.
It is easy for humans to read and write. It is easy for machines to parse and
generate.


%package devel
Summary:    Development headers and library for %{name}
Summary(ja): %{name} の開発用ヘッダファイルとライブラリ
Group:      programming
Requires:   %{name} = %{version}-%{release}
Obsoletes:  %{name}-doc < 1.0.0
%description devel
This package contains the development headers and library for %{name}.


%debug_package


%prep
%autosetup -p1


%build
%cmake -DBUILD_STATIC_LIBS=OFF                \
       -DBUILD_OBJECT_LIBS=OFF                \
       -DJSONCPP_WITH_WARNING_AS_ERROR=OFF    \
       -DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON    \
       -DJSONCPP_WITH_CMAKE_PACKAGE=ON        \
       -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF \
       -DJSONCPP_WITH_EXAMPLE:BOOL=OFF        \
       -DJSONCPP_WITH_STRICT_ISO:BOOL=ON      \
       -DPYTHON_EXECUTABLE="%{__python3}"

%cmake_build


%check
# Run tests single threaded.
%global _smp_mflags -j1
%ctest


%install
rm -rf $RPM_BUILD_ROOT
%cmake_install


%clean
rm -rf $RPM_BUILD_ROOT


%files
%license LICENSE
%doc AUTHORS README*
%{_libdir}/lib%{name}.so.*

%files devel
%doc doc/*.html
%{_libdir}/lib%{name}.so
%{_includedir}/json
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/%{name}.pc


%changelog
* Fri Nov 18 2022 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.9.5-1
- new upstream release.
- dropped ldconfig scriptlets.

* Thu Jul 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.9.3-1
- new upstream release.
- dropped Patch0000: fixed in upstream.

* Sat Sep 21 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.9.1-1
- new upstream release.
- dropped Source1.
- dropped Patch0.
- imported Patch0000 from rawhide.
- dropped a sub-package "doc".

* Thu Jun 30 2016 Yoji TOYODA <bsyamato@sea.plala.or.jp> - 0.7.1-2
- rebuild with gcc-5.4.0

* Tue Jan 27 2015 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 0.7.1-1
- Initial build for Vine Linux

* Sun Sep 21 2014 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.14.rc2
- Allow int values to be converted to string (#1143774)

* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.13.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.12.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Tue Sep 10 2013 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.11.rc2
- https://bugzilla.redhat.com/show_bug.cgi?id=998149 : applied Michael Schwendt's
  patch to fix duplicated documentation

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-0.10.rc2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Mar 15 2013 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.9.rc2
- Changed Summary
- Added %%doc files to the doc package
- Added python as an explicit BuildRequires

* Fri Feb 15 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.8.rc2
- Added documentation sub-package

* Sun Jan 20 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.7.rc2
- Added graphviz as a BuildRequire

* Sat Jan 19 2013 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.6.rc2
- Install the corrected library

* Sat Dec 22 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.5.rc2
- Added libjsoncpp.so.0
- Moved the shared lib build to the correct section

* Fri Dec 21 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.4.rc2
- Removed doc subpackage
- Added .pc file
- Fixed shared lib

* Wed Dec 12 2012 Sebastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.3.rc2
- Removed static package
- Preserving timestamp on installed files
- Added guard grep to the sed expression
- Removed duplicated doc files
- Removed dependency on pkgconfig
- Changed base package group

* Sun Dec 02 2012 Sébastien Willmann <sebastien.willmann@gmail.com> - 0.6.0-0.2.rc2
- Changed license field to Public Domain or MIT

* Tue Nov 27 2012 Sébastien Willmann <sebastien.willmann@gmail.com> 0.6.0-0.1.rc2
- Creation of the spec file

