Group :: Development/C++
RPM: libjson11
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
%define oname json11
Name: libjson11
Version: 1.0.0
Release: alt1
Summary: A tiny JSON library for C++11
License: MIT
Group: Development/C++
Url: https://github.com/dropbox/%name
Packager: Vitaly Lipatov <lav at altlinux.ru>
# Source-url: %url/archive/v%version.tar.gz
Source: %name-%version.tar
BuildRequires: ninja-build
BuildRequires: gcc-c++
BuildRequires: cmake
%description
Json11 is a tiny JSON library for C++11, providing JSON parsing
and serialization.
%package devel
Summary: Development files for %name
Requires: %name = %EVR
Group: Development/C++
%description devel
%summary.
%prep
%setup
%__subst 's at lib/ at %_lib/ at g' CMakeLists.txt
%__subst 's at lib/ at %_lib/ at g' json11.pc.in
echo "set_property(TARGET json11 PROPERTY SOVERSION 0)" >> CMakeLists.txt
%build
%cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DJSON11_BUILD_TESTS=ON
%cmake_build
%check
# TODO
#%%ctest
%install
%cmake_install
%files
%doc README.md
%doc LICENSE.txt
%_libdir/%name.so.0
%files devel
%_libdir/%name.so
%_includedir/json11.hpp
%_pkgconfigdir/%oname.pc
%changelog
…
Full changelog you can see here
Name: libjson11
Version: 1.0.0
Release: alt1
Summary: A tiny JSON library for C++11
License: MIT
Group: Development/C++
Url: https://github.com/dropbox/%name
Packager: Vitaly Lipatov <lav at altlinux.ru>
# Source-url: %url/archive/v%version.tar.gz
Source: %name-%version.tar
BuildRequires: ninja-build
BuildRequires: gcc-c++
BuildRequires: cmake
%description
Json11 is a tiny JSON library for C++11, providing JSON parsing
and serialization.
%package devel
Summary: Development files for %name
Requires: %name = %EVR
Group: Development/C++
%description devel
%summary.
%prep
%setup
%__subst 's at lib/ at %_lib/ at g' CMakeLists.txt
%__subst 's at lib/ at %_lib/ at g' json11.pc.in
echo "set_property(TARGET json11 PROPERTY SOVERSION 0)" >> CMakeLists.txt
%build
%cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DJSON11_BUILD_TESTS=ON
%cmake_build
%check
# TODO
#%%ctest
%install
%cmake_install
%files
%doc README.md
%doc LICENSE.txt
%_libdir/%name.so.0
%files devel
%_libdir/%name.so
%_includedir/json11.hpp
%_pkgconfigdir/%oname.pc
%changelog
…
Full changelog you can see here