File miracl.spec of Package miracl

#
# spec file for package aby
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#

%define _gitcommit    0b9bdead1b3636a296e2f7c125cfa465ef47cfe3
%define _gitcommitish 0b9bdea

Name:           miracl
Version:        0+20190225.%{_gitcommitish}
Release:        0%{?dist}
Summary:        Multiprecision Integer and Rational Arithmetic Cryptographic Library
License:        AGPL-3.0
Url:            https://github.com/encryptogroup/MIRACL
Group:          Development/Libraries/C and C++
Source0:        %{url}/archive/%{_gitcommit}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         fix-cmake-paths.patch
BuildRequires:  gcc-c++
BuildRequires:  cmake
BuildRequires:  ninja

%description
What is MIRACL? Multiprecision Integer and Rational Arithmetic Cryptographic
Library – the MIRACL Crypto SDK – is a C software library that is widely
regarded by developers as the gold standard open source SDK for elliptic curve
cryptography (ECC).

Why is it different? While many other cryptographic SDKs are focused on PC use,
MIRACL also enables developers to build security into highly constrained
environments, including embedded, mobile apps and SCADA.

%package devel
Summary:        Multiprecision Integer and Rational Arithmetic Cryptographic Library
Requires:       miracl = %{version}

%description devel
Development files for MIRACL.

%prep
%setup -q -n MIRACL-%{_gitcommit}
%patch0 -p1

%build
%cmake -GNinja
%ninja_build

%install
cd build/
%ninja_install

%post devel
/sbin/ldconfig

%postun devel
/sbin/ldconfig

%files
%defattr(-,root,root)
%doc first.txt readme.txt README.md update.txt

%files devel
%defattr(-,root,root)
%{_includedir}/MIRACL/
%{_libdir}/libmiracl.so
%{_libdir}/cmake/MIRACL/

%changelog