@ -1,5 +1,5 @@
Name: waf
Version: 1.5.19
Version: 1.6.2
Release: 1%{?dist}
Summary: A Python-based build system
Group: Development/Tools
@ -8,16 +8,17 @@ License: BSD and Python
URL: http://code.google.com/p/waf/
# Original tarfile can be found at
# http://waf.googlecode.com/files/waf-%%{version}.tar.bz2
# We remove doc/book, as this is under CC-BY-NC-ND, which is not
# We remove docs /book, as this is under CC-BY-NC-ND, which is not
# allowed in Fedora.
Source: waf-%{version}.stripped.tar.bz2
# use _datadir instead of /usr/lib
Patch0: waf-1.5.19-libdir.patch
# patch from ticket 682
Patch1: waf-1.5.19-install_3rdparty.patch
Patch0: waf-1.6.2-libdir.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
BuildRequires: python-sphinx
BuildRequires: graphviz
BuildRequires: ImageMagick
# Seems like automatic ABI dependency is not detected since the files are
# going to a non-standard location
Requires: python(abi) %(%{__python} -c "import sys ; print \"=\", sys.version[:3]")
@ -37,55 +38,68 @@ Autotools, Scons, CMake or Ant.
%prep
%setup -q
%patch0 -p1 -b .libdir
%patch1 -p1 -b .install_3rdparty
%patch0 -p0 -b .libdir
%build
./waf-light configure --prefix=%{_prefix}
./waf-light --make-waf --strip
extras=
for f in waflib/extras/*.py ; do
f=$(basename "$f" .py);
if [ "$f" != "__init__" ]; then
extras="${extras:+$extras,}$f" ;
fi
done
./waf-light --make-waf --strip --tools="$extras"
# build html docs
pushd docs/sphinx
../../waf configure build
%install
%{__rm} -rf %{buildroot}
./waf install --yes --destdir=%{buildroot}
# remove shebangs from all scripts in wafadmin
find %{buildroot}%{_datadir}/waf/wafadmin -name '*.py' \
-exec %{__sed} -i '1{/^#!/d}' {} \;
%install
rm -rf %{buildroot}
# use waf so it unpacks itself
mkdir _temp ; pushd _temp
cp -av ../waf .
./waf >/dev/null 2>&1
pushd .waf-%{version}-*
find . -name '*.py' -printf '%%P\0' |
xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf/{}
popd ; popd
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf
# remove shebangs from and fix EOL for all scripts in wafadmin
find %{buildroot}%{_datadir}/waf/ -name '*.py' \
-exec sed -i -e '1{/^#!/d}' -e 's|\r$||g' {} \;
# fix waf script shebang line
%{__sed} -i "1c#! /usr/bin/python" %{buildroot}%{_bindir}/waf
# fix EOL
%{__sed} -i 's|\r$||g' utils/amtool.py utils/waf.py
sed -i "1c#! /usr/bin/python" %{buildroot}%{_bindir}/waf
# remove x-bits from everything going to doc
find demos utils -type f -exec %{__chmod} 0644 {} \;
# remove zero-length files
%{__rm} demos/gnome/src/hello.h
%{__rm} demos/simple_scenarios/local_tool/uh.coin
# bash completion
%{__install} -D -p -m 0644 utils/waf-completion.bash \
%{buildroot}%{_sysconfdir}/bash_completion.d/waf-completion.bash
%clean
%{__ rm} -rf %{buildroot}
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README TODO ChangeLog demos utils
%doc README TODO ChangeLog demos
%doc docs/sphinx/build/html
%{_bindir}/waf
%{_datadir}/waf
%{_sysconfdir}/bash_completion.d
%changelog
* Sat Jan 15 2011 Thomas Moschny <thomas.moschny@gmx.de> - 1.6.2-1
- Update to 1.6.2.
- Generate and include html docs.
- Upstream removed the 'install' target, so we need to copy waflib
manually.
- The bash completion file is not provided anymore.
* Fri Oct 1 2010 Thomas Moschny <thomas.moschny@gmx.de> - 1.5.19-1
- Update to 1.5.19.