%global gitdate 20150410 %global gittag d7d05091617d8173923df14cf46bc74311dc176e %global shorttag %(c=%{gittag}; echo ${c:0:7}) %global user nlohmann %global debug_package %{nil} Name: json Version: 0 Release: 3.%{gitdate}git.%{shorttag}%{?dist} Summary: JSON for Modern C++ Group: Development/Libraries License: MIT ## Not installed # test/catch.hpp: Boost Software License, Version 1.0 URL: https://github.com/%{user}/%{name}/ Source0: https://github.com/%{user}/%{name}/tarball/%{gittag}/%{user}-%{name}-%{shorttag}.tar.gz BuildRequires: cppcheck BuildRequires: /usr/bin/make BuildRequires: doxygen Patch0: nlohmann-json-d7d0509-gcc5fix.patch %description This is a packages version of the nlohmann/json header-only C++ library available at Github. %package devel Summary: Development files for %{name} Group: Development/Libraries Provides: %{name}-static = %{version}-%{release} Requires: %{name} = %{version}-%{release} Requires: libstdc++-devel %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %prep %setup -q -n %{user}-%{name}-%{shorttag} %patch0 -p1 %build doxygen Doxyfile %check make cppcheck make json_unit ./json_unit %install mkdir -p %{buildroot}%{_includedir} install -p -m 0644 src/json.hpp %{buildroot}%{_includedir}/json.hpp %files %doc README.md %license LICENSE.MIT %files devel %doc html/ %{_includedir}/json.hpp %changelog * Tue Apr 14 2015 Daniel Kopecek - 0-3.20150410git.d7d0509 - added patch to fix compilation of json_unit with gcc-5.x * Tue Apr 14 2015 Daniel Kopecek - 0-2.20150410git.d7d0509 - run json_unit target from the check section - document catch.hpp license - don't build the debuginfo subpackage - don't generate a distribution specific pkg-config file * Fri Apr 10 2015 Daniel Kopecek - 0-1.20150410git.d7d0509 - Initial package