Blame SPECS/dotnet.spec

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