[packages/prm] install templates

glen glen at pld-linux.org
Wed Sep 2 12:08:49 CEST 2015


commit 3c7c2e0c968d88309cad620342fd748c7bb0a68f
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Wed Sep 2 13:08:40 2015 +0300

    install templates

 prm.spec        |  3 +++
 templates.patch | 22 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)
---
diff --git a/prm.spec b/prm.spec
index 56e0a92..ac05e20 100644
--- a/prm.spec
+++ b/prm.spec
@@ -9,6 +9,7 @@ Group:		Development/Languages
 Source0:	http://rubygems.org/downloads/%{name}-%{version}.gem
 # Source0-md5:	7d01b989cb87510addc64686d5deb5f9
 Patch0:		optional-s3.patch
+Patch1:		templates.patch
 URL:		https://github.com/dnbert/prm
 BuildRequires:	rpm-rubyprov
 BuildRequires:	rpmbuild(macros) >= 1.656
@@ -30,6 +31,7 @@ object storage systems.
 %setup -q
 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 %patch0 -p1
+%patch1 -p1
 
 %build
 # write .gemspec
@@ -42,6 +44,7 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
+cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/%{name}
 cp -p %{name}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
 
 %clean
diff --git a/templates.patch b/templates.patch
new file mode 100644
index 0000000..bb0fe70
--- /dev/null
+++ b/templates.patch
@@ -0,0 +1,22 @@
+--- prm-0.2.13/lib/prm/repo.rb~	2015-09-02 13:05:28.000000000 +0300
++++ prm-0.2.13/lib/prm/repo.rb	2015-09-02 13:06:32.782306675 +0300
+@@ -179,7 +179,7 @@
+         end
+ 
+ 
+-        template_dir = File.join(File.dirname(__FILE__), "..", "..", "templates")
++        template_dir = File.join(File.dirname(__FILE__), "templates")
+         erb = ERB.new(File.read("#{template_dir}/deb_release.erb"), nil, "-").result(binding)
+ 
+         release_file = File.new("#{path}/dists/#{release}/Release.tmp","wb")
+--- prm-0.2.13/lib/prm/rpm.rb~	2015-09-02 13:05:28.000000000 +0300
++++ prm-0.2.13/lib/prm/rpm.rb	2015-09-02 13:06:42.996143235 +0300
+@@ -55,7 +55,7 @@
+                     filelists
+                 }
+ 
+-                template_dir = File.join(File.dirname(__FILE__), "..", "..", "templates")
++                template_dir = File.join(File.dirname(__FILE__), "templates")
+ 
+                 erb_files.each { |f|
+                     erb = ERB.new(File.read("#{template_dir}/#{f}.xml.erb"), nil, "-").result(binding)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/prm.git/commitdiff/3c7c2e0c968d88309cad620342fd748c7bb0a68f



More information about the pld-cvs-commit mailing list