From a54a6d87eeecbd360931f9d088314ee3977c6cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 25 Mar 2016 13:34:02 +0100 Subject: [PATCH] Update to version 1.7.1 Use %%license and %%doc properly Add generated CMake-target Move %%check after %%install Remove Group-tag, needed for el <= 5, only Drop Patch0, not needed anymore --- .gitignore | 1 + jsoncpp.spec | 57 +++++++++++++++++++++++++++++++++++--------------- nowerror.patch | 16 -------------- sources | 2 +- 4 files changed, 42 insertions(+), 34 deletions(-) delete mode 100644 nowerror.patch diff --git a/.gitignore b/.gitignore index 3d7b131..9eb5168 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ jsoncpp.pc jsoncpp-src-0.6.0-rc2.tar.gz /jsoncpp-0.10.5.tar.gz +/jsoncpp-1.7.1.tar.gz diff --git a/jsoncpp.spec b/jsoncpp.spec index c88d239..8147a2c 100644 --- a/jsoncpp.spec +++ b/jsoncpp.spec @@ -1,18 +1,18 @@ %global jsondir json Name: jsoncpp -Version: 0.10.5 -Release: 4%{?dist} +Version: 1.7.1 +Release: 1%{?dist} Summary: JSON library implemented in C++ -Group: System Environment/Libraries + License: Public Domain or MIT URL: https://github.com/open-source-parsers/jsoncpp Source0: https://github.com/open-source-parsers/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: nowerror.patch -BuildRequires: doxygen cmake -BuildRequires: python +BuildRequires: cmake +BuildRequires: doxygen BuildRequires: graphviz +BuildRequires: python %description %{name} is an implementation of a JSON (http://json.org) reader and writer in @@ -23,7 +23,6 @@ generate. %package devel Summary: Development headers and library for %{name} -Group: Development/Libraries Requires: %{name}%{?_isa} = %{version}-%{release} %description devel @@ -32,53 +31,77 @@ This package contains the development headers and library for %{name}. %package doc Summary: Documentation for %{name} -Group: Documentation BuildArch: noarch %description doc -This package contains the documentation for %{name} +This package contains the documentation for %{name}. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 + %build -CMAKE_CXX_FLAGS="-Wno-error" %cmake -DBUILD_STATIC_LIBS=OFF . +%cmake -DBUILD_STATIC_LIBS=OFF \ + -DJSONCPP_WITH_WARNING_AS_ERROR=OFF \ + -DJSONCPP_WITH_PKGCONFIG_SUPPORT=ON \ + -DJSONCPP_WITH_CMAKE_PACKAGE=ON \ + . make %{?_smp_mflags} # Build the doc python doxybuild.py --with-dot --doxygen %{_bindir}/doxygen -%check -# Tests are run automatically in the build section -# ctest -V %{?_smp_mflags} %install make install DESTDIR=%{buildroot} mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}/html -for f in AUTHORS LICENSE NEWS.txt README.md ; do +for f in NEWS.txt README.md ; do install -p -m 0644 $f $RPM_BUILD_ROOT%{_docdir}/%{name} done install -p -m 0644 dist/doxygen/*/*.{html,png} $RPM_BUILD_ROOT%{_docdir}/%{name}/html + +%check +# Tests are run automatically in the build section +# ctest -V %{?_smp_mflags} + + %post -p /sbin/ldconfig %postun -p /sbin/ldconfig + %files -%{_docdir}/%{name}/ +%license AUTHORS LICENSE +%doc %dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/README.md %exclude %{_docdir}/%{name}/html %{_libdir}/lib%{name}.so.* + %files devel +%doc %dir %{_docdir}/%{name} +%doc %{_docdir}/%{name}/NEWS.txt %{_libdir}/lib%{name}.so %{_includedir}/%{jsondir}/ +%{_libdir}/cmake %{_libdir}/pkgconfig/jsoncpp.pc + %files doc -%{_docdir}/%{name}/ +%license %{_datadir}/licenses/%{name}* +%doc %{_docdir}/%{name}/ + %changelog +* Fri Mar 25 2016 Björn Esser - 1.7.1-1 +- Update to version 1.7.1 +- Use %%license and %%doc properly +- Add generated CMake-target +- Move %%check after %%install +- Remove Group-tag, needed for el <= 5, only +- Drop Patch0, not needed anymore + * Tue Feb 16 2016 Sébastien Willmann - 0.10.5-4 - Disabled Werror diff --git a/nowerror.patch b/nowerror.patch deleted file mode 100644 index be6e2fc..0000000 --- a/nowerror.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -ru jsoncpp-0.10.5/CMakeLists.txt jsoncpp-0.10.5.patched/CMakeLists.txt ---- jsoncpp-0.10.5/CMakeLists.txt 2015-07-23 07:32:47.000000000 +0200 -+++ jsoncpp-0.10.5.patched/CMakeLists.txt 2016-02-16 19:10:50.731887585 +0100 -@@ -97,10 +97,10 @@ - - if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") - # using regular Clang or AppleClang -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wshadow -Wshorten-64-to-32") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wshadow -Wshorten-64-to-32") - elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") - # using GCC -- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wall -Wshadow -Wextra -pedantic -Wno-long-long") -+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wshadow -Wextra -pedantic -Wno-long-long") - # not yet ready for -Wconversion - endif() - diff --git a/sources b/sources index 5054485..6798d79 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -db146bac5a126ded9bd728ab7b61ed6b jsoncpp-0.10.5.tar.gz +c075c61212b01d7350105395135a71d0 jsoncpp-1.7.1.tar.gz