]> git.pld-linux.org Git - packages/ruby-rbnacl.git/blob - ruby-rbnacl.spec
libsodium dep
[packages/ruby-rbnacl.git] / ruby-rbnacl.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4
5 %define pkgname rbnacl
6 %define min_libsodium 0.4.3
7 Summary:        Ruby binding to the Networking and Cryptography (NaCl) library
8 Name:           ruby-%{pkgname}
9 Version:        3.3.0
10 Release:        1
11 License:        MIT
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
18 %if %{with tests}
19 BuildRequires:  ruby-rake
20 BuildRequires:  ruby-rspec < 3.1
21 BuildRequires:  ruby-rspec >= 3.0.0
22 BuildRequires:  ruby-rubocop
23 %endif
24 Requires:       libsodium >= %{min_libsodium}
25 Requires:       ruby-ffi
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 The Networking and Cryptography (NaCl) library provides a high-level
31 toolkit for building cryptographic systems and protocols
32
33 %prep
34 %setup -q -n %{pkgname}-%{version}
35
36 %build
37 v=$(awk -F'"' '/MINIMUM_LIBSODIUM_VERSION =/{print $2}' lib/rbnacl/sodium/version.rb)
38 test "$v" = %{min_libsodium}
39
40 # write .gemspec
41 %__gem_helper spec
42
43 %install
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}
48
49 %clean
50 rm -rf $RPM_BUILD_ROOT
51
52 %files
53 %defattr(644,root,root,755)
54 %{ruby_vendorlibdir}/%{pkgname}.rb
55 %{ruby_vendorlibdir}/%{pkgname}
56 %{ruby_specdir}/%{pkgname}-%{version}.gemspec
This page took 0.059584 seconds and 3 git commands to generate.