File dotnet-core-buildpack.spec of Package dotnet-core-buildpack-2.3.20.1

#
# spec file for the dotnet-core buildpack
#
# 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 https://bugzilla.suse.com/
#

%define upstream_version 2.3.20

Name:           dotnet-core-buildpack
Version:        2.3.20.1
Release:        1
Summary:        Cloud Foundry buildpack for dotnet-core
License:        Apache-2.0
Group:          Cloud/Platform/scf
Url:            https://github.com/SUSE/cf-dotnet-core-buildpack
Source0:        https://github.com/SUSE/cf-dotnet-core-buildpack/archive/v%{version}.tar.gz
BuildRequires: go
BuildRequires: go-buildpack-packager

BuildRequires: bower-1.8.8

BuildRequires: dotnet-aspnetcore-2.1.22

BuildRequires: dotnet-aspnetcore-2.1.23

BuildRequires: dotnet-aspnetcore-3.1.9

BuildRequires: dotnet-aspnetcore-3.1.10

BuildRequires: dotnet-aspnetcore-5.0.0

BuildRequires: dotnet-aspnetcore-5.0.1

BuildRequires: dotnet-runtime-2.1.22

BuildRequires: dotnet-runtime-2.1.23

BuildRequires: dotnet-runtime-3.1.9

BuildRequires: dotnet-runtime-3.1.10

BuildRequires: dotnet-runtime-5.0.0

BuildRequires: dotnet-runtime-5.0.1

BuildRequires: dotnet-sdk-2.1.810

BuildRequires: dotnet-sdk-2.1.811

BuildRequires: dotnet-sdk-3.1.403

BuildRequires: dotnet-sdk-3.1.404

BuildRequires: dotnet-sdk-5.0.100

BuildRequires: dotnet-sdk-5.0.101

BuildRequires: libgdiplus-6.0

BuildRequires: libunwind-1.5

BuildRequires: node-10.23.0

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%define otherdir %{_topdir}/OTHER

%description

%prep
%setup -q -n cf-%{name}-%{upstream_version}

%build
source ./.envrc

# Starting with Go 1.11 modules
if [ -f go.mod ] && [ ! -f "vendor/modules.txt" ]; then
  # With go modules, we are building up the vendor/ folder before landing in obs
  # both for the buildpack-packager and also for the buildpack itself.
  VENDOR_GOPATH=%{_builddir}/go
  export GO111MODULE=off # Disable new behavior, needs network access
  rm -rf go.mod buildpack-packager.go
  export GOPATH=$VENDOR_GOPATH:$GOPATH
  mkdir -p $VENDOR_GOPATH/src/
  mv vendor/* $VENDOR_GOPATH/src/
  mkdir -p $VENDOR_GOPATH/src/github.com/cloudfoundry/dotnet-core-buildpack
  cp -rf src/ $VENDOR_GOPATH/src/github.com/cloudfoundry/dotnet-core-buildpack
fi

%if %_repository == "buildpacks"
buildpack-packager build -any-stack
%else
buildpack-packager build -stack %_repository
%endif

%install
%if %_repository == "buildpacks"
CHECKSUM=`sha1sum *buildpack-v%{version}.zip | cut -d' ' -f1`
mv *buildpack-v%{version}.zip %{otherdir}/dotnet-core-buildpack-v%{version}-%{release}-pre-${CHECKSUM:0:8}.zip
%else
CHECKSUM=`sha1sum *buildpack-%{_repository}-v%{version}.zip | cut -d' ' -f1`
mv *buildpack-%{_repository}-v%{version}.zip %{otherdir}/dotnet-core-buildpack-%{_repository}-v%{version}-%{release}-pre-${CHECKSUM:0:8}.zip
%endif

%post
%postun

%files
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by