Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > b89c09994696a859cd023e06e23a39bd > files > 7

waf-1.7.10-1.mga3.src.rpm

%define debug_package %{nil}
%define _requires_exceptions perl(Exporter)\\|perl(XSLoader)
%define python_compile python -c "import compileall; compileall.compile_dir('.')" 
%define python_compile_opt python -O -c "import compileall; compileall.compile_dir('.')" 

%define python3_compile python3 -c "import compileall; compileall.compile_dir('.')" 
%define python3_compile_opt python3 -O -c "import compileall; compileall.compile_dir('.')"

%define build_py3 1

Summary:	A framework for configuring, compiling and installing applications
Name:		waf
Version:	1.7.10
Release:	%mkrel 1
License:	BSD and Python
Group:		Development/Tools
Url:		http://code.google.com/p/waf/
# Original tarfile can be found at
# http://waf.googlecode.com/files/waf-%%{version}.tar.bz2
# We remove docs/book, as this is under CC-BY-NC-ND, which is not
# allowed in Mageia. 
# We remove Waf logos ./docs/gfx/waflogo.svg ./docs/slides/presentation/gfx/waflogo.svg ./docs/sphinx/_images/waf-64x64.png
# - Waf logos, licensed CC BY-NC
Source0:	waf-%{version}.stripped.tar.xz
Source1:	%{name}.macros
Source2:	%{name}-python3.macros
Source3:	repack.sh
Patch0:		%{name}-1.6.3-libdir.patch
Patch1:         %{name}-1.6.9-logo.patch
BuildRequires:  python-devel
Requires:	python(abi) = %{pyver}
BuildArch:	noarch
%if %{build_py3}
BuildRequires:  python3-devel
%endif
BuildRequires:	python-sphinx
BuildRequires:	graphviz
BuildRequires:	imagemagick
Suggests:       %{name}-doc
BuildConflicts: waf
%if %{build_py3}
BuildConflicts: waf-python3
%endif

%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, and Ant.


%package -n %{name}-doc
Summary:        Documentation for %{name}
%description -n %{name}-doc
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
Autotools, Scons, CMake or Ant.
This package contains the HTML documentation for %{name}.

%if %{build_py3}
%package -n %{name}-python3
Summary:        Python3 support for %{name}
Requires:	python(abi) = %{py3ver}

%description -n %{name}-python3
Waf is a Python-based framework for configuring, compiling and
installing applications. It is a replacement for other tools such as
Autotools, Scons, CMake or Ant.

This package contains the Python 3 version of %{name}.
%endif

%prep
%setup -q
%patch0 -p0 -b .libdir
%patch1 -p1 -b .logo

%build
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
popd

%install
# use waf so it unpacks itself
mkdir _temp ; pushd _temp
cp -av ../waf .
python ./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

%if %{build_py3}
python3 ./waf >/dev/null 2>&1
pushd .waf3-%{version}-*
find . -name '*.py' -printf '%%P\0' |
  xargs -0 -I{} install -m 0644 -p -D {} %{buildroot}%{_datadir}/waf3/{}
popd
%endif
popd

install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python_version}

%if %{build_py3}
install -m 0755 -p -D waf-light %{buildroot}%{_bindir}/waf-%{python3_version}
%endif

ln -s waf-%{python_version} %{buildroot}%{_bindir}/waf

# remove shebangs from and fix EOL for all scripts in wafadmin
find %{buildroot}%{_datadir}/ -name '*.py' \
     -exec sed -i -e '1{/^#!/d}' -e 's|\r$||g' {} \;

# fix waf script shebang line
sed -i "1c#! %{__python}" %{buildroot}%{_bindir}/waf-%{python_version}
%if %{build_py3}
sed -i "1c#! %{__python3}" %{buildroot}%{_bindir}/waf-%{python3_version}
%endif

# remove x-bits from everything going to doc
find demos utils -type f -exec chmod 0644 {} \;

# remove hidden file
rm -f docs/sphinx/build/html/.buildinfo

# install waf rpm macro helper
install -D %{SOURCE1} %{buildroot}%{_sysconfdir}/rpm/macros.d/%{name}.macros
%if %{build_py3}
install -D %{SOURCE2} %{buildroot}%{_sysconfdir}/rpm/macros.d/%{name}-python3.macros
%endif

# do byte compilation
pushd %{buildroot}%{_datadir}/waf
%python_compile_opt 
%python_compile 
popd

%if %{build_py3}
pushd %{buildroot}%{_datadir}/waf3
%python3_compile_opt
%python3_compile
popd
%endif

%files -n %{name}-doc
%doc docs/sphinx/build/html
%doc README TODO ChangeLog demos

%files 
%{_sysconfdir}/rpm/macros.d/%{name}.macros
%{_bindir}/%{name}
%{_bindir}/%{name}-%{python_version}
%{_datadir}/%{name}

%if %{build_py3}
%files -n %{name}-python3
%{_sysconfdir}/rpm/macros.d/%{name}-python3.macros
%{_bindir}/waf-%{python3_version}
%{_datadir}/waf3
%endif


%changelog

* Mon Mar 25 2013 philippem <philippem> 1.7.10-1.mga3
+ Revision: 405242
- update to new upstream, regression fix, python3_waf macro fix

* Mon Jan 14 2013 umeabot <umeabot> 1.7.8-2.mga3
+ Revision: 385590
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sun Dec 23 2012 philippem <philippem> 1.7.8-1.mga3
+ Revision: 334154
- Update to 1.7.8

* Sat Dec 01 2012 philippem <philippem> 1.7.6-1.mga3
+ Revision: 324146
- update to 1.7.6

  + malo <malo>
    - update RPM group

* Sun Sep 30 2012 fwang <fwang> 1.7.4-2.mga3
+ Revision: 300677
- update python abi support

* Sat Sep 29 2012 fwang <fwang> 1.7.4-1.mga3
+ Revision: 300351
- new version 1.7.4

* Sat Sep 29 2012 fwang <fwang> 1.7.0-2.mga3
+ Revision: 300310
- rebuild for new py 3.3

* Thu Aug 02 2012 kamil <kamil> 1.7.0-1.mga3
+ Revision: 278018
- new version 1.7.0

* Tue Jul 03 2012 kamil <kamil> 1.7.0-0.pre5.3.mga3
+ Revision: 267032
- split waf.macros into python2 and python3 version and package separately

* Mon Jul 02 2012 kamil <kamil> 1.7.0-0.pre5.2.mga3
+ Revision: 266838
- stop using want-rpath=0 parameter in waf.macros, it's not standard and interrupts build

* Mon Jul 02 2012 kamil <kamil> 1.7.0-0.pre5.1.mga3
+ Revision: 266582
- new version 1.7.0pre5

* Sat Jun 30 2012 kamil <kamil> 1.6.11-2.mga3
+ Revision: 265669
- add support for python3-waf in .macro

* Sat Jun 30 2012 kamil <kamil> 1.6.11-1.mga3
+ Revision: 265577
- new version 1.6.11
- add subpackage with the Python 3 build (inspired by Fedora)
- clean .spec a bit

* Tue Dec 20 2011 philippem <philippem> 1.6.10-1.mga2
+ Revision: 184943
- Update to 1.6.10
- Remove patch applied upstream
- Change summary

* Wed Nov 30 2011 philippem <philippem> 1.6.9-1.mga2
+ Revision: 174541
- Update to 1.6.9

* Sat Oct 22 2011 philippem <philippem> 1.6.8-1.mga2
+ Revision: 157381
- Update to 1.6.8.
- Move HTML documentation to a subpackage.

* Sat Feb 26 2011 philippem <philippem> 1.6.3-2.mga1
+ Revision: 61039
- remove not allowed docs (bad licence)

* Sat Feb 26 2011 philippem <philippem> 1.6.3-1.mga1
+ Revision: 60933
- imported package waf


* Sat Feb 26 2011 Philippe Makowski <makowski.mageia@gmail.com> 1.6.3-1mga1
- initial import
- Update to new version 1.6.3

* Fri Oct 29 2010 Michael Scherer <misc@mandriva.org> 1.5.19-2mdv2011.0
+ Revision: 590142
- rebuild for python 2.7

* Sun Oct 17 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.19-1mdv2011.0
+ Revision: 586308
- update to new version 1.5.19

* Sun Aug 22 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.18-1mdv2011.0
+ Revision: 571976
- update to new version 1.5.18
- rediff patch 1

* Mon Apr 05 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.15-1mdv2010.1
+ Revision: 531573
- update to new version 1.5.15
- rediff patch 0

* Sun Mar 07 2010 Lev Givon <lev@mandriva.org> 1.5.14-1mdv2010.1
+ Revision: 515481
- Update to 1.5.14.

* Thu Feb 18 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.12-1mdv2010.1
+ Revision: 507863
- update to new version 1.5.12

* Mon Feb 01 2010 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.11-1mdv2010.1
+ Revision: 499241
-- update to new version 1.5.11
- rediff patch 0

* Wed Nov 18 2009 Frederik Himpe <fhimpe@mandriva.org> 1.5.10-1mdv2010.1
+ Revision: 467287
- update to new version 1.5.10

* Wed Sep 02 2009 Frederik Himpe <fhimpe@mandriva.org> 1.5.9-1mdv2010.0
+ Revision: 425473
- update to new version 1.5.9

* Sat Jul 11 2009 Funda Wang <fwang@mandriva.org> 1.5.8-2mdv2010.0
+ Revision: 394731
- fix pthread linkage

* Sun Jun 14 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.8-1mdv2010.0
+ Revision: 385925
- update to new version 1.5.8

* Sat May 30 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.6-1mdv2010.0
+ Revision: 381343
- update to new version 1.5.6

* Fri May 01 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.5-1mdv2010.0
+ Revision: 369238
- update to new version 1.5.5
- rediff patch 0

* Mon Feb 02 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.3-1mdv2009.1
+ Revision: 336307
- update to new version 1.5.3

* Fri Jan 30 2009 Funda Wang <fwang@mandriva.org> 1.5.2-4mdv2009.1
+ Revision: 335640
- specify LINKFLAGS also.

* Sat Jan 03 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.2-3mdv2009.1
+ Revision: 323950
- fix install macro

* Sat Jan 03 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.2-2mdv2009.1
+ Revision: 323544
- fix typo in waf.macros

* Sat Jan 03 2009 Tomasz Pawel Gajc <tpg@mandriva.org> 1.5.2-1mdv2009.1
+ Revision: 323515
- add specs and source files
- provide waf.macros for rpm building
- Patch0: fix installation of waf
- Created package structure for waf.