File json-spirit.spec of Package json-spirit
#
# spec file for package json-spirit
#
# Copyright (c) 2015, Martin Hauke <mardnh@gmx.de>
#
# 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/
#
Name: json-spirit
Version: 0.0.0.git1399833966.3977156
%define soname %{version}
Release: 0
Summary: JSON Serialization Library using Boost.Spirit
License: MIT
Group: Development/Libraries/C and C++
Url: https://github.com/mickem/json-spirit
Source: %{name}-%{version}.tar.xz
BuildRequires: gcc-c++
BuildRequires: boost-devel
BuildRequires: cmake
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
JSON Spirit is a C++ JSON library using Boost Spirit for parsing.
%package -n libjson_spirit%{soname}
Summary: JSON Serialization Library using Boost.Spirit
Group: Development/Libraries/C and C++
%description -n libjson_spirit%{soname}
JSON Spirit is a C++ JSON library using Boost Spirit for parsing.
%package devel
Summary: Development headers for libjson_spirit
Group: Development/Libraries/C and C++
#Requires: libjson_spirit%{soname} = %{version}
%description devel
JSON Spirit is a C++ JSON library using Boost Spirit for parsing.
This subpackage provides the development files for libjson_spirit.
%prep
%setup -q
%build
cd build
cmake . \
-DJSON_SPIRIT_LIBRARY_TYPE=SHARED \
-DJSON_SPIRIT_BUILD_DEMOS=FALSE \
-DJSON_SPIRIT_BUILD_TESTS=FALSE
make %{?_smp_mflags}
%install
cd build
%make_install
# FIXME: CmakeListstxt should have options for DESTDIR and LIB_SUFFIX
mkdir -p %{buildroot}/%{_libdir}/
mkdir -p %{buildroot}/%{_includedir}/
mv %{buildroot}/usr/local/lib/* %{buildroot}/%{_libdir}/
mv %{buildroot}/usr/local/include/* %{buildroot}/%{_includedir}/
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files devel
%defattr(-,root,root)
%dir %{_includedir}/json_spirit/
%{_includedir}/json_spirit/*.h
%{_libdir}/libjson_spirit.so
%changelog