2 # - configure: Using jni: no
5 %bcond_with apidocs # N/A
6 %bcond_without static_libs # don't build static libraries
8 Summary: Bitcoin Cross-Platform C++ Development Toolkit
13 License: AGPL with a lesser clause
15 Source0: https://github.com/libbitcoin/secp256k1/archive/v%{version}.tar.gz
16 # Source0-md5: bc3132ab3c57273ed826438306e7fccc
17 #Patch0: %{name}-what.patch
18 URL: https://libbitcoin.org
20 BuildRequires: autoconf
21 BuildRequires: automake
22 #BuildRequires: intltool
23 BuildRequires: libtool
24 BuildRequires: gmp-devel
26 #Requires(pre,post): -
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 # do not keep them in newly created specs
35 # these are only here to help fixing quickly broken specs
36 #%%define filterout_ld -Wl,--no-copy-dt-needed-entries
37 #%%define filterout_ld -Wl,--as-needed
38 # do not commit spec containing this (use for local testing only):
39 #%%define filterout_c -Werror=format-security
40 #%%define filterout_cxx -Werror=format-security
42 # Ignore file in __spec_install_post_check_so
43 BuildRequires: rpmbuild(macros) >= 1.583
44 %define skip_post_check_so libunresolved.so.*
46 # do not commit spec containing this (use for local testing only):
47 #%%define no_install_post_check_tmpfiles 1
50 Bitcoin Cross-Platform C++ Development Toolkit
52 #%description -l pl.UTF-8
55 Summary: Common files for %{name} library
56 Summary(pl.UTF-8): Wspólne pliki biblioteki %{name}
58 Requires: %{name} = %{version}-%{release}
61 Common files for %{name} library.
63 %description common -l pl.UTF-8
64 Wspólne pliki biblioteki %{name}.
67 Summary: Header files for %{name} library
68 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
69 Group: Development/Libraries
70 Requires: %{name} = %{version}-%{release}
73 Header files for %{name} library.
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe biblioteki %{name}.
79 Summary: Static %{name} library
80 Summary(pl.UTF-8): Statyczna biblioteka %{name}
81 Group: Development/Libraries
82 Requires: %{name}-devel = %{version}-%{release}
85 Static %{name} library.
87 %description static -l pl.UTF-8
88 Statyczna biblioteka %{name}.
91 Summary: %{name} API documentation
92 Summary(pl.UTF-8): Dokumentacja API biblioteki %{name}
96 API documentation for %{name} library.
98 %description apidocs -l pl.UTF-8
99 Dokumentacja API biblioteki %{name}.
102 %setup -q -n secp256k1-%{version}
106 # if ac/am/lt/* rebuilding is necessary, do it in this order and add
107 # appropriate BuildRequires
114 # NOTE: --enable-module-recovery to avoid: https://github.com/libbitcoin/libbitcoin/issues/397
116 %{!?with_static_libs:--disable-static} \
117 --enable-module-recovery
122 rm -rf $RPM_BUILD_ROOT
123 # create directories if necessary
124 #install -d $RPM_BUILD_ROOT
127 DESTDIR=$RPM_BUILD_ROOT
129 # if library provides pkgconfig file containing proper {Requires,Libs}.private
130 # then remove .la pollution
131 #%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
134 rm -rf $RPM_BUILD_ROOT
136 %post -p /sbin/ldconfig
137 %postun -p /sbin/ldconfig
140 %defattr(644,root,root,755)
142 %attr(755,root,root) %{_libdir}/%{name}.so.*.*.*
143 %attr(755,root,root) %ghost %{_libdir}/%{name}.so.0
146 # %defattr(644,root,root,755)
147 # %attr(755,root,root) %{_bindir}/%{name}*
148 # %{_datadir}/%{name}
151 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/%{name}.so
154 # if no pkgconfig support, or it misses .private deps, then include .la file
155 #%{_libdir}/libFOO.la
156 #%%{_includedir}/%{name}
157 %{_includedir}/secp256k1.h
158 %{_includedir}/secp256k1_recovery.h
159 #%%{_aclocaldir}/%{name}.m4
160 %{_pkgconfigdir}/%{name}.pc
162 %if %{with static_libs}
164 %defattr(644,root,root,755)
170 %defattr(644,root,root,755)