File libunivalue.spec of Package libunivalue
#
# spec file for package libunivalue
#
# Copyright (c) 2019 SUSE LLC.
#
# 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 https://bugs.opensuse.org/
#
Name: libunivalue
Version: 1.0.5
Release: 0
Summary: A C++ universal value object and JSON library
License: MIT
Group: System/Libraries
URL: https://github.com/jgarzik/univalue
Source0: %{name}-%{version}.tar.xz
BuildRequires: automake
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: pkg-config
%define soname 0
%define description_text A universal value object, with JSON encoding (output) and decoding (input). Built as a single dynamic RAII C++ object class, and no templates.
%description
%{description_text}
%package -n %{name}%{soname}
Summary: A C++ universal value object and JSON library
Group: System/Libraries
%description -n %{name}%{soname}
%{description_text}
%package devel
Summary: Development files for %{name}
Group: Development/Libraries/C and C++
Requires: %{name}%{soname} = %{version}
%description devel
%{description_text}
The %{name}-devel package contains libraries and header files for developing applications that use %{name}.
%prep
%setup -q
%build
./autogen.sh
%configure --enable-silent-rules --disable-static --enable-shared
%if 0%{?suse_version} && 0%{?suse_version} >= 1500
%make_build
%else
%{__make} %{?_smp_mflags}
%endif
%install
%make_install
%{__rm} %{buildroot}%{_libdir}/%{name}.la
%check
%{__make} %{?_smp_mflags} check
%post -n %{name}%{soname}
/sbin/ldconfig
%postun -n %{name}%{soname}
/sbin/ldconfig
%files -n %{name}%{soname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%doc README.md TODO
%license COPYING
%changelog