File olm.spec of Package olm
#
# spec file for olm
#
# Copyright (c) 2018 cunix
#
# 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 version_major 2
%define version_minor 2
%define version_mini 2
%define libname lib%{name}
%define libsoname %{libname}%{version_major}
Name: olm
Version: %{version_major}.%{version_minor}.%{version_mini}
Release: 0
Summary: Encryption for matrix clients
License: Apache-2.0
Group: Productivity/Networking/Instant Messenger
Url: https://git.matrix.org/git/olm
#https://git.matrix.org/git/olm/snapshot/olm-2.2.2.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-c++
BuildRequires: fdupes
%description
An implementation of the Double Ratchet cryptographic ratchet
including an implementation of the Megolm cryptographic ratchet
%package -n %{libsoname}
Summary: Encryption library for matrix clients
License: Apache-2.0
Group: Productivity/Networking/Instant Messenger
%description -n %{libsoname}
An implementation of the Double Ratchet cryptographic ratchet
including an implementation of the Megolm cryptographic ratchet.
This is the library package exposed as a C API
%prep
%setup -q -n %{name}-%{version}
%build
export CFLAGS="%{optflags}"
export CXXFLAGS="$CFLAGS"
make %{?_smp_mflags}
%install
cd ./build
rm -fr ./release
mkdir -p %{buildroot}%{_libdir}
cp -r %{libname}* %{buildroot}%{_libdir}/
%fdupes %{buildroot}
%post -n %{libsoname} -p /sbin/ldconfig
%postun -n %{libsoname} -p /sbin/ldconfig
%files -n %{libsoname}
%defattr(-,root,root)
%{_libdir}/%{libname}*
%changelog