File json_spirit.spec of Package json-spirit
#
# spec file for package json_spirit
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# See also http://en.opensuse.org/openSUSE:Shared_library_packaging_policy
Name: json_spirit
Version: 4.0.8
%define gitver 4.0.8-1-g61fbb8d
Release: 0
Summary: C++ library for serialisation/deserialisation of Json
License: MIT
Group: Development/Libraries/C and C++
Url: http://www.codeproject.com/Articles/20027/JSON-Spirit-A-C-JSON-Parser-Generator-Implemented
Source0: json_spirit-%{gitver}.tar.gz
BuildRequires: gcc-c++ boost-devel cmake
%description
The %{name} package contains libraries and header files for
developing applications that use %{name}.
%package devel
Summary: C++ library for serialisation/deserialisation of Json
Requires: json_spirit = %{version}
Requires: boost-devel
Group: Development/Libraries/C and C++
%description devel
The %{name} package contains libraries and header files for
developing applications that use %{name}.
%global debug_package %{nil}
%prep
%setup -n json_spirit-%{gitver}
%build
%if 0%{?suse_version:1}<1300
cmake -DCMAKE_CXX_FLAGS=-fPIC -DJSON_SPIRIT_TESTS=OFF -DJSON_SPIRIT_DEMOS=OFF -DJSON_SPIRIT_MVALUE_ENABLED=ON .
%else
%cmake
%endif
make %{?_smp_mflags} VERBOSE=1
%install
mkdir -p %{buildroot}/%{_includedir} %{buildroot}/%{_libdir}
cp json_spirit/*.h %{buildroot}/%{_includedir}
find . -name libjson_spirit.so -exec cp {} %{buildroot}/%{_libdir} \;
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr (-,root,root)
%files devel
%defattr (-,root,root)
%{_includedir}/*
%{_libdir}/*
%changelog