File libqjson.spec of Package libqjson-qt4

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


%define soname %{name}0
%define debug_package_requires libqjson0 = %{version}-%{release}
Name:           libqjson
Version:        0.9.0
Release:        0
Summary:        QJson is a qt-based library that maps JSON data to QVariant objects
License:        LGPL-2.1-or-later
Group:          Development/Libraries/C and C++
URL:            http://qjson.sourceforge.net/
Source:         https://github.com/flavio/qjson/archive/%{version}.tar.gz#/qjson-%{version}.tar.gz
Source1:        baselibs.conf
BuildRequires:  cmake
BuildRequires:  libqt4-devel

%description
JSON (JavaScript Object Notation) is a lightweight data-interchange format.
It can represent integer, real number, string, an ordered sequence of value,
and a collection of name/value pairs. QJson is a qt-based library that maps
JSON data to QVariant objects. JSON arrays will be mapped to QVariantList
instances, while JSON's objects will be mapped to QVariantMap.

%package -n libqjson0
Summary:        QJson is a qt-based library that maps JSON data to QVariant objects
Group:          Development/Libraries/C and C++

%description -n libqjson0
JSON (JavaScript Object Notation) is a lightweight data-interchange format.
It can represent integer, real number, string, an ordered sequence of value,
and a collection of name/value pairs. QJson is a qt-based library that maps
JSON data to QVariant objects. JSON arrays will be mapped to QVariantList
instances, while JSON's objects will be mapped to QVariantMap.

%package devel
Summary:        Development files for QJson
Group:          Development/Libraries/C and C++
Requires:       %{soname} = %{version}

%description devel
JSON (JavaScript Object Notation) is a lightweight data-interchange format.
It can represent integer, real number, string, an ordered sequence of value,
and a collection of name/value pairs. QJson is a qt-based library that maps
JSON data to QVariant objects. JSON arrays will be mapped to QVariantList
instances, while JSON's objects will be mapped to QVariantMap.

This package contains files for developing applications using QJson.

%prep
%setup -q -n qjson-%{version}

%build
%cmake
%cmake_build

%install
%cmake_install

%post -n %{soname} -p /sbin/ldconfig
%postun -n %{soname} -p /sbin/ldconfig

%files -n %{soname}
%license COPYING.lib
%doc ChangeLog README*
%{_libdir}/libqjson.so.*

%files devel
%dir %{_libdir}/cmake
%{_includedir}/qjson
%{_libdir}/libqjson.so
%{_libdir}/pkgconfig/QJson.pc
%{_libdir}/cmake/qjson

%changelog
openSUSE Build Service is sponsored by