Accepting request 870577 from home:jengelh:branches:network:cryptocurrencies

- Edit 01_shared_lib.patch and implement the SUSE shlib packaging
  policy.

cc @dimstar

OBS-URL: https://build.opensuse.org/request/show/870577
OBS-URL: https://build.opensuse.org/package/show/network:cryptocurrencies/libff?expand=0&rev=4
This commit is contained in:
Martin Pluskal 2021-02-09 17:12:58 +00:00 committed by Git OBS Bridge
parent cfabec10b5
commit 230e3bcbdd
3 changed files with 35 additions and 9 deletions

View File

@ -3,6 +3,10 @@ Date: 2019-02-12 20:48:31
Upstream: no
Subject: build as shared library
---
libff/CMakeLists.txt | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
Index: libff-1.0.0/libff/CMakeLists.txt
===================================================================
--- libff-1.0.0.orig/libff/CMakeLists.txt
@ -15,7 +19,15 @@ Index: libff-1.0.0/libff/CMakeLists.txt
algebra/curves/alt_bn128/alt_bn128_g1.cpp
algebra/curves/alt_bn128/alt_bn128_g2.cpp
@@ -48,7 +48,7 @@ install(
@@ -27,6 +27,7 @@ add_library(
common/profiling.cpp
common/utils.cpp
)
+set_target_properties(ff PROPERTIES OUTPUT_NAME ff-${PACKAGE_VERSION})
target_link_libraries(
ff
@@ -48,7 +49,7 @@ install(
)
install(
@ -24,7 +36,7 @@ Index: libff-1.0.0/libff/CMakeLists.txt
)
# Tests
@@ -102,6 +102,13 @@ if ("${IS_LIBFF_PARENT}")
@@ -102,6 +103,13 @@ if ("${IS_LIBFF_PARENT}")
NAME algebra_fields_test
COMMAND algebra_fields_test
)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Tue Feb 9 14:49:40 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
- Edit 01_shared_lib.patch and implement the SUSE shlib packaging
policy.
-------------------------------------------------------------------
Fri Feb 5 06:59:22 UTC 2021 - Martin Pluskal <mpluskal@suse.com>

View File

@ -16,12 +16,13 @@
#
%define lname libff-1_0_0
Name: libff
Version: 1.0.0
Release: 0
Summary: C++ library for Finite Fields and Elliptic Curves
License: MIT
Group: System/Libraries
Group: Development/Libraries/C and C++
URL: https://github.com/scipr-lab/libff
Source0: https://github.com/scipr-lab/libff/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0: 00_no_bn128.patch
@ -35,10 +36,17 @@ BuildRequires: libopenssl-1_1-devel
%description
libff is a C++ library for finite fields and elliptic curves.
%package -n %{lname}
Summary: C++ library for finite fields and elliptic curves
Group: System/Libraries
%description -n %{lname}
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}
Requires: %{lname} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for developing applications that use libff.
@ -53,7 +61,7 @@ rm libff/algebra/scalar_multiplication/multiexp_profile.cpp
%build
%cmake \
-DWITH_PROCPS=OFF
-DWITH_PROCPS=OFF -DPACKAGE_VERSION:STRING="%{version}"
%cmake_build
%check
@ -63,13 +71,13 @@ make %{?_smp_mflags} check
%install
%cmake_install
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%files
%files -n %{lname}
%doc README.md
%license LICENSE AUTHORS
%{_libdir}/libff.so
%{_libdir}/libff-%{version}.so
%files devel
%{_includedir}/libff/