File fsharp.spec of Package fsharp
#
# spec file for package fsharp
#
# Copyright (c) 2018 SUSE LINUX 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/
#
Name: fsharp
Version: 10.2.3
Release: 0
Summary: F# compiler, core library and core tools
License: Apache-2.0
Group: Development/Languages/Other
Url: http://fsharp.org
Source: https://github.com/fsharp/fsharp/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: fsharp.rpmlintrc
Source2: NuGet.Config
# Bootstrap dependencies
Source3: https://www.nuget.org/api/v2/package/Microsoft.Build.Framework/14.3.0#/microsoft.build.framework.14.3.0.nupkg
Source4: https://www.nuget.org/api/v2/package/System.Collections.Immutable/1.5.0#/system.collections.immutable.1.5.0.nupkg
Source5: https://www.nuget.org/api/v2/package/FsLexYacc/7.0.6#/fslexyacc.7.0.6.nupkg
Source6: https://www.nuget.org/api/v2/package/MicroBuild.Core/0.2.0#/microbuild.core.0.2.0.nupkg
Source7: https://www.nuget.org/api/v2/package/System.ValueTuple/4.4.0#/system.valuetuple.4.4.0.nupkg
Source8: https://www.nuget.org/api/v2/package/Microsoft.Build/14.3.0#/microsoft.build.14.3.0.nupkg
Source9: https://www.nuget.org/api/v2/package/Microsoft.Build.Tasks.Core/14.3.0#/microsoft.build.tasks.core.14.3.0.nupkg
Source10: https://www.nuget.org/api/v2/package/System.Reflection.Metadata/1.6.0#/system.reflection.metadata.1.6.0.nupkg
Source11: https://www.nuget.org/api/v2/package/Microsoft.Build/15.8.166#/microsoft.build.15.8.166.nupkg
Source12: https://www.nuget.org/api/v2/package/Microsoft.Build.Utilities.Core/14.3.0#/microsoft.build.utilities.core.14.3.0.nupkg
Source13: https://www.nuget.org/api/v2/package/Microsoft.Build.Tasks.Core/15.8.166#/microsoft.build.tasks.core.15.8.166.nupkg
Source14: https://www.nuget.org/api/v2/package/System.IO.Compression/4.3.0#/system.io.compression.4.3.0.nupkg
Source15: https://www.nuget.org/api/v2/package/FsCheck/3.0.0-alpha3#/fscheck.3.0.0-alpha3.nupkg
Source16: https://www.nuget.org/api/v2/package/NUnit/3.5.0#/nunit.3.5.0.nupkg
Source17: https://www.nuget.org/api/v2/package/NUnit.Console/3.0.0#/nunit.3.0.0.nupkg
Source18: https://www.nuget.org/api/v2/package/NUnitLite/3.5.0#/nunitlite.3.5.0.nupkg
Source19: https://www.nuget.org/api/v2/package/NUnit3TestAdapter/3.0.8-ctp-8#/nunit3testadapter.3.0.8.nupkg
Source20: https://www.nuget.org/api/v2/package/BenchmarkDotNet/0.9.8#/benchmarkdotnet.0.9.8.nupkg
Source21: https://www.nuget.org/api/v2/package/BenchmarkDotNet.Diagnostics.Windows/0.9.8#/benchmarkdotnet.diagnostics.windows.0.9.8.nupkg
Source22: https://www.nuget.org/api/v2/package/FSharp.Compiler.Tools/10.2.1#/fsharp.compiler.tools.10.2.1.nupkg
Source23: https://www.nuget.org/api/v2/package/Microsoft.Portable.FSharp.Core/10.1.0#/microsoft.portable.fsharp.core.10.1.0.nupkg
Source24: https://www.nuget.org/api/v2/package/FSharp.Core/4.1.18#/fsharp.core.4.1.18.nupkg
Source25: https://www.nuget.org/api/v2/package/FSharp.Core/4.0.0.1#/fsharp.core.4.0.0.1.nupkg
Source26: https://www.nuget.org/api/v2/package/Microsoft.Build.Framework/15.8.166#/microsoft.build.framework.15.8.166.nupkg
Source27: https://www.nuget.org/api/v2/package/FSharp.Core/3.0.2#/fsharp.core.3.0.2.nupkg
Source28: https://www.nuget.org/api/v2/package/FSharp.Core/3.1.2.5#/fsharp.core.3.1.2.5.nupkg
Source29: https://www.nuget.org/api/v2/package/FSharp.Data/2.2.5#/fsharp.data.2.2.5.nupkg
Source30: https://www.nuget.org/api/v2/package/FSharp.Configuration/1.3.0#/fsharp.configuration.1.3.0.nupkg
Source31: https://www.nuget.org/api/v2/package/Microsoft.Build.Utilities.Core/15.8.166#/microsoft.build.utilities.core.15.8.166.nupkg
Source32: https://www.nuget.org/api/v2/package/NUnit.Console/3.0.0#/nunit.console.3.0.0.nupkg
Source33: https://www.nuget.org/api/v2/package/NUnit3TestAdapter/3.0.8-ctp-8#/nunit3testadapter.3.0.8-ctp-8.nupkg
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: mono-devel >= 4.0.0
BuildRequires: mono-wcf >= 4.0.0
BuildRequires: mono-winfxcore >= 4.0.0
BuildRequires: msbuild
BuildRequires: nunit3
BuildRequires: dos2unix
BuildArch: noarch
# Interfaces of slightly older versions are required
%define __find_provides sh -c '/usr/lib/rpm/find-provides | sort | uniq'
%define __find_requires sh -c '/usr/lib/rpm/find-requires | sort | uniq | grep ^... | sed \\\
-e "s/mono\(System\.Collections\.Immutable\).*/mono\(System.Collections.Immutable\) = 1.2.1.0/" \\\
-e "s/mono\(System\.ValueTuple\).*/mono\(System.ValueTuple\) = 4.0.3.0/" \\\
-e "/mono\(System\.Core\) = 2\.0/d" \\\
-e "/mono\(System\.Net\) = 2\.0/d" \\\
-e "/mono\(System\.Numerics\) = 2\.0/d"'
%description
F# is a mature, open source, functional-first programming language
which empowers users and organizations to tackle complex computing
problems with simple, maintainable and robust code. It is used in
a wide range of application areas and is available across multiple
platforms.
%prep
%setup -q
rm NuGet.Config
cp %{SOURCE2} .
mkdir LocalNugetPackages
pushd LocalNugetPackages
cp %{SOURCE3} .
cp %{SOURCE4} .
cp %{SOURCE5} .
cp %{SOURCE6} .
cp %{SOURCE7} .
cp %{SOURCE8} .
cp %{SOURCE9} .
cp %{SOURCE10} .
cp %{SOURCE11} .
cp %{SOURCE12} .
cp %{SOURCE13} .
cp %{SOURCE14} .
cp %{SOURCE15} .
cp %{SOURCE16} .
cp %{SOURCE17} .
cp %{SOURCE18} .
cp %{SOURCE19} .
cp %{SOURCE20} .
cp %{SOURCE21} .
cp %{SOURCE22} .
cp %{SOURCE23} .
cp %{SOURCE24} .
cp %{SOURCE25} .
cp %{SOURCE26} .
cp %{SOURCE27} .
cp %{SOURCE28} .
cp %{SOURCE29} .
cp %{SOURCE30} .
cp %{SOURCE31} .
cp %{SOURCE32} .
cp %{SOURCE33} .
popd
%build
make %{?_smp_mflags}
%install
%make_install
# Fix script-without-shebang warnings
find %{buildroot}%{_prefix}/lib/mono -iname "*.Fsharp.Targets" -type f -print0 | xargs -0 chmod -v -x
find %{buildroot}%{_prefix}/lib/mono -iname "Fsharp.*.xml" -type f -print0 | xargs -0 chmod -v -x
find %{buildroot}%{_prefix}/lib/mono -iname "*.config" -type f -print0 | xargs -0 chmod -v -x
find %{buildroot}%{_prefix}/lib/mono -iname "*.props" -type f -print0 | xargs -0 chmod -v -x
find %{buildroot}%{_prefix}/lib/mono -iname "*.targets" -type f -print0 | xargs -0 chmod -v -x
# Fix line endings
find %{buildroot}%{_prefix}/lib/mono -iname "FSharp.Core.xml" -type f -print0 | xargs -0 dos2unix
# Fix duplicate files
%fdupes %{buildroot}%{_prefix}/lib/mono
%files
%defattr(-,root,root)
%license LICENSE License.txt
%doc README.md
%{_bindir}/fsharp*
%{_prefix}/lib/mono/fsharp/
%{_prefix}/lib/mono/Microsoft*
%{_prefix}/lib/mono/xbuild/Microsoft/VisualStudio/
%changelog