Compare commits
2 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c44aba130e | ||
|
|
6faedc38ac |
7 changed files with 183 additions and 77 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#! /bin/bash
|
||||
|
||||
version=2.0.19
|
||||
version=2.0.20
|
||||
prerel=
|
||||
|
||||
src=waf-${version}${prerel}.tar.bz2
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (waf-2.0.19.stripped.tar.bz2) = 03fb06fb3d4002b583df2f55959154502ae1c14eb4ad0671bff5f48a5d3546f9c7f2d1e2cbd83448c9e9c1d2ecc30fb3c6d68479508f8b884193a96cc9bd2c9f
|
||||
SHA512 (waf-2.0.20.stripped.tar.bz2) = 21f61dc7ce6cd96d818caea28d9add9afbd60396e1fb72cf79ec94b451b11bae0275e99c180f084973688ee19f525d59cddf567f600d55403c88ecfd63c42ca7
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
diff -up waf-2.0.18/docs/sphinx/conf.py.orig waf-2.0.18/docs/sphinx/conf.py
|
||||
--- waf-2.0.18/docs/sphinx/conf.py.orig 2019-04-20 19:06:49.000000000 +0200
|
||||
+++ waf-2.0.18/docs/sphinx/conf.py 2019-10-05 17:58:58.380982949 +0200
|
||||
@@ -428,7 +428,7 @@ else:
|
||||
diff -up waf-1.6.9/docs/sphinx/conf.py.orig waf-1.6.9/docs/sphinx/conf.py
|
||||
--- waf-1.6.9/docs/sphinx/conf.py.orig 2011-11-20 15:51:43.000000000 +0100
|
||||
+++ waf-1.6.9/docs/sphinx/conf.py 2011-11-26 14:27:33.996165116 +0100
|
||||
@@ -415,7 +415,7 @@ html_theme = 'default'
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
13
waf-1.8.11-libdir.patch
Normal file
13
waf-1.8.11-libdir.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff -up waf-1.8.11/waf-light.orig waf-1.8.11/waf-light
|
||||
--- waf-1.8.11/waf-light.orig 2015-06-20 22:24:00.000000000 +0200
|
||||
+++ waf-1.8.11/waf-light 2015-06-22 20:23:07.171667528 +0200
|
||||
@@ -149,6 +149,9 @@ def find_lib():
|
||||
w = test(i + '/lib/' + dirname)
|
||||
if w: return w
|
||||
|
||||
+ w = test('/usr/share/%s' % WAF)
|
||||
+ if w: return w
|
||||
+
|
||||
#waf-local
|
||||
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
|
||||
w = test(dir)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
diff -up waf-2.0.18/docs/sphinx/wscript.orig waf-2.0.18/docs/sphinx/wscript
|
||||
--- waf-2.0.18/docs/sphinx/wscript.orig 2019-04-20 19:06:49.000000000 +0200
|
||||
+++ waf-2.0.18/docs/sphinx/wscript 2019-10-05 18:00:54.822911036 +0200
|
||||
diff -up waf-1.8.11/docs/sphinx/wscript.orig waf-1.8.11/docs/sphinx/wscript
|
||||
--- waf-1.8.11/docs/sphinx/wscript.orig 2015-06-11 18:11:04.000000000 +0200
|
||||
+++ waf-1.8.11/docs/sphinx/wscript 2015-06-22 18:36:02.078701412 +0200
|
||||
@@ -19,7 +19,6 @@ def configure(cfg):
|
||||
cfg.find_program('convert', var='CONVERT')
|
||||
cfg.load('daemon', tooldir=['../../playground/daemon/'])
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
diff -up waf-2.0.18/waf-light.orig waf-2.0.18/waf-light
|
||||
--- waf-2.0.18/waf-light.orig 2019-07-14 10:41:10.000000000 +0200
|
||||
+++ waf-2.0.18/waf-light 2019-10-05 17:55:42.254788427 +0200
|
||||
@@ -152,6 +152,9 @@ def find_lib():
|
||||
w = test(i + '/lib/' + dirname)
|
||||
if w: return w
|
||||
|
||||
+ w = test('/usr/share/%s' % WAF)
|
||||
+ if w: return w
|
||||
+
|
||||
#waf-local
|
||||
dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
|
||||
w = test(dir)
|
||||
216
waf.spec
216
waf.spec
|
|
@ -1,5 +1,22 @@
|
|||
%if 0%{?fedora}
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# Turn off the brp-python-bytecompile script
|
||||
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g')
|
||||
%endif # with_python3
|
||||
|
||||
# Enable building without html docs (e.g. in case no recent sphinx is
|
||||
# available)
|
||||
%global with_docs 1
|
||||
|
||||
# Priorities for the alternatives system
|
||||
%global waf_py3_priority 30
|
||||
%global waf_py2_priority 20
|
||||
|
||||
Name: waf
|
||||
Version: 2.0.19
|
||||
Version: 2.0.20
|
||||
Release: 1%{?dist}
|
||||
Summary: A Python-based build system
|
||||
# The entire source code is BSD apart from pproc.py (taken from Python 2.5)
|
||||
|
|
@ -7,67 +24,98 @@ License: BSD and Python
|
|||
URL: https://waf.io/
|
||||
# Original tarfile can be found at
|
||||
# https://waf.io/waf-%%{version}.tar.bz2 or
|
||||
# We remove waf logos, licensed CC BY-NC
|
||||
# We remove:
|
||||
# - docs/book, licensed CC BY-NC-ND
|
||||
# - Waf logos, licensed CC BY-NC
|
||||
Source: waf-%{version}.stripped.tar.bz2
|
||||
Source1: unpack_wafdir.py
|
||||
# also search for waflib in /usr/share/waf
|
||||
Patch0: waf-2.0.18-libdir.patch
|
||||
# do not try to use the (removed) waf logos
|
||||
Patch1: waf-2.0.18-logo.patch
|
||||
# do not add -W when running sphinx-build
|
||||
Patch2: waf-2.0.18-sphinx-no-W.patch
|
||||
|
||||
# Enable building without html docs (e.g. in case no recent sphinx is
|
||||
# available)
|
||||
%bcond_without docs
|
||||
Patch0: waf-1.8.11-libdir.patch
|
||||
Patch1: waf-1.6.9-logo.patch
|
||||
Patch2: waf-1.8.11-sphinx-no-W.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: python2-devel
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
%if %{with docs}
|
||||
%endif # with_python3
|
||||
%if 0%{?with_docs}
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 7
|
||||
BuildRequires: python3-sphinx
|
||||
%else
|
||||
BuildRequires: python-sphinx10
|
||||
%endif
|
||||
BuildRequires: graphviz
|
||||
BuildRequires: ImageMagick
|
||||
%endif # with docs
|
||||
|
||||
# waf-2.0.18-2 in F32 the first python3-only version (i.e. not having
|
||||
# a -python3 subpackage). Do not hardcode that as Obsoletes: though,
|
||||
# to be able to roll out e.g. a 2.0.19 for older Fedora branches, but
|
||||
# maintain upgradability
|
||||
Provides: %{name}-python3 = %{version}-%{release}
|
||||
Obsoletes: %{name}-python3 < %{version}-%{release}
|
||||
|
||||
%if "%{?python3_version}" != ""
|
||||
# Seems like automatic ABI dependency is not detected since the files
|
||||
# are going to a non-standard location
|
||||
Requires: python(abi) = %{python3_version}
|
||||
%endif # with_docs
|
||||
%if "%{?python2_version}" != ""
|
||||
# Seems like automatic ABI dependency is not detected since the files are
|
||||
# going to a non-standard location
|
||||
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
|
||||
%global __requires_exclude_from ^%{_docdir}/.*$
|
||||
%global __provides_exclude_from ^%{_docdir}/.*$
|
||||
%global __requires_exclude_from %{_docdir}
|
||||
%global __provides_exclude_from %{_docdir}
|
||||
# for EPEL, we need the old filters
|
||||
%global __perl_provides %{nil}
|
||||
%global __perl_requires %{nil}
|
||||
|
||||
%global _description %{expand:
|
||||
|
||||
%description
|
||||
Waf is a Python-based framework for configuring, compiling and
|
||||
installing applications. It is a replacement for other tools such as
|
||||
Autotools, Scons, CMake or Ant.}
|
||||
|
||||
%description %_description
|
||||
Autotools, Scons, CMake or Ant.
|
||||
|
||||
|
||||
%if %{with docs}
|
||||
%if 0%{?with_python3}
|
||||
%package -n %{name}-python3
|
||||
Summary: Python3 support for %{name}
|
||||
%if "%{?python3_version}" != ""
|
||||
Requires: python(abi) = %{python3_version}
|
||||
%endif
|
||||
|
||||
%description -n %{name}-python3
|
||||
Waf is a Python-based framework for configuring, compiling and
|
||||
installing applications. It is a replacement for other tools such as
|
||||
Autotools, Scons, CMake or Ant.
|
||||
|
||||
This package contains the Python 3 version of %{name}.
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%if 0%{?with_docs}
|
||||
%package -n %{name}-doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
# obsolete the previous docs subpackage - guideline specifies -doc
|
||||
# since: Fedora 18, RHEL 7 (mark the provides/obsoletes RHEL only after
|
||||
# we no longer need to provide upgrade paths from affected Fedora releases)
|
||||
Provides: %{name}-docs = %{version}-%{release}
|
||||
Obsoletes: %{name}-docs < 1.6.11-2
|
||||
|
||||
%description -n %{name}-doc %_description
|
||||
%description -n %{name}-doc
|
||||
Waf is a Python-based framework for configuring, compiling and
|
||||
installing applications. It is a replacement for other tools such as
|
||||
Autotools, Scons, CMake or Ant.
|
||||
|
||||
This package contains the HTML documentation for %{name}.
|
||||
%endif # with docs
|
||||
%endif # with_docs
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
%setup -q
|
||||
# also search for waflib in /usr/share/waf
|
||||
%patch0 -p1
|
||||
# do not try to use the (removed) waf logos
|
||||
%patch1 -p1
|
||||
# do not add -W when running sphinx-build
|
||||
%patch2 -p1
|
||||
|
||||
|
||||
%build
|
||||
|
|
@ -78,71 +126,128 @@ for f in waflib/extras/*.py ; do
|
|||
extras="${extras:+$extras,}$f" ;
|
||||
fi
|
||||
done
|
||||
%{__python3} ./waf-light --make-waf --strip --tools="$extras"
|
||||
%{__python2} ./waf-light --make-waf --strip --tools="$extras"
|
||||
|
||||
%if %{with docs}
|
||||
%if 0%{?with_docs}
|
||||
# build html docs
|
||||
export WAFDIR=$(pwd)
|
||||
pushd docs/sphinx
|
||||
%{__python3} ../../waf -v configure build
|
||||
%if ! ( 0%{?fedora} || 0%{?rhel} >= 7 )
|
||||
export SPHINX_BUILD=sphinx-1.0-build
|
||||
%endif
|
||||
%{__python2} ../../waf -v configure build
|
||||
popd
|
||||
%endif # with docs
|
||||
%endif # with_docs
|
||||
|
||||
|
||||
%install
|
||||
%{__python3} %{S:1} _temp
|
||||
%{__python2} %{S:1} _temp
|
||||
pushd _temp
|
||||
find . -name '*.py' -printf '%%P\0' |
|
||||
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf/{}
|
||||
popd
|
||||
%if 0%{?with_python3}
|
||||
%{__python3} %{S:1} _temp3
|
||||
pushd _temp3
|
||||
find . -name '*.py' -printf '%%P\0' |
|
||||
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf3/{}
|
||||
popd
|
||||
%endif # with_python3
|
||||
|
||||
# install the frontend
|
||||
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf
|
||||
ln -s waf %{buildroot}%{_bindir}/waf-3
|
||||
ln -s waf %{buildroot}%{_bindir}/waf-%{python3_version}
|
||||
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python2_version}
|
||||
ln -s waf-%{python2_version} %{buildroot}%{_bindir}/waf-2
|
||||
%if 0%{?with_python3}
|
||||
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
|
||||
ln -s waf-%{python3_version} %{buildroot}%{_bindir}/waf-3
|
||||
%endif # with_python3
|
||||
|
||||
# alternatives-controlled
|
||||
touch %{buildroot}%{_bindir}/waf
|
||||
|
||||
# remove shebangs from and fix EOL for all scripts in wafadmin
|
||||
find %{buildroot}%{_datadir}/ -name '*.py' \
|
||||
-exec sed -i -e '1{/^#!/d}' -e 's|\r$||g' {} \;
|
||||
|
||||
# fix waf script shebang line
|
||||
sed -i "1c#! %{__python3}" %{buildroot}%{_bindir}/waf
|
||||
sed -i "1c#! %{__python2}" %{buildroot}%{_bindir}/waf-%{python2_version}
|
||||
%if 0%{?with_python3}
|
||||
sed -i "1c#! %{__python3}" %{buildroot}%{_bindir}/waf-%{python3_version}
|
||||
%endif # with_python3
|
||||
|
||||
# remove x-bits from everything going to doc
|
||||
find demos utils -type f -exec chmod 0644 {} \;
|
||||
|
||||
# fix shebang lines in the demos
|
||||
find demos \( -name '*.py' -o -name '*.py.in' -o -name 'wscript' -o -name 'wscript_build' \) \
|
||||
mkdir demos_py2 ; cp -a demos demos_py2
|
||||
find demos_py2 \( -name '*.py' -o -name 'wscript' -o -name 'wscript_build' \) \
|
||||
-exec sed -e '1{/^#!/d}' -e '1i#!%{__python2}' -i {} \;
|
||||
%if 0%{?with_python3}
|
||||
mkdir demos_py3 ; cp -a demos demos_py3
|
||||
find demos_py3 \( -name '*.py' -o -name 'wscript' -o -name 'wscript_build' \) \
|
||||
-exec sed -e '1{/^#!/d}' -e '1i#!%{__python3}' -i {} \;
|
||||
%endif # with_python3
|
||||
|
||||
# remove hidden file
|
||||
rm -f docs/sphinx/build/html/.buildinfo
|
||||
|
||||
%if 0%{?with_python3}
|
||||
# do byte compilation
|
||||
%py_byte_compile %{__python2} %{buildroot}%{_datadir}/waf
|
||||
%py_byte_compile %{__python3} %{buildroot}%{_datadir}/waf3
|
||||
%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
|
||||
%doc README.md ChangeLog demos_py2/demos
|
||||
%ghost %attr(0755,-,-) %{_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 %attr(0755,-,-) %{_bindir}/waf
|
||||
%{_bindir}/waf-%{python3_version}
|
||||
%{_bindir}/waf-3
|
||||
%{_bindir}/waf
|
||||
%{_datadir}/waf3
|
||||
%endif # with_python3
|
||||
|
||||
|
||||
%if %{with docs}
|
||||
%if 0%{?with_docs}
|
||||
%files -n %{name}-doc
|
||||
%doc docs/sphinx/build/html
|
||||
%endif # with docs
|
||||
%endif # with_docs
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Nov 28 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.19-1
|
||||
- Update to 2.0.19.
|
||||
* Tue Apr 14 2020 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.20-1
|
||||
- Update to 2.0.20.
|
||||
|
||||
* Tue Oct 8 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.18-2
|
||||
- Make waf Python3-only (#1753963).
|
||||
- Spec file modernization and cleanups.
|
||||
* Thu Nov 28 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.19-1.1
|
||||
- Update to 2.0.19.
|
||||
|
||||
* Sat Oct 5 2019 Thomas Moschny <thomas.moschny@gmx.de> - 2.0.18-1
|
||||
- Update to 2.0.18.
|
||||
|
|
@ -592,3 +697,4 @@ rm -f docs/sphinx/build/html/.buildinfo
|
|||
|
||||
* Sun Jan 20 2008 Michel Salim <michel.sylvan@gmail.com> - 1.3.1-1
|
||||
- Initial Fedora package
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue