pld template: build and package gemspec auto/th/gem2rpm-0.10.1-1
authorElan Ruusamäe <glen@delfi.ee>
Mon, 15 Dec 2014 18:44:05 +0000 (20:44 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 15 Dec 2014 18:44:05 +0000 (20:44 +0200)
pld.spec.erb

index 892b41c..9621285 100644 (file)
@@ -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
This page took 0.219727 seconds and 4 git commands to generate.