2 # - configure: Using jni: no (JNI requires --enable-module-ecdh, which is experimental)
5 %bcond_without static_libs # static library
6 %bcond_without tests # unit tests
8 Summary: Optimized C library for EC operations on curve secp256k1
9 Summary(pl.UTF-8): Zoptymalizowana biblioteka C do operacji EC na krzywej secp256k1
12 %define gitref 5a373e416025ae6465b00aea18dd6d69111e54ca
15 Release: 0.%{snap}.%{rel}
18 #Source0Download: https://github.com/libbitcoin/secp256k1/releases
20 #Source0: https://github.com/libbitcoin/secp256k1/archive/v%{version}/secp256k1-%{version}.tar.gz
21 # no tag for 0.1.0.16, use snapshot
22 Source0: https://github.com/libbitcoin/secp256k1/archive/%{gitref}/secp256k1-%{snap}.tar.gz
23 # Source0-md5: 692fb5624b5c49bd1648d9cc04d798b9
24 URL: https://libbitcoin.org/
25 BuildRequires: autoconf >= 2.60
26 BuildRequires: automake
27 BuildRequires: gmp-devel
28 BuildRequires: libtool >= 2:2
29 BuildRequires: pkgconfig
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Optimized C library for EC operations on curve secp256k1.
35 %description -l pl.UTF-8
36 Zoptymalizowana biblioteka C do operacji EC na krzywej secp256k1.
39 Summary: Header files for secp256k1 library
40 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki secp256k1
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
46 Header files for secp256k1 library.
48 %description devel -l pl.UTF-8
49 Pliki nagłówkowe biblioteki secp256k1.
52 Summary: Static secp256k1 library
53 Summary(pl.UTF-8): Statyczna biblioteka secp256k1
54 Group: Development/Libraries
55 Requires: %{name}-devel = %{version}-%{release}
58 Static secp256k1 library.
60 %description static -l pl.UTF-8
61 Statyczna biblioteka secp256k1.
64 %setup -q -n secp256k1-%{gitref}
68 %{__aclocal} -I build-aux/m4
72 # NOTE: --enable-module-recovery to avoid: https://github.com/libbitcoin/libbitcoin/issues/397
74 --disable-silent-rules \
75 %{!?with_static_libs:--disable-static} \
76 --enable-module-recovery
84 rm -rf $RPM_BUILD_ROOT
87 DESTDIR=$RPM_BUILD_ROOT
89 # obsoleted by pkg-config
90 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsecp256k1.la
93 rm -rf $RPM_BUILD_ROOT
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
99 %defattr(644,root,root,755)
100 %doc COPYING README.md TODO
101 %attr(755,root,root) %{_libdir}/libsecp256k1.so.*.*.*
102 %attr(755,root,root) %ghost %{_libdir}/libsecp256k1.so.0
105 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_libdir}/libsecp256k1.so
107 %{_includedir}/secp256k1.h
108 %{_includedir}/secp256k1_preallocated.h
109 %{_includedir}/secp256k1_recovery.h
110 %{_pkgconfigdir}/libsecp256k1.pc
112 %if %{with static_libs}
114 %defattr(644,root,root,755)
115 %{_libdir}/libsecp256k1.a