3 %bcond_with tests # build without tests
6 %define min_libsodium 0.4.3
7 Summary: Ruby binding to the Networking and Cryptography (NaCl) library
12 Group: Development/Languages
13 Source0: http://rubygems.org/downloads/%{pkgname}-%{version}.gem
14 # Source0-md5: 3dba0a3d90b99caafb743e0e83d6dedf
15 URL: https://github.com/cryptosphere/rbnacl
16 BuildRequires: rpm-rubyprov
17 BuildRequires: rpmbuild(macros) >= 1.656
19 BuildRequires: ruby-rake
20 BuildRequires: ruby-rspec < 3.1
21 BuildRequires: ruby-rspec >= 3.0.0
22 BuildRequires: ruby-rubocop
24 Requires: libsodium >= %{min_libsodium}
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The Networking and Cryptography (NaCl) library provides a high-level
31 toolkit for building cryptographic systems and protocols
34 %setup -q -n %{pkgname}-%{version}
37 v=$(awk -F'"' '/MINIMUM_LIBSODIUM_VERSION =/{print $2}' lib/rbnacl/sodium/version.rb)
38 test "$v" = %{min_libsodium}
44 rm -rf $RPM_BUILD_ROOT
45 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
46 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
47 cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
50 rm -rf $RPM_BUILD_ROOT
53 %defattr(644,root,root,755)
54 %{ruby_vendorlibdir}/%{pkgname}.rb
55 %{ruby_vendorlibdir}/%{pkgname}
56 %{ruby_specdir}/%{pkgname}-%{version}.gemspec