File ironpython.spec of Package ironpython

#
# spec file for package ironpython (Version 2.7.5)
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

Summary: An open-source implementation of Python which is integrated with Mono
Name: ironpython
Version: 2.7.5
Release: 1
Source: ipy-2.7.5.tar.gz
License: Apache-2.0
Group: Development/Languages/Python
Url: http://ironpython.net/
Requires: mono
BuildRequires: mono mono-xbuild
Patch1: pgroup.diff
Patch2: mono40.diff
Patch3: fix-bad-keyname-attrs.patch
Patch4: fix-bad-cs-comments.patch
BuildArch: noarch

%define _use_internal_dependency_generator 0
%define __find_provides env sh -c 'filelist=($(cat)) ; { printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-provides ; printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides ; } | sort | uniq'
%define __find_requires env sh -c 'filelist=($(cat)) ; { printf "%s\\n" "${filelist[@]}" | /usr/bin/mono-find-requires ; printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires ; } | sort | uniq | grep -v "mono(System.Deployment)" | grep -v "mono(PresentationUI)" | grep -v "mono(ReachFramework)" | grep -v "mono(System.Printing)" | grep -v "mono(PresentationCore)"'

%description
IronPython is an open-source implementation of the Python programming
language which is tightly integrated with the .NET Framework.
IronPython can use the .NET Framework and Python libraries, and other
.NET languages can use Python code just as easily.

%prep
%setup -n main-ipy-2.7.5
%patch1
%patch2
%patch3 -p1
%patch4 -p1

%build
xbuild /verbosity:diagnostic /p:Configuration=Release Solutions/IronPython.sln

%install
%define executable %{buildroot}%{_bindir}/ipy
mkdir -p %{buildroot}%{_datadir}
cp -a bin/Release %{buildroot}%{_datadir}/ironpython
mkdir -p %{buildroot}%{_bindir}
echo "#!/bin/sh" > %{executable}
echo "" >> %{executable}
echo "mono %{_datadir}/ironpython/ipy.exe \"\$@\"" >> %{executable}
chmod +x %{executable}

%files
%defattr(-,root,root)
%doc README
%{_bindir}/ipy
%{_datadir}/ironpython

%changelog
openSUSE Build Service is sponsored by