- 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.
epel8
Thomas Moschny 14 years ago
parent 5396849817
commit a0444fbaec

1
.gitignore vendored

@ -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

@ -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}

@ -1 +1 @@
22d4d60c866b4380b3b03830b505fbf2 waf-1.5.19.stripped.tar.bz2
2852843de0f388105dd95c80a037ac27 waf-1.6.2.stripped.tar.bz2

@ -1,15 +0,0 @@
diff --git a/wscript b/wscript
index 8e73abb..5daeb97 100644
--- a/wscript
+++ b/wscript
@@ -350,6 +350,10 @@ def build(bld):
tools.find_sources_in_dirs('wafadmin/Tools', exts=['.py'])
tools.install_path = os.path.join('${PREFIX}', dir, 'Tools')
+ thirdparty = bld(features = 'py')
+ thirdparty.find_sources_in_dirs('wafadmin/3rdparty', exts=['.py'])
+ thirdparty.install_path = os.path.join('${PREFIX}', dir, '3rdparty')
+
bld.install_files('${PREFIX}/bin', 'waf', chmod=0755)
#print "waf is now installed in %s [%s, %s]" % (prefix, wafadmindir, binpath)

@ -1,26 +0,0 @@
diff --git a/waf-light b/waf-light
index dd568f3..035cdda 100755
--- a/waf-light
+++ b/waf-light
@@ -131,7 +131,7 @@ def find_lib():
if w: return w
err("waf-light requires wafadmin -> export WAFDIR=/folder")
- dir = "/lib/%s-%s-%s/" % (WAF, VERSION, REVISION)
+ dir = "/share/waf/"
for i in [INSTALL,'/usr','/usr/local','/opt']:
w = test(i+dir)
if w: return w
diff --git a/wscript b/wscript
index 52d3b6e..8e73abb 100644
--- a/wscript
+++ b/wscript
@@ -340,7 +340,7 @@ def build(bld):
if val != True and val != "y": sys.exit(1)
create_waf()
- dir = os.path.join('lib', 'waf-%s-%s' % (VERSION, REVISION), 'wafadmin')
+ dir = os.path.join('share', 'waf', 'wafadmin')
wafadmin = bld(features = 'py')
wafadmin.find_sources_in_dirs('wafadmin', exts=['.py'])

@ -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)

@ -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.

Loading…
Cancel
Save