Dne 10.11.2015 v 17:31 Vít Ondruch napsal(a): > Dne 10.11.2015 v 15:52 Vít Ondruch napsal(a): >> Hi guys, >> >> For a long time, I thought that it would be interesting to have .gem >> expansion support in %setup macro. This would simply our .spec files a >> bit. Finally, I gave a go to this idea and proposed this to RPM upstream >> [1]. Please let me know (preferably via the PR) if you can foresee any >> issues with this approach. >> >> Thanks. >> >> >> Vít >> >> >> >> [1] https://github.com/rpm-software-management/rpm/pull/27 > Just as an example, this would be the .spec file difference for > rubygem-sqlite3: > > > > $ git diff > diff --git a/rubygem-sqlite3.spec b/rubygem-sqlite3.spec > index 5f98c93..a2df0cd 100644 > --- a/rubygem-sqlite3.spec > +++ b/rubygem-sqlite3.spec > @@ -34,15 +34,12 @@ BuildArch: noarch > Documentation for %{name} > > %prep > -gem unpack %{SOURCE0} > -%setup -q -D -T -n %{gem_name}-%{version} > +%setup -q -n %{gem_name}-%{version} > > %patch0 -p1 > > -gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec > - > %build > -gem build %{gem_name}.gemspec > +gem build ../%{gem_name}-%{version}.gemspec > %gem_install > > %install > >
And I forgot to add that one of advantages I see is that in contrast to current guidelines, the .gemspec is created on the same level as the unpacked directory and this avoids overwriting of .gemspec in case it is shipped in the original package. Vít _______________________________________________ ruby-sig mailing list [email protected] https://admin.fedoraproject.org/mailman/listinfo/ruby-sig
