]> git.pld-linux.org Git - SPECS.git/blob - libsecp256k1.spec
SPECS updated Sun 1 Aug 11:02:02 CEST 2021
[SPECS.git] / libsecp256k1.spec
1 # TODO:
2 # - configure: Using jni: no (JNI requires --enable-module-ecdh, which is experimental)
3
4 # Conditional build:
5 %bcond_without  static_libs     # static library
6 %bcond_without  tests           # unit tests
7 #
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
10 Name:           libsecp256k1
11 Version:        0.1.0.16
12 %define gitref  5a373e416025ae6465b00aea18dd6d69111e54ca
13 %define snap    20191026
14 %define rel     1
15 Release:        0.%{snap}.%{rel}
16 License:        MIT
17 Group:          Libraries
18 #Source0Download: https://github.com/libbitcoin/secp256k1/releases
19 # 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)
31
32 %description
33 Optimized C library for EC operations on curve secp256k1.
34
35 %description -l pl.UTF-8
36 Zoptymalizowana biblioteka C do operacji EC na krzywej secp256k1.
37
38 %package devel
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}
43 Requires:       gmp-devel
44
45 %description devel
46 Header files for secp256k1 library.
47
48 %description devel -l pl.UTF-8
49 Pliki nagłówkowe biblioteki secp256k1.
50
51 %package static
52 Summary:        Static secp256k1 library
53 Summary(pl.UTF-8):      Statyczna biblioteka secp256k1
54 Group:          Development/Libraries
55 Requires:       %{name}-devel = %{version}-%{release}
56
57 %description static
58 Static secp256k1 library.
59
60 %description static -l pl.UTF-8
61 Statyczna biblioteka secp256k1.
62
63 %prep
64 %setup -q -n secp256k1-%{gitref}
65
66 %build
67 %{__libtoolize}
68 %{__aclocal} -I build-aux/m4
69 %{__autoconf}
70 %{__autoheader}
71 %{__automake}
72 # NOTE: --enable-module-recovery to avoid: https://github.com/libbitcoin/libbitcoin/issues/397
73 %configure \
74         --disable-silent-rules \
75         %{!?with_static_libs:--disable-static} \
76         --enable-module-recovery
77 %{__make}
78
79 %if %{with tests}
80 ./tests
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %{__make} install \
87         DESTDIR=$RPM_BUILD_ROOT
88
89 # obsoleted by pkg-config
90 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libsecp256k1.la
91
92 %clean
93 rm -rf $RPM_BUILD_ROOT
94
95 %post   -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
97
98 %files
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
103
104 %files devel
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
111
112 %if %{with static_libs}
113 %files static
114 %defattr(644,root,root,755)
115 %{_libdir}/libsecp256k1.a
116 %endif
This page took 0.412462 seconds and 3 git commands to generate.