diff --git a/gimp.spec b/gimp.spec index 98f7ea6..242a684 100644 --- a/gimp.spec +++ b/gimp.spec @@ -86,10 +86,10 @@ Release: %{?prerelprefix}4%{dotprerel}%{dotgitrev}%{?dist} # Compute some version related macros. # Ugly, need to get quoting percent signs straight. -%global major %(ver=%version; echo ${ver%%%%.*}) -%global minor %(ver=%version; ver=${ver#%major.}; echo ${ver%%%%.*}) -%global micro %(ver=%version; ver=${ver#%major.%minor.}; echo ${ver%%%%.*}) -%global binver %major.%minor +%global major %(ver=%{version}; echo ${ver%%%%.*}) +%global minor %(ver=%{version}; ver=${ver#%major.}; echo ${ver%%%%.*}) +%global micro %(ver=%{version}; ver=${ver#%major.%minor.}; echo ${ver%%%%.*}) +%global binver %{major}.%{minor} %global interface_age 0 %global gettext_version 20 %global lib_api_version 2.0 @@ -97,7 +97,7 @@ Release: %{?prerelprefix}4%{dotprerel}%{dotgitrev}%{?dist} %global lib_minor %(echo $[%minor * 100]) %global lib_micro %micro %else # unstable -%global lib_minor %(echo $[%minor * 100 + %micro]) +%global lib_minor %(echo $[%minor * 100 + %{micro}]) %global lib_micro 0 %endif # unstable @@ -315,8 +315,8 @@ EOF %global _hardened_build 1 %else # fake things -export CFLAGS='-fPIC %optflags' -export CXXFLAGS='-fPIC %optflags' +export CFLAGS='-fPIC %{optflags}' +export CXXFLAGS='-fPIC %{optflags}' export LDFLAGS='-pie' %endif %endif @@ -447,7 +447,7 @@ ln -snf gimprc-%{binver}.5 %{buildroot}/%{_mandir}/man5/gimprc.5 # Hardcode python interpreter in shipped python plug-ins. This actually has no # effect because gimp maps hashbangs with and without the /usr/bin/env detour # to the system python interpreter, but this will avoid false alarms. -grep -E -rl '^#!\s*%{_bindir}/env\s+python' --include=\*.py "%buildroot" | +grep -E -rl '^#!\s*%{_bindir}/env\s+python' --include=\*.py "%{buildroot}" | while read file; do sed -r '1s,^#!\s*%{_bindir}/env\s+python,#!%{__python},' -i "$file" done @@ -455,7 +455,7 @@ grep -E -rl '^#!\s*%{_bindir}/env\s+python' --include=\*.py "%buildroot" | %check # skip tests known to be problematic in a specific version -%if "%version" == "%{?skip_checks_version}" +%if "%{version}" == "%{?skip_checks_version}" pushd app/tests for problematic in %{?skip_checks}; do rm -f "$problematic"