From 230e3bcbdd14c76d8ef61645ef33788d01787cbb900c054de9358f275981340c Mon Sep 17 00:00:00 2001 From: Martin Pluskal Date: Tue, 9 Feb 2021 17:12:58 +0000 Subject: [PATCH] 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 --- 01_shared_lib.patch | 16 ++++++++++++++-- libff.changes | 6 ++++++ libff.spec | 22 +++++++++++++++------- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/01_shared_lib.patch b/01_shared_lib.patch index b36ca43..55dcda4 100644 --- a/01_shared_lib.patch +++ b/01_shared_lib.patch @@ -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 ) diff --git a/libff.changes b/libff.changes index ca132b3..774690a 100644 --- a/libff.changes +++ b/libff.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 9 14:49:40 UTC 2021 - Jan Engelhardt + +- Edit 01_shared_lib.patch and implement the SUSE shlib packaging + policy. + ------------------------------------------------------------------- Fri Feb 5 06:59:22 UTC 2021 - Martin Pluskal diff --git a/libff.spec b/libff.spec index 9ad7a2d..b9af3ec 100644 --- a/libff.spec +++ b/libff.spec @@ -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/