File scons.spec of Package scons

#
# spec file for package scons
#


%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}

Name:           scons
Summary:        Replacement for Make
License:        MIT
Group:          Development/Tools/Building
Version:        2.3.0
Release:        1
Source0:        http://prdownloads.sourceforge.net/scons/%{name}-%{version}.tar.gz
#http://www.scons.org/doc/%%{version}/HTML/scons-user.html
Source1:        scons-user.html-%{version}.tar.bz2
# rpmlintrc
Source99:       %{name}-rpmlintrc
# Sets _mandir to _datadir/man instead of _prefix/man
Patch0:         %{name}-1.2.0-fix-install.patch
Patch1:         %{name}-1.2.0-noenv.patch
Url:            http://www.scons.org/
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

#!BuildIgnore:  dba-openssl-098o dba-openssl-098r dba-openssl-098x dba-openssl-101c dba-openssl-101e
BuildRequires:  python-devel >= 2.4

%if 0%{?suse_version} > 1110
BuildArch:      noarch
%{py_requires}
%endif

%description
SCons is a make replacement that provides a range of enhanced features,
such as automated dependency generation and built-in compilation cache
support. SCons rule sets are Python scripts, which means that SCons
provides itself as well as the features. SCons allows you to use the
full power of Python to control compilation.


%prep
%setup -q -a1
%patch0
%patch1
# fix libdir for qt
patch -p0 <<EOF
--- engine/SCons/Tool/qt.py
+++ engine/SCons/Tool/qt.py
@@ -247,1 +247,1 @@
-                   QT_LIBPATH = os.path.join('\$QTDIR', 'lib'),
+                   QT_LIBPATH = os.path.join('\$QTDIR', '%_lib'),
EOF


%build
export CFLAGS="$RPM_OPT_FLAGS"
python setup.py build


%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot} --install-lib=%{python_sitelib}


%check


%files
%defattr(-,root,root)
%doc CHANGES.txt LICENSE.txt README.txt RELEASE.txt scons-user.html
%{_bindir}/*
%{python_sitelib}/SCons/
%if 0%{?centos_version} >= 600 || 0%{?rhel_version} >= 600 || 0%{?suse_version} >= 1100
%{python_sitelib}/*.egg-info
%endif
%{_mandir}/man1/*.gz


%changelog
* Thu Sep  5 2013 Holger Manthey <holger.manthey@bertelsmann.de>
- inital version
openSUSE Build Service is sponsored by