summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c983ef5358026f16ba83e4e8717f06779eeba7a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: Max Liebkies <mail@maxliebkies.de>

pkgbase=dotnet-core-preview
pkgname=('dotnet-host-preview' 'dotnet-runtime-preview' 'aspnet-runtime-preview' 'dotnet-sdk-preview')
pkgver=3.0.0+100+preview.009812
_pkgver=3.0.0+100-preview-009812
pkgrel=1
arch=('x86_64')
url='https://www.microsoft.com/net/core'
license=('MIT')
makedepends=(
  'clang' 'cmake' 'curl' 'git' 'icu' 'krb5' 'libunwind' 'lldb' 'llvm'
  'lttng-ust' 'openssl' 'zlib'
)
options=('staticlibs')
source=(
  'dotnet-source-build::git+https://github.com/dotnet/source-build.git'
  'dotnet-application-insights::git+https://github.com/Microsoft/ApplicationInsights-dotnet.git'
  'dotnet-aspnet-razor::git+https://github.com/aspnet/Razor.git'
  'dotnet-cecil::git+https://github.com/mono/cecil.git'
  'dotnet-cli::git+https://github.com/dotnet/cli.git'
  'dotnet-cli-migrate::git+https://github.com/dotnet/cli-migrate.git'
  'dotnet-clicommandlineparser::git+https://github.com/dotnet/clicommandlineparser.git'
  'dotnet-common::git+https://github.com/aspnet/common.git'
  'dotnet-core-sdk::git+https://github.com/dotnet/core-sdk.git'
  'dotnet-core-setup::git+https://github.com/dotnet/core-setup.git'
  'dotnet-coreclr::git+https://github.com/dotnet/coreclr.git'
  'dotnet-corefx::git+https://github.com/dotnet/corefx.git'
  'dotnet-fsharp::git+https://github.com/Microsoft/VisualFSharp.git'
  'dotnet-linker::git+https://github.com/mono/linker.git'
  'dotnet-msbuild::git+https://github.com/Microsoft/msbuild.git'
  'dotnet-newtonsoft-json::git+https://github.com/dseefeld/Newtonsoft.Json.git'
  'dotnet-nuget-client::git+https://github.com/NuGet/NuGet.Client.git'
  'dotnet-roslyn::git+https://github.com/dotnet/roslyn.git'
  'dotnet-roslyn-tools::git+https://github.com/dotnet/roslyn-tools.git'
  'dotnet-sdk::git+https://github.com/dotnet/sdk.git'
  'dotnet-standard::git+https://github.com/dotnet/standard.git'
  'dotnet-templating::git+https://github.com/dotnet/templating.git'
  'dotnet-toolset::git+https://github.com/dotnet/toolset.git'
  'dotnet-vstest::git+https://github.com/Microsoft/vstest.git'
  'dotnet-websdk::git+https://github.com/aspnet/websdk.git'
  'dotnet-xliff-tasks::git+https://github.com/dotnet/xliff-tasks.git'
  'https://download.visualstudio.microsoft.com/download/pr/d5460b29-cab8-43e6-b939-d150f4119e5e/b6269597f778fb9932925d50e6a0b0ed/aspnetcore-runtime-3.0.0-preview-18579-0056-linux-x64.tar.gz'
  'dotnet.sh'
  'dotnet-coreclr-rid.patch'
)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            '1efa641bba4fd458136517f31f9719130fc3c733525d98ab152dc2a9639018c1'
            'f4cb02490234b853946477f82514f0c6247b55b08b2e85fae98e99a6e6974edd'
            '2c4fc48151e5319d57c8761091709070a17da91eddc2de8a26bc32c60679bfee')

prepare() {
  cd dotnet-source-build

  for submodule in src/{application-insights,aspnet-razor,cli,cli-migrate,clicommandlineparser,common,core-sdk,core-setup,coreclr,corefx,fsharp,linker,msbuild,newtonsoft-json,nuget-client,roslyn,roslyn-tools,sdk,standard,templating,toolset,vstest,websdk,xliff-tasks}; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../dotnet-${submodule#src/}
    git submodule update
  done

  cd src/linker

  for submodule in cecil; do
    git submodule init ${submodule}
    git config submodule.${submodule}.url ../../../dotnet-${submodule}
    git submodule update
  done

  cd ../coreclr

  patch -Np1 -i "${srcdir}"/dotnet-coreclr-rid.patch
}

build() {
  cd dotnet-source-build

  export SOURCE_BUILD_SKIP_SUBMODULE_CHECK=1

  ./build.sh
}

package_dotnet-host-preview() {
  pkgdesc='A generic driver for the .NET Core Command Line Interface (preview)'
  provides=('dotnet-host')
  conflicts=('dotnet-host')

  cd dotnet-source-build/bin/x64/Release

  install -dm 755 "${pkgdir}"/{opt/dotnet,usr/share/licenses/dotnet-host}
  tar -C "${pkgdir}"/opt/dotnet -xf dotnet-sdk-${_pkgver/[0-9]\+}-linux-x64.tar.gz ./dotnet ./host
  tar -C "${pkgdir}"/usr/share/licenses/dotnet-host -xf dotnet-sdk-${_pkgver/[0-9]\+}-linux-x64.tar.gz ./LICENSE.txt ./ThirdPartyNotices.txt
  chown root:root -R "${pkgdir}"/opt/dotnet
  install -Dm 755 "${srcdir}"/dotnet.sh "${pkgdir}"/usr/bin/dotnet
}

package_dotnet-runtime-preview() {
  pkgdesc='The .NET Core runtime (preview)'
  depends=('dotnet-host-preview' 'icu' 'krb5' 'libunwind' 'openssl' 'zlib'
           'libcurl.so')
  optdepends=('lttng-ust: CoreCLR tracing')
  provides=('dotnet-runtime-3.0')
  conflicts=('dotnet-runtime-3.0')

  cd dotnet-source-build/bin/x64/Release

  install -dm 755 "${pkgdir}"/{opt/dotnet,usr/share/licenses}
  tar -C "${pkgdir}"/opt/dotnet -xf dotnet-sdk-${_pkgver/[0-9]\+}-linux-x64.tar.gz ./shared
  chown root:root -R "${pkgdir}"/opt/dotnet
  ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-runtime
}

package_aspnet-runtime-preview() {
  pkgdesc='The ASP.NET Core runtime (preview)'
  depends=('dotnet-runtime-preview')
  provides=('aspnet-runtime-3.0')
  conflicts=('aspnet-runtime-3.0')

  install -dm 755 "${pkgdir}"/{opt/dotnet/shared,usr/share/licenses}
  cp -dr --no-preserve='ownership' shared/Microsoft.AspNetCore.{All,App} "${pkgdir}"/opt/dotnet/shared/
  ln -s dotnet-host "${pkgdir}"/usr/share/licenses/aspnet-runtime
}

package_dotnet-sdk-preview() {
  pkgdesc='The .NET Core SDK (preview)'
  depends=('dotnet-runtime-preview')
  provides=('dotnet-sdk-3.0')
  conflicts=('dotnet-sdk-3.0')

  cd dotnet-source-build/bin/x64/Release

  install -dm 755 "${pkgdir}"/{opt/dotnet,usr/share/licenses}
  tar -C "${pkgdir}"/opt/dotnet -xf dotnet-sdk-${_pkgver/[0-9]\+}-linux-x64.tar.gz ./sdk
  chown root:root -R "${pkgdir}"/opt/dotnet
  ln -s dotnet-host "${pkgdir}"/usr/share/licenses/dotnet-sdk
}

# vim: ts=2 sw=2 et: