@ -1,29 +1,34 @@
Name: waf
Version: 1.4.4
Release: 2 %{?dist}
Version: 1.5.2
Release: 1 %{?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)
License: BSD and Python
URL: http://code.google.com/p/waf/
Source0 : http://waf.googlecode.com/files/waf-%{version}.tar.bz2
Source: http://waf.googlecode.com/files/waf-%{version}.tar.bz2
# use _datadir instead of /usr/lib
Patch0: waf-1.4.4-libdir.patch
Patch0: waf-1.5.2-libdir.patch
Patch1: waf-1.5.2-stylesheet.patch
# r5462 from trunk
Patch2: waf-1.5.2-book.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
BuildArch: noarch
BuildRequires: python-devel
# for building the documentation
BuildRequires: /usr/bin/xsltproc
BuildRequires: docbook-style-xsl
# 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]")
Requires: python-abi %(%{__python} -c "import sys ; print \"=\", sys.version[:3]")
# the demo suite contains a perl module, which draws in unwanted
# provides and requires
%define __perl_provides %{nil}
%define __perl_requires %{nil}
%description
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
@ -33,25 +38,28 @@ Autotools, Scons, CMake or Ant.
%prep
%setup -q
%patch0 -p1 -b .libdir
%patch1 -p1 -b .stylesheet
%patch2 -p0 -b .book
%build
./waf-light configure --prefix=%{_prefix}
./waf-light --make-waf --strip
(cd doc/book ; ../../waf configure && ../../waf)
%install
%{__rm} -rf $RPM_BUILD_ROOT
%{__rm} -rf %{buildroot}
# the install target wants an acknowledgement
echo y | ./waf install --destdir=$RPM_BUILD_ROOT
./waf install --yes --destdir=%{buildroot}
# remove shebangs from all scripts in wafadmin
find $RPM_BUILD_ROOT %{_datadir}/waf/wafadmin -name '*.py' \
find %{buildroot} %{_datadir}/waf/wafadmin -name '*.py' \
-exec %{__sed} -i '1{/^#!/d}' {} \;
# fix waf script shebang line
%{__sed} -i "1c#! /usr/bin/python" $RPM_BUILD_ROOT %{_bindir}/waf
%{__sed} -i "1c#! /usr/bin/python" %{buildroot} %{_bindir}/waf
# fix EOL
%{__sed} -i 's|\r$||g' utils/amtool.py
@ -62,25 +70,37 @@ 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
%{__rm} doc/book/build/default/waf.html
# bash completion
%{__install} -D -p -m 0644 utils/waf-completion.bash \
%{buildroot}%{_sysconfdir}/bash_completion.d//waf-completion.bash
# basically giving it a better name
%{__mv} doc/book/build/default doc/html
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README TODO ChangeLog demos doc/waf.pdf utils
%doc README TODO ChangeLog demos utils
%doc doc/html
%{_bindir}/waf
%{_datadir}/waf
%{_sysconfdir}/bash_completion.d
%changelog
* Fri Jan 16 2009 Thomas Moschny <thomas.moschny@gmx.de> - 1.5.2-1
- Update to 1.5.2.
- Generate html documentation (though without highlighting).
* Fri Dec 19 2008 Thomas Moschny <thomas.moschny@gmx.de> - 1.5.1-1
- Update to 1.5.1.
* Mon Dec 01 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.4.4-2
- Rebuild for Python 2.6