File libsecp256k1-legacy.spec of Package libsecp256k1-legacy
#
# spec file for package libsecp256k1-legacy
#
# Copyright (c) 2018 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 libname libsecp256k1
Name: libsecp256k1-legacy
Version: 20150430
Release: 0
Summary: Optimized C library for EC operations on curve secp256k1
License: MIT
Group: System/Libraries
Url: https://github.com/bitcoin/secp256k1
Source0: %{libname}-%{version}.tar.xz
Source1: %{name}-rpmlintrc
BuildRequires: automake
BuildRequires: libtool
BuildRequires: pkg-config
%define soname 0
%package -n %{name}-%{soname}
Summary: Optimized C library for EC operations on curve secp256k1
Group: System/Libraries
Obsoletes: %{name}-%{soname} < %{version}
Conflicts: %{name}-%{soname} > %{version}
%package devel
Summary: Development files for %{libname}
Group: Development/Libraries/C and C++
Requires: %{name}-%{soname} = %{version}
%description
%description -n %{name}-%{soname}
The %{libname} 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 %{libname}-devel package contains libraries and header files for developing applications that use %{libname}.
%prep
%setup -q -n %{libname}-%{version}
%build
./autogen.sh
%configure --enable-silent-rules --disable-static
%{__make} %{?_smp_mflags}
%install
%{__make} install DESTDIR=%{buildroot}
%{__mkdir_p} %{buildroot}%{_libdir}/pkgconfig
%{__install} -m 0644 -p -t %{buildroot}%{_libdir}/pkgconfig *.pc
find %{buildroot} -name '*.la' -exec rm -f {} ';'
%check
./tests
%post -n %{name}-%{soname}
/sbin/ldconfig
%postun -n %{name}-%{soname}
/sbin/ldconfig
%files -n %{name}-%{soname}
%defattr(-,root,root,-)
%{_libdir}/*.so.*
%files devel
%defattr(-,root,root,-)
%{_includedir}/*.h
%{_libdir}/pkgconfig/*
%{_libdir}/*.so
%license COPYING
%doc README.md TODO
%changelog