[waf] - Update to 1.6.2. - Generate and include html docs. - Upstream removed the 'install' target, so we
Thomas Moschny
thm at fedoraproject.org
Tue Jan 18 00:16:53 UTC 2011
commit a0444fbaec991775b4a8d2a4a455a886c9b5efb5
Author: Thomas Moschny <thm at fedoraproject.org>
Date: Tue Jan 18 01:12:11 2011 +0100
- 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.
.gitignore | 1 +
repack.sh | 16 ++++++++
sources | 2 +-
waf-1.5.19-install_3rdparty.patch | 15 -------
waf-1.5.19-libdir.patch | 26 -------------
waf-1.6.2-libdir.patch | 12 ++++++
waf.spec | 76 ++++++++++++++++++++++---------------
7 files changed, 75 insertions(+), 73 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0b53125..c27976f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
waf-1.5.18.stripped.tar.bz2
/waf-1.5.19.stripped.tar.bz2
+/waf-1.6.2.stripped.tar.bz2
diff --git a/repack.sh b/repack.sh
new file mode 100755
index 0000000..adc405a
--- /dev/null
+++ b/repack.sh
@@ -0,0 +1,16 @@
+#! /bin/bash
+
+version=1.6.2
+
+src=waf-${version}.tar.bz2
+dst=${src%.tar.bz2}.stripped.tar.bz2
+
+rm -f ${dst} ${dst%.bz2}
+cp -av ${src} ${dst}
+
+bzip2 -d ${dst}
+
+tar --delete --file=${dst%.bz2} \
+ waf-${version}/docs/book
+
+bzip2 ${dst%.bz2}
diff --git a/sources b/sources
index 7544006..2caa9e5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-22d4d60c866b4380b3b03830b505fbf2 waf-1.5.19.stripped.tar.bz2
+2852843de0f388105dd95c80a037ac27 waf-1.6.2.stripped.tar.bz2
diff --git a/waf-1.6.2-libdir.patch b/waf-1.6.2-libdir.patch
new file mode 100644
index 0000000..46beb52
--- /dev/null
+++ b/waf-1.6.2-libdir.patch
@@ -0,0 +1,12 @@
+--- waf-light.orig 2010-11-25 11:11:50.000000000 +0100
++++ waf-light 2011-01-15 15:22:53.485315375 +0100
+@@ -145,6 +145,9 @@
+ w = test(i + '/lib/' + dirname)
+ if w: return w
+
++ w = test('/usr/share/waf')
++ if w: return w
++
+ #waf-local
+ dir = join(base, (sys.platform != 'win32' and '.' or '') + dirname)
+ w = test(dir)
diff --git a/waf.spec b/waf.spec
index fc97c2c..2f5c7a2 100644
--- a/waf.spec
+++ b/waf.spec
@@ -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 at 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 at gmx.de> - 1.5.19-1
- Update to 1.5.19.
More information about the scm-commits
mailing list