[packages/ruby-mixlib-log] build with rubygems provides
glen
glen at pld-linux.org
Mon Jun 24 12:42:53 CEST 2013
commit 7536636cb0bb5e43af87d899914e1fe5ea58cfe7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Mon Jun 24 13:42:51 2013 +0300
build with rubygems provides
ruby-mixlib-log.spec | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/ruby-mixlib-log.spec b/ruby-mixlib-log.spec
index 6545377..ec1216d 100644
--- a/ruby-mixlib-log.spec
+++ b/ruby-mixlib-log.spec
@@ -1,15 +1,19 @@
+#
+# Conditional build:
+%bcond_without tests # build without tests
+
%define pkgname mixlib-log
Summary: Ruby mix-in for log functionality
Name: ruby-%{pkgname}
Version: 1.4.1
-Release: 1
+Release: 2
License: Apache v2.0
Group: Development/Languages
-URL: http://github.com/opscode/mixlib-log
Source0: http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
# Source0-md5: a5d3427b8ccfa3654954a90ee06a4776
+URL: http://github.com/opscode/mixlib-log
BuildRequires: rpm-rubyprov
-BuildRequires: rpmbuild(macros) >= 1.656
+BuildRequires: rpmbuild(macros) >= 1.665
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -27,6 +31,9 @@ This package contains documentation for %{name}.
%prep
%setup -q
+%build
+%__gem_helper spec
+
%if %{with tests}
# need RSpec2
rspec
@@ -34,8 +41,9 @@ rspec
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
%clean
rm -rf $RPM_BUILD_ROOT
@@ -45,6 +53,7 @@ rm -rf $RPM_BUILD_ROOT
%doc README.rdoc NOTICE
%{ruby_vendorlibdir}/mixlib/log.rb
%{ruby_vendorlibdir}/mixlib/log
+%{ruby_specdir}/%{pkgname}-%{version}.gemspec
# FIXME, who owns the dir?
%dir %{ruby_vendorlibdir}/mixlib
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/ruby-mixlib-log.git/commitdiff/7536636cb0bb5e43af87d899914e1fe5ea58cfe7
More information about the pld-cvs-commit
mailing list