|
|
|
@ -15,9 +15,19 @@
|
|
|
|
|
# For pre-releases
|
|
|
|
|
%undefine prerel
|
|
|
|
|
|
|
|
|
|
# Priorities for the alternatives system
|
|
|
|
|
%if 0%{?fedora} > 25
|
|
|
|
|
%global waf_py3_priority 30
|
|
|
|
|
%global waf_py2_priority 20
|
|
|
|
|
%else
|
|
|
|
|
# don't change standard binary for released Fedora versions
|
|
|
|
|
%global waf_py2_priority 20
|
|
|
|
|
%global waf_py3_priority 10
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: waf
|
|
|
|
|
Version: 1.9.7
|
|
|
|
|
Release: %{?prerel:0.}1%{?prerel:.%prerel}%{?dist}.2
|
|
|
|
|
Version: 1.9.9
|
|
|
|
|
Release: %{?prerel:0.}1%{?prerel:.%prerel}%{?dist}
|
|
|
|
|
Summary: A Python-based build system
|
|
|
|
|
Group: Development/Tools
|
|
|
|
|
# The entire source code is BSD apart from pproc.py (taken from Python 2.5)
|
|
|
|
@ -55,6 +65,9 @@ BuildRequires: ImageMagick
|
|
|
|
|
Requires: python(abi) = %{python2_version}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
# alternatives
|
|
|
|
|
Requires(posttrans): %{_sbindir}/alternatives
|
|
|
|
|
Requires(preun): %{_sbindir}/alternatives
|
|
|
|
|
|
|
|
|
|
# the demo suite contains a perl module, which draws in unwanted
|
|
|
|
|
# provides and requires
|
|
|
|
@ -124,7 +137,7 @@ for f in waflib/extras/*.py ; do
|
|
|
|
|
extras="${extras:+$extras,}$f" ;
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
./waf-light --make-waf --strip --tools="$extras"
|
|
|
|
|
%{__python2} ./waf-light --make-waf --strip --tools="$extras"
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_docs}
|
|
|
|
|
# build html docs
|
|
|
|
@ -163,7 +176,9 @@ ln -s waf-%{python2_version} %{buildroot}%{_bindir}/waf-2
|
|
|
|
|
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
|
|
|
|
|
ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf-3
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
ln -s waf-%{python2_version} %{buildroot}%{_bindir}/waf
|
|
|
|
|
|
|
|
|
|
# alternatives-controlled
|
|
|
|
|
touch %{buildroot}%{_bindir}/waf
|
|
|
|
|
|
|
|
|
|
# remove shebangs from and fix EOL for all scripts in wafadmin
|
|
|
|
|
find %{buildroot}%{_datadir}/ -name '*.py' \
|
|
|
|
@ -198,17 +213,38 @@ rm -f docs/sphinx/build/html/.buildinfo
|
|
|
|
|
%endif # with_python3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/waf \
|
|
|
|
|
waf %{_bindir}/waf-2 %{waf_py2_priority} || :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
%{_sbindir}/alternatives --remove \
|
|
|
|
|
waf %{_bindir}/waf-2 || :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.md ChangeLog demos_py2/demos
|
|
|
|
|
%{_bindir}/waf
|
|
|
|
|
%ghost %{_bindir}/waf
|
|
|
|
|
%{_bindir}/waf-%{python2_version}
|
|
|
|
|
%{_bindir}/waf-2
|
|
|
|
|
%{_datadir}/waf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%posttrans -n %{name}-python3
|
|
|
|
|
%{_sbindir}/alternatives --install %{_bindir}/waf \
|
|
|
|
|
waf %{_bindir}/waf-3 %{waf_py3_priority} || :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%preun -n %{name}-python3
|
|
|
|
|
%{_sbindir}/alternatives --remove \
|
|
|
|
|
waf %{_bindir}/waf-3 || :
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n %{name}-python3
|
|
|
|
|
%doc README.md ChangeLog demos_py3/demos
|
|
|
|
|
%ghost %{_bindir}/waf
|
|
|
|
|
%{_bindir}/waf-%{python3_version}
|
|
|
|
|
%{_bindir}/waf-3
|
|
|
|
|
%{_datadir}/waf3
|
|
|
|
@ -222,6 +258,10 @@ rm -f docs/sphinx/build/html/.buildinfo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Apr 5 2017 Thomas Moschny <thomas.moschny@gmx.de> - 1.9.9-1
|
|
|
|
|
- Update to 1.9.9.
|
|
|
|
|
- Use alternatives to manage %%{_bindir}/waf (rhbz#1404699).
|
|
|
|
|
|
|
|
|
|
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9.7-1.2
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|