%{?scl:%scl_package dotnet} %{!?scl:%global pkg_name %{name}} # lldb doesn't like our nice debug information %undefine _include_minidebuginfo %global _find_debuginfo_dwz_opts %{nil} %global sdk_version 2.0.3 %global runtime_version 2.0.3 # Do not provide internal .so as standard libraries %global __provides_exclude_from ^(%{_libdir}/dotnet/.*\\.so|%{_libdir}/dotnetcore/sdk/%{sdk_version}/.*\\.so|%{_libdir}/dotnetcore/shared/Microsoft.NETCore.App/%{runtime_version}/.*)$ # Do not generate requires for libraries provided by this own package %global __requires_exclude ^(libmscordaccore.so\\(\\)\\(64bit\\)|libmscordaccore.so\\(V1.0\\)\\(64bit\\))$ Name: %{?scl_prefix}dotnet Version: %{sdk_version} Release: 4%{?dist} Summary: .NET Core is a general-purpose cross platform development platform Group: Development/Languages License: ASL 2.0 and MIT URL: https://www.microsoft.com/net/core Source0: dotnet-%{sdk_version}.tar.gz Patch0: coreclr-werror.patch Patch1: coreclr-sequential-build.patch Patch2: roslyn-verbose.patch Patch3: templates-publish-without-manifest.patch Patch4: do-not-strip-debuginfo.patch Patch5: corefx-not-portable.patch ExclusiveArch: x86_64 BuildRequires: %{?scl_prefix}clang BuildRequires: cmake BuildRequires: hostname BuildRequires: krb5-devel BuildRequires: %{?scl_prefix}libcurl-devel BuildRequires: libicu-devel BuildRequires: libuuid-devel BuildRequires: libunwind-devel BuildRequires: %{?scl_prefix}lldb-devel BuildRequires: %{?scl_prefix}llvm BuildRequires: %{?scl_prefix}lttng-ust-devel BuildRequires: openssl-devel BuildRequires: python2 BuildRequires: %{?scl_prefix}userspace-rcu-devel BuildRequires: zlib-devel Requires: %{?scl_prefix}dotnet-sdk-2.0 %description .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. %package -n %{?scl_prefix}dotnet-host Summary: Component that runs .NET Core applications or starts the SDK %{?scl:Requires: %scl_runtime} %description -n %{?scl_prefix}dotnet-host The .NET Core host is a small application that finds the right SDK to invoke or the right framework to run a .NET Core application. .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. %package -n %{?scl_prefix}dotnet-runtime-2.0 Summary: Runtime for .NET Core applications Requires: %{?scl_prefix}dotnet-host Requires: %{?scl_prefix}libcurl%{?_isa} # These libraries are dlopen'ed and not picked up automatically Requires: libicu Requires: openssl-libs %{?scl:Requires: %scl_runtime} %description -n %{?scl_prefix}dotnet-runtime-2.0 The .NET Core 2.0 runtime package contains a runtime conforming to .NET Standard 2.0, including a set of framework libraries and a Just-In-Time compiling Virtual Machine for high performance. .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. %package -n %{?scl_prefix}dotnet-sdk-2.0 Summary: A software development kit for developing .NET Core applications Requires: %{?scl_prefix}dotnet-runtime-2.0 %description -n %{?scl_prefix}dotnet-sdk-2.0 The .NET Core 2.0 SDK provides a number of command line tools to build .NET Core applications. It includes compilers for C\#, VB.NET and F\#. .NET Core is a fast, lightweight and modular platform for creating cross platform applications that work on Linux, Mac and Windows. It particularly focuses on creating console applications, web applications and micro-services. %prep %setup -q -n dotnet %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 # Increase build verbosity sed -ie "s|flp:Verbosity=normal|flp:Verbosity=diag|" src/coreclr/build.sh # Change text printed when SDK is not installed sed -ie "s|http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409|yum install %{?scl_prefix}dotnet-sdk-2.0|" src/core-setup/src/corehost/common/utils.h %build %{?scl:scl enable %scl - << \EOF} set -xe export CMAKE_PREFIX_PATH="%{_prefix}" VERBOSE=1 ./build.sh /clp:v=detailed %{?scl:EOF} %install install -dm 755 $RPM_BUILD_ROOT/%{_libdir}/%{pkg_name}/ # for debugging find bin/x64/Release/ tar xf bin/x64/Release/dotnet-sdk-%{sdk_version}-rhel.7.4-x64.tar.gz -C $RPM_BUILD_ROOT/%{_libdir}/%{pkg_name}/ install -dm 755 $RPM_BUILD_ROOT/%{_root_datadir}/bash-completion/completions # dynamic completion needs the file to be named the same as the base command install src/cli/scripts/register-completions.bash $RPM_BUILD_ROOT/%{_root_datadir}/bash-completion/completions/dotnet # TODO: this doesn't get picked up/used by zsh install -dm 755 $RPM_BUILD_ROOT/%{_root_datadir}/zsh/site-functions install src/cli/scripts/register-completions.zsh $RPM_BUILD_ROOT/%{_root_datadir}/zsh/site-functions/%{name} # for debugging find $RPM_BUILD_ROOT/%{_libdir}/%{pkg_name}/ # Upstream license files produced from build are bogus # See: https://github.com/dotnet/core-setup/issues/676 rm $RPM_BUILD_ROOT/%{_libdir}/dotnet/LICENSE.txt rm $RPM_BUILD_ROOT/%{_libdir}/dotnet/ThirdPartyNotices.txt mkdir -p $RPM_BUILD_ROOT/%{_bindir} ln -s %{_libdir}/%{pkg_name}/dotnet $RPM_BUILD_ROOT/%{_bindir}/ mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ find -type f -iname 'dotnet*\.1' -exec cp {} $RPM_BUILD_ROOT/%{_mandir}/man1/ \; %files # empty package useful for dependencies %files -n %{?scl_prefix}dotnet-host #%doc LICENSE.txt #%doc THIRD-PARTY-NOTICES.txt %dir %{_libdir}/%{pkg_name} %{_libdir}/%{pkg_name}/dotnet %{_libdir}/%{pkg_name}/host %{_bindir}/dotnet %{_mandir}/man1/dotnet.1* %files -n %{?scl_prefix}dotnet-runtime-2.0 #%doc LICENSE.TXT #%doc THIRD-PARTY-NOTICES.TXT %dir %{_libdir}/%{pkg_name}/shared %dir %{_libdir}/%{pkg_name}/shared/Microsoft.NETCore.App %{_libdir}/%{pkg_name}/shared/Microsoft.NETCore.App/%{runtime_version} %files -n %{?scl_prefix}dotnet-sdk-2.0 #%doc LICENSE.TXT #%doc THIRD-PARTY-NOTICES.TXT %dir %{_libdir}/%{pkg_name}/sdk %{_libdir}/%{pkg_name}/sdk/%{sdk_version} %{_mandir}/man1/dotnet-*.1.* # shell completions are currently only picked up from %{_root_datadir} %dir %{_root_datadir}/bash-completion %dir %{_root_datadir}/bash-completion/completions %{_root_datadir}/bash-completion/completions/dotnet %dir %{_root_datadir}/zsh %dir %{_root_datadir}/zsh/site-functions %{_root_datadir}/zsh/site-functions/%{name} %changelog * Fri Nov 10 2017 Omair Majid - 2.0.3-4 - Make corefx build non-portable, which was how it was in 2.0.0 * Thu Nov 9 2017 Omair Majid - 2.0.3-3 - Do not strip debuginfo * Thu Nov 9 2017 Omair Majid - 2.0.3-2 - Add explicit requires for libssl * Tue Oct 31 2017 Omair Majid - 2.0.3-1 - Update to .NET Core 2.0.3 * Sat Oct 28 2017 Omair Majid - 2.0.3-0.1 - Update to new drop for .NET Core 2.0.3 * Sat Aug 12 2017 Omair Majid - 2.0.0-4 - Update to new .NET Core drop * Thu Aug 10 2017 Omair Majid - 2.0.0-4 - Update to new .NET Core drop * Thu Aug 10 2017 Omair Majid - 2.0.0-3 - Update to new .NET Core drop * Fri Aug 04 2017 Omair Majid - 2.0.0-2 - Update to new .NET Core drop * Wed Aug 02 2017 Omair Majid - 2.0.0-1 - Update to final .NET Core 2.0 release * Wed Jul 19 2017 Omair Majid - 2.0.0-0.10 - Modify templates to not use the ASP.NET runtime store * Wed Jul 19 2017 Omair Majid - 2.0.0-0.9 - Use non-scl cmake to build * Fri Jun 23 2017 Omair Majid - 2.0.0-0.8 - Update to newer SDK drop - Add requires on libicu * Tue Jun 20 2017 Omair Majid - 2.0.0-0.7 - Move more stuff to prep section - Install shell completion * Wed Jun 14 2017 Omair Majid - 2.0.0-0.6 - Do not print first-run message on every dotnet invocation * Fri Jun 9 2017 Omair Majid - 2.0-0.5 - Update to latest source drop * Thu Jun 8 2017 Omair Majid - 2.0-0.4 - Minor spec file fixes - Do not depend on git * Wed Jun 7 2017 Omair Majid - 2.0.0-0.3 - Update to latest source drop. * Fri Jun 2 2017 Omair Majid - 2.0.0-0.2 - Add a meta-package for simply installing all of .NET Core * Thu May 25 2017 Omair Majid - 2.0.0-0.1 - Initial package for .NET Core 2.0