File coeurl.spec of Package coeurl

#
# spec file for package coeurl
#
# 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/
#

%global libname libcoeurl0
Name:           coeurl
Version:        0.1.1
Release:        0
Summary:        A simple async wrapper around CURL for C++
License:        MIT
URL:            https://nheko.im/nheko-reborn/coeurl
Source:         %{url}/-/archive/v%{version}/%{name}-v%{version}.tar.gz
BuildRequires:  meson
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libevent)
BuildRequires:  pkgconfig(spdlog)

%description
Simple library to do http requests asynchronously via CURL in C++. (Eventually
as coroutines, once all the compilers I need to support support them.)
This is based on the CURL-libevent
example.

%package -n %{libname}
Summary:        Libraries for %name

%description -n %{libname}
%{summary}.

%package devel
Summary:        Development files for %{name}
Requires:       %{libname} = %{version}

%description devel
%{summary}.

%prep
%autosetup -n %{name}-v%{version}

%build
%meson
%meson_build

%install
%meson_install

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

%files devel
%license LICENSE
%doc README.md
%{_libdir}/libcoeurl.so
%dir %{_includedir}/coeurl
%{_includedir}/coeurl/*.hpp
%{_libdir}/pkgconfig/coeurl.pc

%files -n %{libname}
%{_libdir}/libcoeurl.so.*

%changelog

openSUSE Build Service is sponsored by