[packages/ruby-hmac] build noarch, use vendor dir

glen glen at pld-linux.org
Sun May 5 16:41:17 CEST 2013


commit 0785937f3ac5152744ba1e6f2a5bdb3617496cff
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sun May 5 17:41:03 2013 +0300

    build noarch, use vendor dir

 ruby-hmac.spec | 53 ++++++++++++++++++++++-------------------------------
 1 file changed, 22 insertions(+), 31 deletions(-)
---
diff --git a/ruby-hmac.spec b/ruby-hmac.spec
index 5e84dee..7c75815 100644
--- a/ruby-hmac.spec
+++ b/ruby-hmac.spec
@@ -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
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ruby-hmac.git/commitdiff/0785937f3ac5152744ba1e6f2a5bdb3617496cff



More information about the pld-cvs-commit mailing list