Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,44 @@ | ||
|
||
%define gitrev a401a7d | ||
%define gitauthor topfunky | ||
%define gitname ruby-hmac | ||
|
||
%define gem_name ruby-hmac | ||
Summary: An implementation of the HMAC authentication code in Ruby | ||
Name: ruby-hmac | ||
Version: 0.4.0 | ||
Release: 1 | ||
License: MIT | ||
Group: Development/Tools | ||
Source0: http://download.github.com/%{gitauthor}-%{gitname}-v%{version}-0-g%{gitrev}.tar.gz | ||
Source0: http://download.github.com/topfunky-%{name}-v%{version}-0-ga401a7d.tar.gz | ||
# Source0-md5: 675592bc7db5fc4cb456a0c38135779b | ||
#Patch0: %{name}-nogems.patch | ||
URL: http://ruby-hmac.rubyforge.org/ | ||
BuildRequires: rpmbuild(macros) >= 1.277 | ||
BuildRequires: ruby | ||
BuildRequires: ruby-modules | ||
BuildRequires: setup.rb >= 3.4.1 | ||
%{?ruby_mod_ver_requires_eq} | ||
Requires: ruby-hmac | ||
#BuildArch: noarch | ||
BuildRequires: rpm-rubyprov | ||
BuildRequires: rpmbuild(macros) >= 1.656 | ||
BuildArch: noarch | ||
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | ||
|
||
%description | ||
An implementation of the HMAC authentication code in Ruby, originally | ||
from Daiki Ueno | ||
This module provides common interface to HMAC functionality. HMAC is a | ||
kind of "Message Authentication Code" (MAC) algorithm whose standard | ||
is documented in RFC2104. Namely, a MAC provides a way to check the | ||
integrity of information transmitted over or stored in an unreliable | ||
medium, based on a secret key. Originally written by Daiki Ueno. | ||
Converted to a RubyGem by Geoffrey Grosenbach | ||
|
||
%prep | ||
%setup -q -n %{gitauthor}-%{gitname}-%{gitrev} | ||
#%patch0 -p1 | ||
cp %{_datadir}/setup.rb . | ||
ruby setup.rb config \ | ||
--installdirs=std | ||
ruby setup.rb setup | ||
%setup -qc | ||
mv topfunky-ruby-hmac-*/* . | ||
|
||
%install | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
ruby setup.rb install \ | ||
--prefix=$RPM_BUILD_ROOT | ||
install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir} | ||
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} | ||
|
||
%clean | ||
rm -rf $RPM_BUILD_ROOT | ||
|
||
%files | ||
%defattr(644,root,root,755) | ||
%{ruby_rubylibdir}/hmac.rb | ||
%{ruby_rubylibdir}/hmac-md5.rb | ||
%{ruby_rubylibdir}/hmac-rmd160.rb | ||
%{ruby_rubylibdir}/hmac-sha1.rb | ||
%{ruby_rubylibdir}/hmac-sha2.rb | ||
%{ruby_rubylibdir}/ruby_hmac.rb | ||
%doc README.txt History.txt | ||
%{ruby_vendorlibdir}/hmac.rb | ||
%{ruby_vendorlibdir}/hmac-md5.rb | ||
%{ruby_vendorlibdir}/hmac-rmd160.rb | ||
%{ruby_vendorlibdir}/hmac-sha1.rb | ||
%{ruby_vendorlibdir}/hmac-sha2.rb | ||
%{ruby_vendorlibdir}/ruby_hmac.rb |