File libsecp256k1-0.spec of Package libsecp256k1-0

#
# spec file for package libsecp256k1-0
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2017-2018 Szőts Ákos <szotsaki@gmail.com>
#
# 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 sover   0
%define _name   libsecp256k1
Name:           %{_name}-%{sover}
Version:        0.1
Release:        0
Summary:        Optimized C library for EC operations on curve secp256k1
Summary:        Optimized C library for EC operations on curve secp256k1
License:        MIT
Group:          System/Libraries
URL:            https://github.com/bitcoin/secp256k1
Source0:        %{_name}-%{version}.tar.xz
BuildRequires:  automake
BuildRequires:  gmp-devel
BuildRequires:  java-devel
BuildRequires:  libtool
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(openssl)

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}

%description
The %{name} library is a work in progress and is being used to research best practices. Use at your own risk.

Features:
- secp256k1 ECDSA signing/verification and key generation.
- Adding/multiplying private/public keys.
- Serialization/parsing of private keys, public keys, signatures.
- Constant time, constant memory access signing and pubkey generation.
- Derandomized DSA (via RFC6979 or with a caller provided function).
- Very efficient implementation.

%description devel
The %{name}-devel package contains libraries and header files for developing applications that use %{name}.

%prep
%setup -q -n %{_name}-%{version}

%build
./autogen.sh
%configure --disable-static \
           --enable-tests \
           --enable-openssl-tests \
           --enable-experimental \
           --enable-exhaustive-tests \
           --enable-endomorphism \
           --enable-ecmult-static-precomputation \
           --enable-module-ecdh \
           --enable-module-recovery \
           --enable-jni \
           --with-bignum=gmp
make %{?_smp_mflags}

%install
%make_install
mkdir -p %{buildroot}%{_libdir}/pkgconfig
find %{buildroot} -type f -name "*.la" -delete -print

%check
./tests

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%{_libdir}/%{_name}.so.%{sover}*
%license COPYING
%doc README.md

%files devel
%{_includedir}/secp256k1*.h
%{_libdir}/pkgconfig/%{_name}.pc
%{_libdir}/%{_name}.so
%doc TODO

%changelog