File msbuild-libhostfxr.spec of Package msbuild-libhostfxr

#
# spec file for package msbuild-libhostfxr
#
# Copyright (c) 2016 Xamarin, Inc (http://www.xamarin.com)
#
# 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.

Name:           msbuild-libhostfxr
Version:        3.0.0.2019.04.16.02.13
Release:        0
Summary:        Build system for .NET projects - unmanaged helper library
License:        MIT
Group:          Development/Libraries/Other
Url:            https://github.com/dotnet/core-setup
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        core-setup-%{version}.tar.xz
Patch0:         avoid_cmake_unknown_command.patch
Patch1:         a-gcc-is-fine-too.patch
Patch2:         no-hostpolicy.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++

%description
The Microsoft Build Engine is a platform for building applications.
This engine, which is also known as MSBuild, provides an XML schema
for a project file that controls how the build platform processes
and builds software. Visual Studio uses MSBuild, but MSBuild does
not depend on Visual Studio. By invoking msbuild.exe on your
project or solution file, you can orchestrate and build products
in environments where Visual Studio isn't installed. This package
contains unmanaged components for msbuild-sdkresolver

%prep
%setup -q -n core-setup-3.0.0
%patch0 -p1
%patch1 -p1
%patch2 -p1

%build
%{?exp_env}
%{?env_options}

%ifarch x86_64
%define arch x64
%endif

%ifarch i586
%define arch x86
%endif

%ifarch armv7l
%define arch arm
%endif

cd src/corehost && ./build.sh --configuration Debug --arch %arch --commithash ee54d4cbd2b305eadf6f341bdc9d4abccdb50559 --policyver 3.0.0-preview4-27615-73 --fxrver 3.0.0-preview4-27615-73 --apphostver 3.0.0-preview4-27615-73 --hostver 3.0.0-preview4-27615-73 -portable

%install
%{?env_options}
mkdir -p %{buildroot}/%{_prefix}/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
cp bin/linux-%arch.Debug/corehost/libhostfxr.so %{buildroot}/%{_prefix}/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/

%files
%defattr(-,root,root)
%dir %{_prefix}/lib/mono/
%dir %{_prefix}/lib/mono/msbuild/
%dir %{_prefix}/lib/mono/msbuild/Current/
%dir %{_prefix}/lib/mono/msbuild/Current/bin/
%dir %{_prefix}/lib/mono/msbuild/Current/bin/SdkResolvers/
%dir %{_prefix}/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/
%{_prefix}/lib/mono/msbuild/Current/bin/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/*
openSUSE Build Service is sponsored by