[packages/prm] make s3 dep optional
glen
glen at pld-linux.org
Wed Sep 2 12:02:52 CEST 2015
commit c41c9fa61b35685ee4d5707c547fc1698d0ff0b4
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Wed Sep 2 13:02:27 2015 +0300
make s3 dep optional
optional-s3.patch | 19 +++++++++++++++++++
prm.spec | 6 +++++-
2 files changed, 24 insertions(+), 1 deletion(-)
---
diff --git a/prm.spec b/prm.spec
index ef24465..41d196f 100644
--- a/prm.spec
+++ b/prm.spec
@@ -6,14 +6,15 @@ License: MIT
Group: Development/Languages
Source0: http://rubygems.org/downloads/%{name}-%{version}.gem
# Source0-md5: 7d01b989cb87510addc64686d5deb5f9
+Patch0: optional-s3.patch
URL: https://github.com/dnbert/prm
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.656
BuildRequires: sed >= 4.0
Requires: ruby-arr-pm
-Requires: ruby-aws-s3
Requires: ruby-clamp
Requires: ruby-peach
+Suggests: ruby-aws-s3
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -26,10 +27,13 @@ object storage systems.
%prep
%setup -q
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
+%patch0 -p1
%build
# write .gemspec
%__gem_helper spec
+# make aws/s3 optional
+%{__sed} -i -e '/aws-s3/d' *.gemspec
%install
rm -rf $RPM_BUILD_ROOT
diff --git a/optional-s3.patch b/optional-s3.patch
new file mode 100644
index 0000000..22f2c11
--- /dev/null
+++ b/optional-s3.patch
@@ -0,0 +1,19 @@
+--- prm-0.2.13/lib/prm/repo.rb~ 2015-09-02 12:52:57.000000000 +0300
++++ prm-0.2.13/lib/prm/repo.rb 2015-09-02 13:00:21.784027931 +0300
+@@ -7,7 +7,6 @@
+ require 'find'
+ require 'thread'
+ require 'peach'
+-require 'aws/s3'
+ require 'arr-pm'
+ require File.join(File.dirname(__FILE__), 'rpm.rb')
+
+@@ -289,6 +288,8 @@
+
+ module DHO
+ def sync_to_dho(path, accesskey, secretkey,pcomponent,prelease,object_store)
++ require 'aws/s3'
++
+ component = pcomponent.join
+ release = prelease.join
+ puts object_store.inspect
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/prm.git/commitdiff/c41c9fa61b35685ee4d5707c547fc1698d0ff0b4
More information about the pld-cvs-commit
mailing list