-diff -Nurpb waf-1.5.18org/waf-light waf-1.5.18/waf-light
---- waf-1.5.18org/waf-light 2010-07-06 19:50:52.000000000 +0200
-+++ waf-1.5.18/waf-light 2010-07-09 00:28:54.000000000 +0200
+--- waf-1.6.4/waf-light.orig 2011-04-17 12:02:50.000000000 +0200
++++ waf-1.6.4/waf-light 2011-05-01 06:55:29.260143094 +0200
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python
- # encoding: ISO-8859-1
+ # encoding: ISO8859-1
# Thomas Nagy, 2005-2010
-@@ -131,7 +131,7 @@ def find_lib():
- if w: return w
- err("waf-light requires wafadmin -> export WAFDIR=/folder")
+@@ -34,7 +34,7 @@
-- dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION)
-+ dir = "/lib/waf/"
- for i in [INSTALL,'/usr','/usr/local','/opt']:
- w = test(i+dir)
+ VERSION="1.6.4"
+ REVISION="x"
+-INSTALL="x"
++INSTALL="/usr/share"
+ C1='x'
+ C2='x'
+ cwd = os.getcwd()
+@@ -140,7 +140,7 @@ def find_lib():
if w: return w
-diff -Nurpb waf-1.5.18org/wscript waf-1.5.18/wscript
---- waf-1.5.18org/wscript 2010-07-06 19:50:52.000000000 +0200
-+++ waf-1.5.18/wscript 2010-07-09 00:31:03.000000000 +0200
-@@ -340,7 +340,7 @@ def build(bld):
- if val != True and val != "y": sys.exit(1)
- create_waf()
+ err('waf-light requires waflib -> export WAFDIR=/folder')
-- dir = os.path.join('lib', 'waf-%s-%s' % (VERSION, REVISION), 'wafadmin')
-+ dir = os.path.join('lib', 'waf', 'wafadmin')
+- dirname = '%s-%s-%s' % (WAF, VERSION, REVISION)
+- for i in [INSTALL,'/usr','/usr/local','/opt']:
+- w = test(i + '/lib/' + dirname)
++ dirname = WAF
++ for i in [INSTALL,'/usr/lib','/usr/local/lib','/opt']:
++ w = test(i + '/' + dirname)
+ if w: return w
+--- waf-1.6.4/wscript.orig 2011-04-17 12:02:50.000000000 +0200
++++ waf-1.6.4/wscript 2011-05-01 07:00:51.030153869 +0200
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#! /usr/bin/python
+ # encoding: utf-8
+ # Thomas Nagy, 2005-2010
- wafadmin = bld(features = 'py')
- wafadmin.find_sources_in_dirs('wafadmin', exts=['.py'])
Summary: The Waf build system
Summary(pl.UTF-8): System budowania Waf
Name: waf
-Version: 1.5.19
+Version: 1.6.4
Release: 1
+# note: waf book is on CC-BY-NC-ND (not included in binary package)
License: BSD
Group: Development/Building
+#Source0Download: http://code.google.com/p/waf/downloads/list
Source0: http://waf.googlecode.com/files/%{name}-%{version}.tar.bz2
-# Source0-md5: a83ee1cf255f99ed425c15f3c26f8884
+# Source0-md5: f0cf1464d660bf7256187dfc05d75d17
Patch0: %{name}-path.patch
URL: http://code.google.com/p/waf/
-BuildRequires: python >= 2.4
-BuildRequires: python-modules
+BuildRequires: python >= 1:2.6
+BuildRequires: python-modules >= 1:2.6
BuildRequires: rpm-pythonprov
+Requires: python(abi) = %{py_ver}
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _libdir %{_prefix}/lib
-
%description
Waf is a general-purpose build system which was modelled from Scons.
Though it comes last in the arena of the build systems, we believe
%patch0 -p1
%build
-./waf-light configure \
- --prefix=%{_prefix}
-./waf-light --make-waf
+# check waf-light
+extras=
+for f in waflib/extras/*.py ; do
+ tool=$(basename "$f" .py)
+ if [ "$tool" != "__init__" ]; then
+ extras="${extras:+$extras,}$tool"
+ fi
+done
+./waf-light --make-waf --strip --tools="$extras"
%install
rm -rf $RPM_BUILD_ROOT
-echo y | ./waf install \
- --prefix %{_prefix} \
- --destdir $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_datadir}/waf/waflib/{Tools,extras}
+
+cp -p waflib/*.py $RPM_BUILD_ROOT%{_datadir}/waf/waflib
+cp -p waflib/Tools/*.py $RPM_BUILD_ROOT%{_datadir}/waf/waflib/Tools
+cp -p waflib/extras/*.py $RPM_BUILD_ROOT%{_datadir}/waf/waflib/extras
+
+install -D -p waf-light $RPM_BUILD_ROOT%{_bindir}/waf
-%py_comp $RPM_BUILD_ROOT%{_libdir}/%{name}
-%py_ocomp $RPM_BUILD_ROOT%{_libdir}/%{name}
-%py_postclean %{_libdir}/%{name}
+%py_comp $RPM_BUILD_ROOT%{_datadir}/waf/waflib
+%py_ocomp $RPM_BUILD_ROOT%{_datadir}/waf/waflib
+%py_postclean %{_datadir}/waf/waflib
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README TODO
+%doc ChangeLog README TODO
%attr(755,root,root) %{_bindir}/waf
-%dir %{_libdir}/%{name}
-%dir %{_libdir}/%{name}/wafadmin
-%{_libdir}/%{name}/wafadmin/*.py[co]
-%dir %{_libdir}/%{name}/wafadmin/Tools
-%{_libdir}/%{name}/wafadmin/Tools/*.py[co]
+%{_datadir}/waf