Use load macro introduced in RPM 4.12.
This commit is contained in:
parent
b9d9d0c37a
commit
8e2921fd5a
30
load.inc
30
load.inc
@ -1,30 +0,0 @@
|
|||||||
%{lua:
|
|
||||||
|
|
||||||
function source_macros(file)
|
|
||||||
local macro = nil
|
|
||||||
|
|
||||||
for line in io.lines(file) do
|
|
||||||
if not macro and line:match("^%%") then
|
|
||||||
macro = line:match("^%%(.*)$")
|
|
||||||
line = nil
|
|
||||||
end
|
|
||||||
|
|
||||||
if macro then
|
|
||||||
if line and macro:match("^.-%s*\\%s*$") then
|
|
||||||
macro = macro .. '\n' .. line
|
|
||||||
end
|
|
||||||
|
|
||||||
if not macro:match("^.-%s*\\%s*$") then
|
|
||||||
rpm.define(macro)
|
|
||||||
macro = nil
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Include the constants defined in macros files. Could be dropped as soon as
|
|
||||||
# RPM supports the %%load macro (RPM 4.12+ probably).
|
|
||||||
# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html
|
|
||||||
%define load() %{lua:source_macros(rpm.expand("%1"))}
|
|
14
ruby.spec
14
ruby.spec
@ -86,13 +86,10 @@ Source8: rubygems.attr
|
|||||||
Source9: rubygems.req
|
Source9: rubygems.req
|
||||||
Source10: rubygems.prov
|
Source10: rubygems.prov
|
||||||
|
|
||||||
# %%load function should be supported in RPM 4.12+.
|
# The load directive is supported since RPM 4.12, i.e. F21+. The build process
|
||||||
# http://lists.rpm.org/pipermail/rpm-maint/2014-February/003659.html
|
# fails on older Fedoras.
|
||||||
Source100: load.inc
|
%{?load:%{SOURCE4}}
|
||||||
%include %{SOURCE100}
|
%{?load:%{SOURCE5}}
|
||||||
|
|
||||||
%{load %{SOURCE4}}
|
|
||||||
%{load %{SOURCE5}}
|
|
||||||
|
|
||||||
# http://bugs.ruby-lang.org/issues/7807
|
# http://bugs.ruby-lang.org/issues/7807
|
||||||
Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
|
Patch0: ruby-2.1.0-Prevent-duplicated-paths-when-empty-version-string-i.patch
|
||||||
@ -875,6 +872,9 @@ OPENSSL_ENABLE_MD5_VERIFY=1 make check TESTS="-v $DISABLE_TESTS"
|
|||||||
%{ruby_libdir}/tkextlib
|
%{ruby_libdir}/tkextlib
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 25 2014 Vít Ondruch <vondruch@redhat.com> - 2.1.2-24
|
||||||
|
- Use load macro introduced in RPM 4.12.
|
||||||
|
|
||||||
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
|
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user