LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libvariant.spec of Package libvariant (Project home:eveith:branches:devel:libraries:c_c++)

#
# spec file for package 
#
# Copyright (c) 2015 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/
#

Name:           libvariant
Version:        1.0.1
Release:        0
License:        LGPL-2.0+
Summary:        C++ serialization library
Url:            https://bitbucket.org/gallen/libvariant
Group:          Development/Libraries/C and C++
Source:         https://bitbucket.org/gallen/libvariant/get/%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  libyaml-devel
BuildRequires:  libxml2-devel
BuildRequires:  libcurl-devel
BuildRequires:  pkg-config
#BuildRequires:  doxygen

%description
C++ Variant class and serialization library. Features:

* Scripting language like variable (Variant) in C++.
* JSON serialization.
* YAML serialization. Deserialization ignores most tags.
* plist serialization.
* Schema validation based on json-schema.
* Schema lookup can be set to use libcurl to fetch remote URLs.
* A simple argument parsing (ArgParse) class that produces a
  Variant from a programs arguments.

%package -n libVariant1_0_1
Summary:        Shared library for %{name}
Group:          Development/Languages/C and C++

%description -n libVariant1_0_1
C++ Variant class and serialization library. This package contains shared library.

%package devel
Summary:        Development files for %{name}
Group:          Development/Languages/C and C++
Requires:       libVariant1_0_1 = %{version}

%description devel
C++ Variant class and serialization library. This package contains development files.

%prep
%setup -q -n gallen-%{name}-40b8e618db81

#hotfix
sed -i 's/@VARIANT_VERSION@/@LIBVARIANT_VERSION@/' libvariant.pc.in

%build
%cmake \
    -DINSTALL_LIB_DIR=%{_lib} \
    -DLIBVARIANT_BUILD_DEBUG=ON
make %{?_smp_mflags}
#make doc

%install
%cmake_install

%post -n libVariant1_0_1 -p /sbin/ldconfig

%postun -n libVariant1_0_1 -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc LICENSE README.md
%{_bindir}/varsh

%files -n libVariant1_0_1
%defattr(-,root,root)
%doc LICENSE
%{_libdir}/libVariant.so.*

%files devel
%defattr(-,root,root)
%{_includedir}/Variant
%{_libdir}/libVariant.so
%{_libdir}/pkgconfig/libvariant.pc
%{_libdir}/cmake/LibVariant

%changelog