Release 8.0.0.15467
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec
1 # Auto-generated from csapi-tizenfx.spec.in by makespec.sh
2
3 %define TIZEN_NET_API_VERSION 8
4 %define TIZEN_NET_RPM_VERSION 8.0.0.15467+nui21922
5 %define TIZEN_NET_NUGET_VERSION 8.0.0.15467
6
7 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
8 %define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
9 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
10 %define DOTNET_TOOLS_PATH /usr/share/dotnet.tizen/tools
11 %define DOTNET_PRELOAD_PATH /usr/share/dotnet.tizen/preload
12 %define DOTNET_NUGET_SOURCE /nuget
13
14 %define TIZEN_NET_RUNTIME_IDENTIFIERS 4.0.0:5.0.0:5.5.0:6.0.0
15
16 Name:       csapi-tizenfx
17 Summary:    Assemblies of Tizen .NET
18 Version:    %{TIZEN_NET_RPM_VERSION}
19 Release:    1
20 Group:      Development/Libraries
21 License:    Apache-2.0 and MIT
22 URL:        https://www.tizen.org
23 Source0:    %{name}-%{version}.tar.gz
24 Source1:    %{name}.manifest
25
26 BuildArch:   noarch
27 ExcludeArch: aarch64
28 AutoReqProv: no
29
30 BuildRequires: dotnet-build-tools
31 Requires(post): /usr/bin/vconftool
32
33 # BuildRequires for StructValidator
34 %if %{defined enable_struct_test}
35 BuildRequires: coregl
36 BuildRequires: pkgconfig(elementary)
37 BuildRequires: pkgconfig(efl-extension)
38 BuildRequires: pkgconfig(capi-media-camera)
39 BuildRequires: pkgconfig(rua)
40 BuildRequires: pkgconfig(component-based-core-base)
41 BuildRequires: pkgconfig(notification)
42 BuildRequires: pkgconfig(capi-appfw-service-application)
43 BuildRequires: pkgconfig(capi-appfw-application)
44 BuildRequires: pkgconfig(capi-appfw-widget-application)
45 BuildRequires: pkgconfig(data-control)
46 BuildRequires: pkgconfig(capi-location-manager)
47 BuildRequires: pkgconfig(capi-media-vision)
48 BuildRequires: pkgconfig(capi-network-bluetooth)
49 BuildRequires: pkgconfig(capi-network-wifi-direct)
50 BuildRequires: pkgconfig(key-manager)
51 BuildRequires: pkgconfig(capi-system-sensor)
52 BuildRequires: pkgconfig(capi-system-runtime-info)
53 BuildRequires: pkgconfig(capi-ui-inputmethod)
54 BuildRequires: pkgconfig(stt-engine)
55 BuildRequires: pkgconfig(tts-engine)
56 BuildRequires: pkgconfig(chromium-efl)
57 %if "%{profile}" == "tv"
58 BuildRequires: pkgconfig(trustzone-nwd)
59 %else
60 BuildRequires: pkgconfig(capi-appfw-watch-application)
61 BuildRequires: pkgconfig(capi-telephony)
62 BuildRequires: pkgconfig(tef-libteec)
63 %endif
64 %endif
65
66 %description
67 %{summary}
68
69 %package nuget
70 Summary:   NuGet package for %{name}
71 Group:     Development/Libraries
72 AutoReqProv: no
73
74 %description nuget
75 NuGet package for %{name}
76
77 %package tools
78 Summary:   Tools for TizenFX
79 Group:     Development/Libraries
80 AutoReqProv: no
81
82 %description tools
83 Tools for TizenFX
84
85 %package full
86 Summary:   All Tizen .NET assemblies
87 Group:     Development/Libraries
88 Requires:  %{name} = %{version}-%{release}
89 AutoReqProv: no
90
91 %description full
92 All Tizen .NET assemblies
93
94 %package debug
95 Summary:   All .pdb files of Tizen .NET
96 Group:     Development/Libraries
97 AutoReqProv: no
98
99 %description debug
100 All .pdb files of Tizen .NET
101
102 %package mobile
103 Summary:   Tizen .NET assemblies for Mobile profile
104 Group:     Development/Libraries
105 Requires:  %{name} = %{version}-%{release}
106 AutoReqProv: no
107
108 %description mobile
109 Tizen .NET assemblies for Mobile profile
110
111 %package tv
112 Summary:   Tizen .NET assemblies for TV profile
113 Group:     Development/Libraries
114 Requires:  %{name} = %{version}-%{release}
115 AutoReqProv: no
116
117 %description tv
118 Tizen .NET assemblies for TV profile
119
120 %package wearable
121 Summary:   Tizen .NET assemblies for Wearable profile
122 Group:     Development/Libraries
123 Requires:  %{name} = %{version}-%{release}
124 AutoReqProv: no
125
126 %description wearable
127 Tizen .NET assemblies for Wearable profile
128
129 %prep
130 %setup -q
131 cp %{SOURCE1} .
132
133 %build
134
135 # configure for ASAN
136 %{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
137
138 # prepare for build
139 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
140 %define build_cmd ./tools/scripts/retry.sh ./tools/scripts/timeout.sh -t 600 ./build.sh
141
142 # build full assemblies
143 %if %{defined profile}
144 %{build_cmd} --full /p:BuildProfile=%{profile}
145 %else
146 %{build_cmd} --full
147 %endif
148
149 # pack nuget package
150 %{build_cmd} --pack %{TIZEN_NET_NUGET_VERSION}
151
152 # check validation of struct size
153 %if %{defined enable_struct_test}
154 dotnet validate-struct Artifacts/bin/public || echo "
155     #######################################################
156     ##################### W A R N I N G ###################
157     #######################################################
158     # The sturct size mismatches MUST BE FIXED.           #
159     # It will make building errors later                  #
160     #######################################################
161 "
162 %endif
163
164
165 %install
166 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
167 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
168 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
169 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
170 mkdir -p %{buildroot}%{DOTNET_TOOLS_PATH}
171 mkdir -p %{buildroot}%{DOTNET_PRELOAD_PATH}
172
173 # Install Runtime Assemblies
174 install -p -m 644 Artifacts/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
175 install -p -m 644 Artifacts/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
176
177 # Install Debug Symbols
178 install -p -m 644 Artifacts/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
179 install -p -m 644 Artifacts/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
180
181 # Install Resource files
182 [ -d Artifacts/bin/public/res ] \
183   && cp -fr Artifacts/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
184 [ -d Artifacts/bin/internal/res ] \
185   && cp -fr Artifacts/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
186
187 # Install Dummy Assemblies
188 install -p -m 644 Artifacts/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
189
190 # Install Preload
191 install -p -m 644 Artifacts/preload/*.preload %{buildroot}%{DOTNET_PRELOAD_PATH}
192
193 # Install NuGet Packages
194 install -p -m 644 Artifacts/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
195 install -p -m 644 packaging/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
196
197 # Install Tools
198 install -p -m 644 tools/bin/* %{buildroot}%{DOTNET_TOOLS_PATH}
199
200
201 %post
202 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
203 /usr/bin/vconftool set -t string db/dotnet/tizen_api_path %{DOTNET_ASSEMBLY_PATH} -f
204 /usr/bin/vconftool set -t string db/dotnet/tizen_rid_version %{TIZEN_NET_RUNTIME_IDENTIFIERS} -f
205
206 %files
207 %license LICENSE
208 %license LICENSE.MIT
209
210 %files nuget
211 %{DOTNET_NUGET_SOURCE}/*.nupkg
212
213 %files tools
214 %manifest %{name}.manifest
215 %{DOTNET_TOOLS_PATH}/*
216
217 %files full
218 %manifest %{name}.manifest
219 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
220 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
221 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
222 %attr(644,root,root) %{DOTNET_PRELOAD_PATH}/*
223
224 %files debug
225 %manifest %{name}.manifest
226 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
227
228 %files mobile -f Artifacts/mobile.filelist
229 %manifest %{name}.manifest
230
231 %files tv -f Artifacts/tv.filelist
232 %manifest %{name}.manifest
233
234 %files wearable -f Artifacts/wearable.filelist
235 %manifest %{name}.manifest