Update to 1.9.9.

Use alternatives to manage %{_bindir}/waf (rhbz#1404699).
epel8
Thomas Moschny 8 years ago
parent ef56948207
commit c20554ceb5

@ -1,6 +1,6 @@
#! /bin/bash #! /bin/bash
version=1.9.7 version=1.9.9
prerel= prerel=
src=waf-${version}${prerel}.tar.bz2 src=waf-${version}${prerel}.tar.bz2

@ -1 +1 @@
SHA512 (waf-1.9.7.stripped.tar.bz2) = b542f19a16825bfb8b09d92f79a557a4dd8a4d40fbd501eb74e46194949beb6184d3d368557cc491484770570a12d844dd49153620edd69e5fe5d0b30730ed59 SHA512 (waf-1.9.9.stripped.tar.bz2) = 6a8fd102483a5253b30256f9544bf6d57488b7baacd2c6ab694c1c573a9e93e2c9e52f7dc094985e5b6fb97065a3cd3541e034030358e2ae1f99ecd7f38447b8

@ -15,9 +15,19 @@
# For pre-releases # For pre-releases
%undefine prerel %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 Name: waf
Version: 1.9.7 Version: 1.9.9
Release: %{?prerel:0.}1%{?prerel:.%prerel}%{?dist}.2 Release: %{?prerel:0.}1%{?prerel:.%prerel}%{?dist}
Summary: A Python-based build system Summary: A Python-based build system
Group: Development/Tools Group: Development/Tools
# The entire source code is BSD apart from pproc.py (taken from Python 2.5) # 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} Requires: python(abi) = %{python2_version}
%endif %endif
# alternatives
Requires(posttrans): %{_sbindir}/alternatives
Requires(preun): %{_sbindir}/alternatives
# the demo suite contains a perl module, which draws in unwanted # the demo suite contains a perl module, which draws in unwanted
# provides and requires # provides and requires
@ -124,7 +137,7 @@ for f in waflib/extras/*.py ; do
extras="${extras:+$extras,}$f" ; extras="${extras:+$extras,}$f" ;
fi fi
done done
./waf-light --make-waf --strip --tools="$extras" %{__python2} ./waf-light --make-waf --strip --tools="$extras"
%if 0%{?with_docs} %if 0%{?with_docs}
# build html 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} install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf-3 ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf-3
%endif # with_python3 %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 # remove shebangs from and fix EOL for all scripts in wafadmin
find %{buildroot}%{_datadir}/ -name '*.py' \ find %{buildroot}%{_datadir}/ -name '*.py' \
@ -198,17 +213,38 @@ rm -f docs/sphinx/build/html/.buildinfo
%endif # with_python3 %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 %files
%doc README.md ChangeLog demos_py2/demos %doc README.md ChangeLog demos_py2/demos
%{_bindir}/waf %ghost %{_bindir}/waf
%{_bindir}/waf-%{python2_version} %{_bindir}/waf-%{python2_version}
%{_bindir}/waf-2 %{_bindir}/waf-2
%{_datadir}/waf %{_datadir}/waf
%if 0%{?with_python3} %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 %files -n %{name}-python3
%doc README.md ChangeLog demos_py3/demos %doc README.md ChangeLog demos_py3/demos
%ghost %{_bindir}/waf
%{_bindir}/waf-%{python3_version} %{_bindir}/waf-%{python3_version}
%{_bindir}/waf-3 %{_bindir}/waf-3
%{_datadir}/waf3 %{_datadir}/waf3
@ -222,6 +258,10 @@ rm -f docs/sphinx/build/html/.buildinfo
%changelog %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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

Loading…
Cancel
Save