File lomiri-api.spec of Package lomiri-api

#
# spec file for package lomiri-api
#
# Copyright (c) 2021 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  liblomiri-api
%define sover   0
Name:           lomiri-api
Version:        0.1.1
Release:        0
Summary:        API for Lomiri shell integration
License:        LGPL-3.0-only
Group:          System/GUI/Other
URL:            https://gitlab.com/ubports/core/lomiri-api
Source:         https://gitlab.com/ubports/core/lomiri-api/-/archive/%{version}/%{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(glib-2.0)
%if 0%{?is_opensuse}
BuildRequires:  cppcheck
%endif

%description
Library to integrate with the Lomiri shell.

%package -n %{soname}%{sover}
Summary:        API for Lomiri shell integration
Group:          System/Libraries

%description -n %{soname}%{sover}
Library to integrate with the Lomiri shell.

%package devel
Summary:        Development files of liblomiri-api
Group:          Development/Libraries/C and C++
Requires:       %{soname}%{sover} = %{version}

%description devel
The liblomiri-api development package includes the header files,
libraries, development tools necessary for compiling and linking
application which will use liblomiri-api.

%prep
%setup -q

%build
%cmake \
  -DCMAKE_INSTALL_PREFIX=%{_prefix}       \
  -DCMAKE_LIBRARY_ARCHITECTURE=../%{_lib} \
  -DNO_TESTS=ON
%cmake_build

%install
%cmake_install

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

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

%files -n %{soname}%{sover}
%license COPYING
%{_libdir}/%{soname}.so.%{sover}*

%files devel
%doc NEWS README
%{_includedir}/lomiri/
%{_libdir}/%{soname}.so
%{_libdir}/pkgconfig/*.pc

%changelog
openSUSE Build Service is sponsored by