summaryrefslogtreecommitdiff
path: root/packaging/csapi-tizenfx.spec
blob: 5159b6d0fd1be50b9d6db6124a8d834d52f9faee (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
# Auto-generated from csapi-tizenfx.spec.in by makespec.sh

%define TIZEN_NET_API_VERSION 4
%define TIZEN_NET_RPM_VERSION 4.0.1.14164+nui402
%define TIZEN_NET_NUGET_VERSION 4.0.1.14164
%define TIZEN_NET_INTERNAL_NUGET_VERSION 4.0.1.14164

%define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
%define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
%define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
%define DOTNET_NUGET_SOURCE /nuget

Name:       csapi-tizenfx
Summary:    Assemblies of Tizen .NET
Version:    %{TIZEN_NET_RPM_VERSION}
Release:    1
Group:      Development/Libraries
License:    Apache-2.0
URL:        https://www.tizen.org
Source0:    %{name}-%{version}.tar.gz
Source1:    %{name}.manifest

BuildArch:   noarch
ExcludeArch: aarch64
AutoReqProv: no

BuildRequires: dotnet-build-tools
Requires(post): /usr/bin/vconftool

%description
%{summary}

%package nuget
Summary:   NuGet package for %{name}
Group:     Development/Libraries
AutoReqProv: no

%description nuget
NuGet package for %{name}

%package dummy
Summary:   Dummy assemblies of Tizen .NET
Group:     Development/Libraries
AutoReqProv: no

%description dummy
Dummy assemblies of Tizen .NET

%package full
Summary:   All Tizen .NET assemblies
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
AutoReqProv: no

%description full
All Tizen .NET assemblies

%package debug
Summary:   All .pdb files of Tizen .NET
Group:     Development/Libraries
AutoReqProv: no

%description debug
All .pdb files of Tizen .NET

%package common
Summary:   Tizen .NET assemblies for Common profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description common
Tizen .NET assemblies for Common profile

%package mobile
Summary:   Tizen .NET assemblies for Mobile profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description mobile
Tizen .NET assemblies for Mobile profile

%package mobile-emul
Summary:   Tizen .NET assemblies for Emulator of Mobile profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description mobile-emul
Tizen .NET assemblies for Emulator of Mobile profile

%package tv
Summary:   Tizen .NET assemblies for TV profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description tv
Tizen .NET assemblies for TV profile

%package ivi
Summary:   Tizen .NET assemblies for IVI profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description ivi
Tizen .NET assemblies for IVI profile

%package wearable
Summary:   Tizen .NET assemblies for Wearable profile
Group:     Development/Libraries
Requires:  %{name} = %{version}-%{release}
Requires:  csapi-tizenfx-dummy = %{version}-%{release}
AutoReqProv: no

%description wearable
Tizen .NET assemblies for Wearable profile

%prep
%setup -q
cp %{SOURCE1} .

%build
%{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}

%define _tizenfx_bin_path Artifacts

GetFileList() {
  PROFILE=$1
  cat packaging/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
}

GetFileList common > common.filelist
GetFileList mobile > mobile.filelist
GetFileList mobile-emul > mobile-emul.filelist
GetFileList tv > tv.filelist
GetFileList ivi > ivi.filelist
GetFileList wearable > wearable.filelist

rm -fr %{_tizenfx_bin_path}
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true

%define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
%{build_cmd} --full
%{build_cmd} --dummy
%{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}

%install
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}

# Install Runtime Assemblies
install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}

# Install Debug Symbols
install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}

# Install Resource files
[ -d %{_tizenfx_bin_path}/bin/public/res ] \
  && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
[ -d %{_tizenfx_bin_path}/bin/internal/res ] \
  && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}

# Install Dummy Assemblies
install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}

# Install NuGet Packages
install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}

%post
/usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f


%files
%license LICENSE

%files nuget
%{DOTNET_NUGET_SOURCE}/*.nupkg

%files dummy
%attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll

%files full
%manifest %{name}.manifest
%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
%attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*

%files debug
%attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb

%files common -f common.filelist
%manifest %{name}.manifest

%files mobile -f mobile.filelist
%manifest %{name}.manifest

%files mobile-emul -f mobile-emul.filelist
%manifest %{name}.manifest

%files tv -f tv.filelist
%manifest %{name}.manifest

%files ivi -f ivi.filelist
%manifest %{name}.manifest

%files wearable -f wearable.filelist
%manifest %{name}.manifest