From 2db6882597fe7f923c6aff16ab8adc15ff898e0161b10dc09b3fb704442220fb Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 20 Jul 2021 13:06:18 +0000 Subject: [PATCH] Accepting request 906800 from home:alois:branches:devel:libraries:c_c++ New package (2nd attempt) OBS-URL: https://build.opensuse.org/request/show/906800 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tomsfastmath?expand=0&rev=1 --- .gitattributes | 23 +++++++++ .gitignore | 1 + baselibs.conf | 1 + tomsfastmath-0.13.1.tar.gz | 3 ++ tomsfastmath.changes | 4 ++ tomsfastmath.spec | 98 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 130 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 baselibs.conf create mode 100644 tomsfastmath-0.13.1.tar.gz create mode 100644 tomsfastmath.changes create mode 100644 tomsfastmath.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/baselibs.conf b/baselibs.conf new file mode 100644 index 0000000..e93a21c --- /dev/null +++ b/baselibs.conf @@ -0,0 +1 @@ +libtfm1 diff --git a/tomsfastmath-0.13.1.tar.gz b/tomsfastmath-0.13.1.tar.gz new file mode 100644 index 0000000..cde56d3 --- /dev/null +++ b/tomsfastmath-0.13.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:207e8624382e815f58bc5c3d4aad725d94588a6cc465d34634e6533dcaae2e0d +size 421999 diff --git a/tomsfastmath.changes b/tomsfastmath.changes new file mode 100644 index 0000000..662b84a --- /dev/null +++ b/tomsfastmath.changes @@ -0,0 +1,4 @@ +------------------------------------------------------------------- +Sat Jul 17 07:54:43 UTC 2021 - Luigi Baldoni + +- Initial package (v0.13.1) diff --git a/tomsfastmath.spec b/tomsfastmath.spec new file mode 100644 index 0000000..a964edb --- /dev/null +++ b/tomsfastmath.spec @@ -0,0 +1,98 @@ +# +# spec file for package tomsfastmath +# +# Copyright (c) 2021 SUSE LLC +# +# 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/ +# + +%define sover_major 1 +%define sover_minor 0 +%define sover_patch 0 +Name: tomsfastmath +Version: 0.13.1 +Release: 0 +Summary: Large integer arithmetic library +License: SUSE-Public-Domain OR WTFPL +URL: https://www.libtom.net/ +Source0: https://github.com/libtom/tomsfastmath/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +BuildRequires: libtool +BuildRequires: pkgconfig + +%description +TomsFastMath is a large integer arithmetic library written in ISO C. It +performs modular exponentiations and other related +functions required for ECC, DH and RSA cryptosystems. + +%package -n libtfm%{sover_major} +Summary: Large integer arithmetic library + +%description -n libtfm%{sover_major} +TomsFastMath is a large integer arithmetic library written in ISO C. It +performs modular exponentiations and other related +functions required for ECC, DH and RSA cryptosystems. + +%package devel +Summary: Development headers for libtfm%{sover_major} +Requires: libtfm%{sover_major} = %{version} + +%description devel +Contains development headers for libtfm%{sover_major} + +%prep +%autosetup + +%build +make -f makefile.shared CFLAGS="%{optflags} -fomit-frame-pointer -Isrc/headers" LDFLAGS="%{optflags}" %{?_smp_mflags} + +%check +make test %{?_smp_mflags} + +%install +mkdir -p %{buildroot}%{_libdir} +mkdir -p %{buildroot}%{_includedir} +install -p -m0755 .libs/libtfm.so.%{sover_major}.%{sover_minor}.%{sover_patch} %{buildroot}%{_libdir} +pushd %{buildroot}%{_libdir} +ln -s libtfm.so.%{sover_major}.%{sover_minor}.%{sover_patch} libtfm.so.%{sover_major} +ln -s libtfm.so.%{sover_major}.%{sover_minor}.%{sover_patch} libtfm.so +popd +install -p -m0644 -D src/headers/tfm.h %{buildroot}%{_includedir} + +# create support file for pkg-config +mkdir -p %{buildroot}/%{_libdir}/pkgconfig +tee %{buildroot}/%{_libdir}/pkgconfig/%{name}.pc << "EOF" +prefix=%{_prefix} +exec_prefix=${prefix} +libdir=${exec_prefix}/%{_lib} +includedir=${prefix}/include + +Name: %{name} +Description: Fast large integer arithmetic library +Version: %{version} +Libs: -ltfm +Cflags: -I${includedir} +EOF + +%post -n libtfm%{sover_major} -p /sbin/ldconfig +%postun -n libtfm%{sover_major} -p /sbin/ldconfig + +%files -n libtfm%{sover_major} +%doc doc/tfm.pdf +%license LICENSE +%{_libdir}/libtfm.so.%{sover_major}* + +%files devel +%{_includedir}/tfm.h +%{_libdir}/libtfm.so +%{_libdir}/pkgconfig/%{name}.pc + +%changelog