Name: waf Version: 1.5.19 Release: 2mamba Summary: The flexible build system Group: Development/Tools Vendor: openmamba Distribution: openmamba Packager: gil URL: http://code.google.com/p/waf/ Source: http://waf.googlecode.com/files/waf-%{version}.tar.bz2 Patch0: waf-1.5.19-libdir.patch Patch1: waf-1.5.19-install_3rdparty.patch License: BSD BuildRequires: libpython-devel ## AUTOBUILDREQ-BEGIN BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Waf is a Python-based framework for configuring, compiling and installing applications. It derives from the concepts of other build tools such as Scons, Autotools, CMake or Ant. %prep %setup -q %patch0 -p1 -b .libdir %patch1 -p1 -b .install_3rdparty for p in $(find . -name "*.py"); do sed -i 's|#!/usr/bin/python|#!%{__python}|' $p sed -i 's|#!/usr/bin/env python|#!%{__python}|' $p sed -i 's|#!python|#!%{__python}|' $p sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $p sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $p sed -i 's|\r$||g' $p done for w in $(find . -name "wscript*"); do sed -i 's|#!/usr/bin/python|#!%{__python}|' $w sed -i 's|#!/usr/bin/env python|#!%{__python}|' $w sed -i 's|#!python|#!%{__python26}|' $w sed -i 's|#!/usr/local/bin/python2.1|#!%{__python}|' $w sed -i 's|#!/usr/local/bin/python|#!%{__python}|' $w done sed -i 's|#! /usr/bin/env python\n# encoding: utf-8|#!%{__python}\n# encoding: utf-8|' wscript sed -i 's|#!/usr/bin/env python|#!%{__python}|' waf-light %build ./waf-light configure --prefix=%{_prefix} ./waf-light --make-waf --strip %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" ./waf install --yes --destdir=%{buildroot} find %{buildroot}%{_datadir}/waf/wafadmin -name '*.py' -exec sed -i '1{/^#!/d}' {} \; sed -i 's|#!/usr/local/bin/python|#!%{__python}|' %{buildroot}%{_bindir}/waf find demos utils -type f -exec chmod 644 {} \; rm -rf demos/gnome/src/hello.h rm -rf demos/simple_scenarios/local_tool/uh.coin mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d install -pm 644 utils/waf-completion.bash %{buildroot}%{_sysconfdir}/bash_completion.d/waf-completion.bash %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %files %defattr(-,root,root) %{_sysconfdir}/bash_completion.d/waf-completion.bash %{_bindir}/waf %dir %{_datadir}/waf %dir %{_datadir}/waf/wafadmin %{_datadir}/waf/wafadmin/*.py* %dir %{_datadir}/waf/wafadmin/3rdparty %{_datadir}/waf/wafadmin/3rdparty/*.py* %dir %{_datadir}/waf/wafadmin/Tools %{_datadir}/waf/wafadmin/Tools/*.py* %doc ChangeLog README TODO demos utils %changelog * Tue Nov 30 2010 gil 1.5.19-2mamba - rebuilt devel * Tue Oct 19 2010 gil 1.5.19-1mamba - package created by autospec