[packages/gem2rpm] pld template: build and package gemspec

glen glen at pld-linux.org
Mon Dec 15 19:44:10 CET 2014


commit ce19db2ce38294ae72a5af1c0e955218a71cffbd
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Mon Dec 15 20:44:05 2014 +0200

    pld template: build and package gemspec

 pld.spec.erb | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/pld.spec.erb b/pld.spec.erb
index 892b41c..9621285 100644
--- a/pld.spec.erb
+++ b/pld.spec.erb
@@ -53,17 +53,22 @@ BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 <% end -%>
 
+%build
+# write .gemspec
+%__gem_helper spec
+
 %install
 rm -rf $RPM_BUILD_ROOT
 <% if spec.executables.empty? -%>
-install -d $RPM_BUILD_ROOT%{ruby_vendorlibdir}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir}}
 <% else -%>
-install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{_bindir}}
+install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}}
 <% end -%>
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 <% if ! spec.executables.empty? -%>
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
 <% end -%>
+cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -75,3 +80,4 @@ rm -rf $RPM_BUILD_ROOT
 <% end -%>
 %{ruby_vendorlibdir}/%{pkgname}.rb
 %{ruby_vendorlibdir}/%{pkgname}
+%{ruby_specdir}/%{pkgname}-%{version}.gemspec
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gem2rpm.git/commitdiff/ce19db2ce38294ae72a5af1c0e955218a71cffbd



More information about the pld-cvs-commit mailing list