summaryrefslogtreecommitdiff
path: root/packaging/coreclr.spec
blob: 5e43f26bdc57c63fd28ea804b2ec0a62501e6659 (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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
%{!?dotnet_buildtype: %define dotnet_buildtype Release}

%define support_test 1
%define skipnative 0
%define skipmscorlib 0
%ifarch %{ix86}
%define dotnet_buildtype Release
%endif

%define dotnet_version  2.0.0
# git rev-parse --verify HEAD
%define CORECLR_GIT_HASH  36f70fa4be4bd37d4d76d06dd2cc433ff46351bd

Name:		coreclr
Version:	2.0.0.12082
Release:	0
Summary:	Microsoft .NET Runtime, Coreclr
Group:		Development/Languages
License:	MIT
URL:		http://github.com/dotnet/coreclr
Source0:	%{name}-%{version}.tar.gz
Source1000: downloaded_files.tar.gz
Source1001: %{name}.manifest
Source1002: libicu.tar.gz
Source1003: dep_libs.tar.gz
# Gbp-Ignore-Patches: 0 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
Patch0:     0001-Add-project.assets.json-files.patch
Patch1:     0001-ARM-Linux-Support-unaligned-struct-read-write-11290.patch
Patch2:     0002-x86-Linux-Thread-safe-UMThunkMarshInfo-RunTimeInit-1.patch
Patch3:     0003-Enable-pow-for-arm-armel-in-tryrun-11703.patch
Patch4:     0004-ARM-Linux-Validate-memory-using-ldrb-instead-of-ldr.patch
Patch5:     0005-Add-skipped-testcase-on-TM1.patch
Patch6:     0006-Set-local-variables-as-addr-exposed-if-it-appears-in.patch
Patch7:     0007-Revert-unnecessary-changes.patch
Patch8:     0008-Add-skipped-testcase-superpmi.patch
Patch9:     0009-x86-Linux-Adjust-SP-in-throwing-helper-block-12504-1.patch
Patch10:     0010-Use-udf-0xff-instead-of-bkpt-0xbe-as-a-poison-13.patch
Patch11:     0011-Enable-sosplugin-on-ARM-14.patch
Patch12:     0012-Add-pie-to-linker-option-16.patch
Patch13:     0013-Revert-Add-pie-to-linker-option-16.patch
Patch14:     0014-Fix-inconsistency-between-GetHasCode-and-Equals-1351.patch
Patch15:     0015-Cherry-pick-13586.patch
Patch16:     0016-callsignalhandlerwrapper-patch.patch
Patch17:     0017-clear-cache-after-NI-reloc.patch
Patch18:     0018-Support-FEATURE_GDBJIT_FRAME-including-NI-IL_Stub.patch
Patch19:     0019-Add-profiling-support.patch
Patch20:     0020-Enable-loading-directly-ni-file-for-dotnet-launcher.patch
Patch21:     0021-Revert-Enable-loading-directly-ni-file-for-dotnet-la.patch
Patch22:     0022-Enable-loading-directly-ni-file-for-corerun-temporar.patch
Patch23:     0023-Add-Tizen-RuntimeID-case.patch
Patch24:     tizen-toolchain-support.patch
Patch25:     0024-Add-pie-to-linker-option.patch
Patch26:     0025-Fix-undefined-references-on-SOS-11701.patch
Patch27:     0026-Port-DacUnwindStackFrame-11666.patch
Patch28:     0027-Include-PAL-headers-instead-of-embedding-it-11705.patch
Patch29:     0028-added-DWARF-exprloc-for-static-value-class-fields-11.patch
Patch30:     0029-Fix-calculation-of-debuginfo-s-size.-13899.patch
Patch31:     0030-Force-O3-build-with-clang3.8.patch
Patch32:     0031-Port-to-2.0.0-Fix-ARM32-secure-delegate-bug.patch
Patch33:     0032-Disable-VSD-Stub-Kind-Prediction-on-H-W-Exception-14.patch
Patch34:     0001-Fix-assert-in-HelperMethodFrame-UpdateRegDisplay-142.patch
Patch35:     0001-Fix-clrstack-command-of-lldb-sosplugin-on-x86-13973.patch
Patch36:     0001-Fix-typo-in-SetDebuggerREGDISPLAYFromREGDISPLAY-1422.patch
Patch37:     0001-Use-addresses-without-sign-extension-in-lldb-plugin-.patch
Patch38:     0001-Fix-uaf-in-DestroyThread-function.patch
Patch39:     0001-Enable-gdbjit-while-NI-file-exist.patch
Patch40:     0001-Fix-crossgen-debug-directory-generation-problems.-12.patch
Patch41:     0001-Fix-SIGSEGV-in-EventPipe-on-Shutdown-14123.patch
Patch42:     0001-Fix-build-with-Asan-15372.patch
Patch43:     0002-Fix-asan-false-positive-errors-15563.patch
Patch44:     0003-ThrowExceptionFromContextInternal-RtlCaptureContext-.patch
Patch45:     0004-ExecuteHandlerOnOriginalStack-handle-case-when-it-is.patch
Patch46:     0001-Extract-PEImage-CreateLayoutMapped-and-PEImage-Creat.patch
Patch47:     0002-Direct-mapping-of-IL-assembly-images-that-don-t-cont.patch
Patch48:     0003-Delete-default-copy-move-constructors-and-assignment.patch
Patch49:     0004-Change-relocations-in-ngen-ed-code-with-PC-relative-.patch
Patch50:     0005-Allow-RelativePointer-SetValue-usage-for-non-DAC-bui.patch
Patch51:     0006-Remove-relocations-from-SECTION_MethodDesc-for-ngene.patch
Patch52:     0007-FIX-fix-No.1-missing-GetImplementedMDs.patch
Patch53:     0008-Fix-issues-with-RelativePointer-instead-of-RelativeF.patch
Patch54:     0009-Remove-relocations-from-SECTION_MethodDesc-for-ngene.patch
Patch55:     0010-Partially-remove-relocations-for-ModuleSection-ZapVi.patch
Patch56:     0011-FIX-fix-No.2-incorrect-m_pBeginInvokeMethod.patch
Patch57:     0012-Replace-array-type-handle-with-method-table-in-argum.patch
Patch58:     0013-Implement-JIT_NewArr1_R2R-as-R2R-wrapper-for-JIT_New.patch
Patch59:     0014-Fix-JIT_NewArr1-8-byte-alignment-for-ELEMENT_TYPE_R8.patch
Patch60:     0015-Partially-remove-relocations-from-Class-section-of-N.patch
Patch61:     0016-Fix-copying-of-FieldMarshaler-structures-in-EEClassL.patch
Patch62:     0017-Fix-alignment-of-reads-in-MD5Transform.-12800.patch
Patch63:     0018-Simplify-SHM-allocator-12815.patch
Patch64:     0019-Remove-relocations-from-SECTION_Readonly-for-fields-.patch
Patch65:     0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch
Patch66:     0021-Additional-fixes-for-RelativePointer-FixupPointer-Re.patch
Patch67:     0022-Remove-relocations-for-InterfaceInfo_t-m_pMethodTabl.patch
Patch68:     0023-Remove-relocations-for-MethodTable-m_pWriteableData-.patch
Patch69:     0024-Remove-relocations-for-MethodTable-m_pPerInstInfo-fo.patch
Patch70:     0025-Remove-relocations-for-MethodTable-s-vtable-1st-leve.patch
Patch71:     0026-Move-ITEM_DICTIONARY-and-ITEM_VTABLE_CHUNK-to-separa.patch
Patch72:     0027-Update-GUID.patch
Patch73:     0028-Review-fixes.patch
Patch74:     0029-Allocate-FileMappingImmutableData-szFileName-and-CFi.patch
Patch75:     0030-Remove-relocations-for-MethodTable-m_pParentMethodTa.patch
Patch76:     0031-Fix-build-break-with-older-VS-versions-16522.patch
Patch77:     0032-Fix-handling-of-incorrect-assemblies-on-Unix-16747.patch

ExcludeArch: aarch64

BuildRequires:  python
BuildRequires:  python-xml
# libcoreclr.so
BuildRequires:  pkgconfig(libunwind)
BuildRequires:  pkgconfig(uuid)
# System.Globalization.Native.so
BuildRequires:  libicu-devel
BuildRequires:  tizen-release
# No matter what tizen-release package you use in any profile
AutoReq: 0
Requires: glibc
Requires: libgcc
Requires: libstdc++
Requires: libunwind
Requires: libuuid

# Accelerate python, clang
%ifarch %{arm}
BuildRequires: python-accel-armv7l-cross-arm
BuildRequires: clang-accel-armv7l-cross-arm
%endif

%ifarch aarch64
BuildRequires: python-accel-aarch64-cross-aarch64
BuildRequires: clang-accel-aarch64-cross-aarch64
%endif

%if 0%{skipnative}
%else
BuildRequires:  cmake
BuildRequires:  llvm >= 3.8
BuildRequires:  llvm-devel >= 3.8
BuildRequires:  clang >= 3.8
BuildRequires:  clang-devel >= 3.8
BuildRequires:  lldb >= 3.8
BuildRequires:  lldb-devel >= 3.8
BuildRequires:  gettext-tools
BuildRequires:  libopenssl-devel
# C include headers
BuildRequires:  libstdc++-devel
BuildRequires:  pkgconfig(lttng-ust)
%endif

%if 0%{skipmscorlib}
%else
%ifarch %{arm}
BuildRequires:  patchelf
%endif
%ifarch %{ix86}
BuildRequires:  patchelf
BuildRequires:  glibc-64bit
BuildRequires:  libgcc-64bit
BuildRequires:  libstdc++-64bit
BuildRequires:  libunwind-64bit
BuildRequires:  libuuid-64bit
BuildRequires:  zlib-64bit
BuildRequires:  libopenssl-64bit
%if 0%{?asan}
BuildRequires:  libasan-64bit
%endif
%endif
%endif

%description
The CoreCLR repo contains the complete runtime implementation for .NET Core. It includes RyuJIT, the .NET GC, native interop and many other components. It is cross-platform, with multiple OS and CPU ports in progress.

%package extra
Summary:	Dotnet Core Extra Files
Requires:	coreclr

%description extra
Libsosplugin and others

%package test
Summary:    Dotnet Core Unit Test
Requires:    coreclr

%description test
Unit Test objs

%package devel
Summary:    Dotnet Core Development package
Requires:   coreclr

%description devel
Headers and static libraries

%package -n mscorlib
Summary:	Core Library for MS .NET
Requires:	coreclr

%description -n mscorlib
The MSCORLIB.DLL for .NET Core Runtime (coreclr)

%prep
%setup -q -n %{name}-%{version}
cp %{SOURCE1001} .
# Gbp-Patch-Macros
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch20 -p1
%patch21 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch34 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch56 -p1
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch69 -p1
%patch70 -p1
%patch71 -p1
%patch72 -p1
%patch73 -p1
%patch74 -p1
%patch75 -p1
%patch76 -p1
%patch77 -p1

%if 0%{skipmscorlib}
%else
cp %{SOURCE1000} ./
tar xf %{SOURCE1000}
%ifarch %{arm} %{ix86}
%setup -T -D -a 1002
%setup -T -D -a 1003
%ifarch %{arm}
# Detect interpreter name from cross-gcc
LD_INTERPRETER=$(patchelf --print-interpreter /emul/usr/bin/gcc)
LD_RPATH=$(patchelf --print-rpath /emul/usr/bin/gcc)
for file in $( find ./Tools -name "dotnet" )
do
    patchelf --set-interpreter ${LD_INTERPRETER} ${file}
    patchelf --set-rpath ${LD_RPATH}:%{_builddir}/%{name}-%{version}/libicu/ ${file}
done
for file in $( find ./Tools ./libicu -iname "*.so" -or -iname "*.so.*" )
do
    patchelf --set-rpath ${LD_RPATH}:%{_builddir}/%{name}-%{version}/libicu/ ${file}
done
%endif
%ifarch %{ix86}
for file in $( find ./Tools ./libicu -iname "*.so" -or -iname "*.so.*" )
do
    patchelf --set-rpath %{_builddir}/%{name}-%{version}/libicu/ ${file}
done
%endif
%endif
%endif

%build
# disable asan build when global forced asan build
%{?asan:export ASAN_OPTIONS=use_sigaltstack=false:`cat /ASAN_OPTIONS`}
%{?asan:/usr/bin/gcc-unforce-options}
%{?asan:export LD_LIBRARY_PATH=`pwd`/libicu}

export CFLAGS=" --target=%{_host} "
export CXXFLAGS=" --target=%{_host} "

%ifarch x86_64
# Even though build architectur is x86_64, it will be running on arm board.
# So we need to pass the arch argument as arm.
%define _barch  %{?cross:%{cross}}%{!?cross:x64}
%else
%ifarch aarch64
%define _barch  arm64
%else
%ifarch %{ix86}
%define _barch  x86
export CLANG_NO_LIBDIR_SUFFIX=1
export CFLAGS=$(echo $CFLAGS | sed -e 's/--target=i686/--target=i586/')
export CXXFLAGS=$(echo $CXXFLAGS | sed -e 's/--target=i686/--target=i586/')
%else
%ifarch %{arm}
%define _barch  armel
export CLANG_NO_LIBDIR_SUFFIX=1
%else

%endif
%endif
%endif
%endif

%define _buildtype  %{dotnet_buildtype}
%define _reldir     bin/Product/Linux.%{_barch}.%{_buildtype}
%define _paldebug   0

%if 0%{support_test}
%define testopt ''
%else
%define testopt 'skiptests'
%endif

%if 0%{_paldebug}
export PAL_DBG_CHANNELS="+all.all"
export PAL_DBG_CHANNELS="+PAL.TRACE:-FILE.ERROR"
export PAL_API_TRACING="pal.log"
%else
export PAL_DBG_CHANNELS=""
%endif

%ifarch %{arm}
# for armoring request from PM group
# FIXME1: If you find better solution like CMAKE_CXX_FLAGS, please fix this
# FIXME2: This patch does not work on non-arm archtecture
%if %{dotnet_buildtype} == "Release"
export CXXFLAGS+="-fstack-protector-strong -D_FORTIFY_SOURCE=2"
%else
export CXXFLAGS+="-fstack-protector-strong"
%endif
%endif

%if 0%{skipmscorlib}
%if 0%{skipnative}
# No build native and mscorlib.
%else
# Build native only.
./build.sh %{_barch} %{_buildtype} clang3.8 skipmscorlib skipgenerateversion skipnuget %{testopt} cmakeargs "-DFEATURE_GDBJIT=TRUE -DFEATURE_DBGIPC=0 -DFEATURE_NI_BIND_FALLBACK=false -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,relro -DCMAKE_EXE_LINKER_FLAGS=-Wl,-z,relro"
%endif
%else
%if 0%{skipnative}
# Build mscorlib only.
./build.sh %{_barch} %{_buildtype} -skiprestore skipnative skipnuget %{testopt}
%else
# Build native and mscorlib.
./build.sh %{_barch} %{_buildtype} clang3.8 skipgenerateversion -skiprestore skipnuget %{testopt} cmakeargs "-DFEATURE_GDBJIT=TRUE -DFEATURE_DBGIPC=0 -DFEATURE_NI_BIND_FALLBACK=false -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_SHARED_LINKER_FLAGS=-Wl,-z,relro -DCMAKE_EXE_LINKER_FLAGS=-Wl,-z,relro"
%endif
%endif

echo %{CORECLR_GIT_HASH} > .clrinfo

%install
# .NET Core Runtime
%define dotnetdir       dotnet
%define netshareddir    %{dotnetdir}/shared
%define netcoreappdir   %{netshareddir}/Microsoft.NETCore.App/%{dotnet_version}
mkdir -p %{buildroot}%{_datadir}/%{netcoreappdir}

# .NET Tizen Runtime
%define dotnettizendir  dotnet.tizen
%define dotnetfwdir     %{dotnettizendir}/framework
%define dotnettestdir   %{dotnettizendir}/test
mkdir -p %{buildroot}%{_datadir}/%{dotnettizendir}
mkdir -p %{buildroot}%{_datadir}/%{dotnetfwdir}
mkdir -p %{buildroot}%{_datadir}/%{dotnettestdir}

# .NET & Mono CoreOverlay
%define tizennetdir     tizen.net
mkdir -p %{buildroot}%{_datadir}/%{tizennetdir}

%if 0%{skipnative}
%else
cp %{_reldir}/corerun   %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libclrjit.so  %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libcoreclr.so %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libdbgshim.so %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libmscordaccore.so  %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libmscordbi.so  %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libsos.so   %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libsosplugin.so %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/libcoreclrtraceptprovider.so %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/System.Globalization.Native.so  %{buildroot}%{_datadir}/%{netcoreappdir}
ln -sf ../%{netcoreappdir}/corerun    %{buildroot}%{_datadir}/%{dotnetdir}/corerun

# .NET Core Headers and static libraries
mkdir -p %{buildroot}%{_datadir}/%{netcoreappdir}/src/pal/src/
cp -rf %{_reldir}/inc %{buildroot}%{_datadir}/%{netcoreappdir}/
cp -rf src/inc %{buildroot}%{_datadir}/%{netcoreappdir}/src/
cp -rf src/pal/inc %{buildroot}%{_datadir}/%{netcoreappdir}/src/pal/
cp -rf %{_reldir}/lib %{buildroot}%{_datadir}/%{netcoreappdir}
cp -rf src/pal/src/include %{buildroot}%{_datadir}/%{netcoreappdir}/src/pal/src

# make link for .NET CoreOverlay
ln -sf ../%{netcoreappdir}/corerun          %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libclrjit.so     %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libcoreclr.so    %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libdbgshim.so    %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libmscordaccore.so %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libmscordbi.so   %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libsos.so        %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libsosplugin.so  %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/libcoreclrtraceptprovider.so  %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/System.Globalization.Native.so %{buildroot}%{_datadir}/%{tizennetdir}

# extra
cp %{_reldir}/coreconsole %{buildroot}%{_datadir}/%{dotnetfwdir}
cp %{_reldir}/crossgen    %{buildroot}%{_datadir}/%{dotnetfwdir}

# devel
cp %{_reldir}/ilasm   %{buildroot}%{_datadir}/%{dotnetfwdir}
cp %{_reldir}/ildasm    %{buildroot}%{_datadir}/%{dotnetfwdir}

# test
cp -rf bin/obj/Linux.%{_barch}.%{_buildtype}/tests/src %{buildroot}%{_datadir}/%{dotnettestdir}

# info
cp -rf .clrinfo %{buildroot}%{_datadir}/%{tizennetdir}
%endif

%if 0%{skipmscorlib}
%else
cp %{_reldir}/System.Private.CoreLib.dll  %{buildroot}%{_datadir}/%{netcoreappdir}
cp %{_reldir}/SOS.NETCore.dll  %{buildroot}%{_datadir}/%{netcoreappdir}

# make link for .NET CoreOverlay
ln -sf ../%{netcoreappdir}/System.Private.CoreLib.dll     %{buildroot}%{_datadir}/%{tizennetdir}
ln -sf ../%{netcoreappdir}/SOS.NETCore.dll     %{buildroot}%{_datadir}/%{tizennetdir}
%endif

%if 0%{skipnative}
%else
%files
%manifest %{name}.manifest
%dir %{_datadir}/%{dotnetdir}
%dir %{_datadir}/%{netcoreappdir}
%dir %{_datadir}/%{tizennetdir}
%{_datadir}/%{netcoreappdir}/corerun
%{_datadir}/%{netcoreappdir}/*.so
%{_datadir}/%{tizennetdir}/*
%{_datadir}/%{tizennetdir}/.clrinfo
%{_datadir}/%{dotnetdir}/corerun

%files extra
%manifest %{name}.manifest
%dir %{_datadir}/%{dotnetfwdir}
%{_datadir}/%{dotnetfwdir}/coreconsole
%{_datadir}/%{dotnetfwdir}/crossgen

%files test
%manifest %{name}.manifest
%dir %{_datadir}/%{dotnettestdir}
%{_datadir}/%{dotnettestdir}/*

%files devel
%manifest %{name}.manifest
%dir %{_datadir}/%{netcoreappdir}/inc
%dir %{_datadir}/%{netcoreappdir}/lib
%dir %{_datadir}/%{netcoreappdir}/src
%dir %{_datadir}/%{dotnetfwdir}
%{_datadir}/%{netcoreappdir}/inc/*
%{_datadir}/%{netcoreappdir}/lib/*
%{_datadir}/%{netcoreappdir}/src/*
%{_datadir}/%{dotnetfwdir}/ilasm
%{_datadir}/%{dotnetfwdir}/ildasm
%endif

%if 0%{skipmscorlib}
%else
%files -n mscorlib
%manifest %{name}.manifest
%{_datadir}/%{netcoreappdir}/*.dll
%{_datadir}/%{tizennetdir}/*.dll
%endif

%changelog
* Fri Jan 22 2016 MyungJoo Ham <myungjoo.ham@samsung.com> - 0.0.1-1
- Initial spec file for corerun