libff/libff.spec

79 lines
1.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package libff
#
# 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 https://bugs.opensuse.org/
#
Name: libff
Version: 1.0.0
Release: 0
Summary: C++ library for Finite Fields and Elliptic Curves
License: MIT
Group: System/Libraries
URL: https://github.com/scipr-lab/libff
Source0: %{name}-%{version}.tar.xz
Source99: prepare_source.sh
Patch0: 00_no_bn128.patch
Patch1: 01_shared_lib.patch
Patch2: 02_config_hpp.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: gmp-devel
BuildRequires: libopenssl-1_1-devel
%description
libff is a C++ library for finite fields and elliptic curves.
%package devel
Summary: Development files for libff
Group: Development/Libraries/C and C++
Requires: libff = %{version}
%description devel
The %{name}-devel package contains libraries and header files for developing applications that use libff.
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
%cmake \
-DWITH_PROCPS=OFF
%if %suse_version > 1500
%cmake_build
%else
%make_jobs
%endif
%check
cd build
make %{?_smp_mflags} check
%install
%cmake_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_libdir}/libff.so
%files devel
%{_includedir}/libff/
%changelog