]>
Commit | Line | Data |
---|---|---|
1874c0fa | 1 | # TODO: |
791992ba | 2 | # - configure: Using jni: no (JNI requires --enable-module-ecdh, which is experimental) |
1874c0fa MK |
3 | |
4 | # Conditional build: | |
791992ba JB |
5 | %bcond_without static_libs # static library |
6 | %bcond_without tests # unit tests | |
1874c0fa | 7 | # |
791992ba JB |
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 | |
1874c0fa | 10 | Name: libsecp256k1 |
c9f8f0a8 JB |
11 | Version: 0.1.0.20 |
12 | Release: 1 | |
791992ba | 13 | License: MIT |
1874c0fa | 14 | Group: Libraries |
791992ba | 15 | #Source0Download: https://github.com/libbitcoin/secp256k1/releases |
c9f8f0a8 JB |
16 | Source0: https://github.com/libbitcoin/secp256k1/archive/v%{version}/secp256k1-%{version}.tar.gz |
17 | # Source0-md5: 6f1a2419e6a76f8103b9d858b8213049 | |
791992ba JB |
18 | URL: https://libbitcoin.org/ |
19 | BuildRequires: autoconf >= 2.60 | |
1874c0fa | 20 | BuildRequires: automake |
791992ba JB |
21 | BuildRequires: gmp-devel |
22 | BuildRequires: libtool >= 2:2 | |
23 | BuildRequires: pkgconfig | |
1874c0fa MK |
24 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
25 | ||
1874c0fa | 26 | %description |
791992ba | 27 | Optimized C library for EC operations on curve secp256k1. |
1874c0fa | 28 | |
791992ba JB |
29 | %description -l pl.UTF-8 |
30 | Zoptymalizowana biblioteka C do operacji EC na krzywej secp256k1. | |
1874c0fa MK |
31 | |
32 | %package devel | |
791992ba JB |
33 | Summary: Header files for secp256k1 library |
34 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki secp256k1 | |
1874c0fa MK |
35 | Group: Development/Libraries |
36 | Requires: %{name} = %{version}-%{release} | |
791992ba | 37 | Requires: gmp-devel |
1874c0fa MK |
38 | |
39 | %description devel | |
791992ba | 40 | Header files for secp256k1 library. |
1874c0fa MK |
41 | |
42 | %description devel -l pl.UTF-8 | |
791992ba | 43 | Pliki nagłówkowe biblioteki secp256k1. |
1874c0fa MK |
44 | |
45 | %package static | |
791992ba JB |
46 | Summary: Static secp256k1 library |
47 | Summary(pl.UTF-8): Statyczna biblioteka secp256k1 | |
1874c0fa MK |
48 | Group: Development/Libraries |
49 | Requires: %{name}-devel = %{version}-%{release} | |
50 | ||
51 | %description static | |
791992ba | 52 | Static secp256k1 library. |
1874c0fa MK |
53 | |
54 | %description static -l pl.UTF-8 | |
791992ba | 55 | Statyczna biblioteka secp256k1. |
1874c0fa MK |
56 | |
57 | %prep | |
c9f8f0a8 | 58 | %setup -q -n secp256k1-%{version} |
1874c0fa MK |
59 | |
60 | %build | |
791992ba JB |
61 | %{__libtoolize} |
62 | %{__aclocal} -I build-aux/m4 | |
63 | %{__autoconf} | |
64 | %{__autoheader} | |
65 | %{__automake} | |
66 | # NOTE: --enable-module-recovery to avoid: https://github.com/libbitcoin/libbitcoin/issues/397 | |
1874c0fa | 67 | %configure \ |
791992ba | 68 | --disable-silent-rules \ |
4fde7103 MK |
69 | %{!?with_static_libs:--disable-static} \ |
70 | --enable-module-recovery | |
1874c0fa | 71 | %{__make} |
791992ba JB |
72 | |
73 | %if %{with tests} | |
1874c0fa | 74 | ./tests |
791992ba | 75 | %endif |
1874c0fa MK |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
1874c0fa MK |
79 | |
80 | %{__make} install \ | |
81 | DESTDIR=$RPM_BUILD_ROOT | |
82 | ||
791992ba JB |
83 | # obsoleted by pkg-config |
84 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsecp256k1.la | |
1874c0fa MK |
85 | |
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %post -p /sbin/ldconfig | |
90 | %postun -p /sbin/ldconfig | |
91 | ||
92 | %files | |
93 | %defattr(644,root,root,755) | |
c9f8f0a8 | 94 | %doc COPYING README.md SECURITY.md |
791992ba JB |
95 | %attr(755,root,root) %{_libdir}/libsecp256k1.so.*.*.* |
96 | %attr(755,root,root) %ghost %{_libdir}/libsecp256k1.so.0 | |
1874c0fa MK |
97 | |
98 | %files devel | |
99 | %defattr(644,root,root,755) | |
791992ba | 100 | %attr(755,root,root) %{_libdir}/libsecp256k1.so |
1874c0fa | 101 | %{_includedir}/secp256k1.h |
eb0b7d09 | 102 | %{_includedir}/secp256k1_preallocated.h |
4fde7103 | 103 | %{_includedir}/secp256k1_recovery.h |
791992ba | 104 | %{_pkgconfigdir}/libsecp256k1.pc |
1874c0fa MK |
105 | |
106 | %if %{with static_libs} | |
107 | %files static | |
108 | %defattr(644,root,root,755) | |
791992ba | 109 | %{_libdir}/libsecp256k1.a |
1874c0fa | 110 | %endif |