File deltachat-core-rust.spec of Package deltachat-core-rust
#
# spec file for package deltachat-core-rust
#
# Copyright (c) 2021, Martin Hauke <mardnh@gmx.de>
#
# 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: deltachat-core-rust
Version: 1.60.0
Release: 0
Summary: Instant messaging over e-mail
License: MPL-2.0
Group: Development/Libraries/C and C++
URL: https://delta.chat/
Source: https://github.com/deltachat/deltachat-core-rust/archive/refs/tags/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: vendor.tar.xz
Source2: cargo_config
BuildRequires: cargo
BuildRequires: libopenssl-devel
BuildRequires: rust
BuildRequires: rust-packaging
%description
Delta Chat is an instant messaging system running a top of e-mail. It comes
with optional end-to-end encryption, group chats and transmitting of video or
audio files.
%package devel
Summary: Development files for the Delta Chat library
Group: Development/Libraries/C and C++
%description devel
Delta Chat is an instant messaging system running a top of e-mail. It comes
with optional end-to-end encryption, group chats and transmitting of video or
audio files.
This package provides the development filesfor deltachat-core-rust.
%prep
%autosetup -p 1 -a 1
install -D -m 0644 %{SOURCE2} .cargo/config
%build
cd deltachat-ffi
cargo build --release --locked %{?_smp_mflags}
%install
install -Dm 0755 target/release/libdeltachat.so %{buildroot}/%{_libdir}/libdeltachat.so
install -Dm 0644 target/release/pkgconfig/deltachat.pc %{buildroot}/%{_libdir}/pkgconfig/deltachat.pc
install -Dm 0644 deltachat-ffi/deltachat.h %{buildroot}/%{_includedir}/deltachat.h
%check
#%%cargo_test
%files devel
%license LICENSE
%doc CHANGELOG.md README.md
%{_includedir}/deltachat.h
%{_libdir}/libdeltachat.so
%{_libdir}/pkgconfig/deltachat.pc
%changelog