Release 4.0.1.61
[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 4
4 %define TIZEN_NET_RPM_VERSION 4.0.1.61+nui81
5 %define TIZEN_NET_NUGET_VERSION 4.0.1-preview1-00061
6 %define TIZEN_NET_INTERNAL_NUGET_VERSION 4.0.1.61
7 %define NATIVE_DALI_VERSION 1.2.81
8 %define CHECK_NATIVE_DEPS 1
9
10 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
11 %define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
12 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
13 %define DOTNET_NUGET_SOURCE /nuget
14
15 Name:       csapi-tizenfx
16 Summary:    Assemblies of Tizen .NET
17 Version:    %{TIZEN_NET_RPM_VERSION}
18 Release:    1
19 Group:      Development/Libraries
20 License:    Apache-2.0
21 URL:        https://www.tizen.org
22 Source0:    %{name}-%{version}.tar.gz
23 Source1:    %{name}.manifest
24
25 BuildArch:   noarch
26 ExcludeArch: aarch64
27 AutoReqProv: no
28
29 BuildRequires: dotnet-build-tools
30 Requires(post): /usr/bin/vconftool
31
32 %if 0%{CHECK_NATIVE_DEPS}
33 BuildRequires: dali = %{NATIVE_DALI_VERSION}
34 %endif
35
36 %description
37 %{summary}
38
39 %package nuget
40 Summary:   NuGet package for %{name}
41 Group:     Development/Libraries
42 AutoReqProv: no
43
44 %description nuget
45 NuGet package for %{name}
46
47 %package dummy
48 Summary:   Dummy assemblies of Tizen .NET
49 Group:     Development/Libraries
50 AutoReqProv: no
51
52 %description dummy
53 Dummy assemblies of Tizen .NET
54
55 %package full
56 Summary:   All Tizen .NET assemblies
57 Group:     Development/Libraries
58 Requires:  %{name} = %{version}-%{release}
59 AutoReqProv: no
60
61 %description full
62 All Tizen .NET assemblies
63
64 %package debug
65 Summary:   All .pdb files of Tizen .NET
66 Group:     Development/Libraries
67 AutoReqProv: no
68
69 %description debug
70 All .pdb files of Tizen .NET
71
72 %package common
73 Summary:   Tizen .NET assemblies for Common profile
74 Group:     Development/Libraries
75 Requires:  %{name} = %{version}-%{release}
76 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
77 AutoReqProv: no
78
79 %description common
80 Tizen .NET assemblies for Common profile
81
82 %package mobile
83 Summary:   Tizen .NET assemblies for Mobile profile
84 Group:     Development/Libraries
85 Requires:  %{name} = %{version}-%{release}
86 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
87 AutoReqProv: no
88
89 %description mobile
90 Tizen .NET assemblies for Mobile profile
91
92 %package mobile-emul
93 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
94 Group:     Development/Libraries
95 Requires:  %{name} = %{version}-%{release}
96 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
97 AutoReqProv: no
98
99 %description mobile-emul
100 Tizen .NET assemblies for Emulator of Mobile profile
101
102 %package tv
103 Summary:   Tizen .NET assemblies for TV profile
104 Group:     Development/Libraries
105 Requires:  %{name} = %{version}-%{release}
106 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
107 AutoReqProv: no
108
109 %description tv
110 Tizen .NET assemblies for TV profile
111
112 %package ivi
113 Summary:   Tizen .NET assemblies for IVI profile
114 Group:     Development/Libraries
115 Requires:  %{name} = %{version}-%{release}
116 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
117 AutoReqProv: no
118
119 %description ivi
120 Tizen .NET assemblies for IVI profile
121
122 %package wearable
123 Summary:   Tizen .NET assemblies for Wearable profile
124 Group:     Development/Libraries
125 Requires:  %{name} = %{version}-%{release}
126 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
127 AutoReqProv: no
128
129 %description wearable
130 Tizen .NET assemblies for Wearable profile
131
132 %prep
133 %setup -q
134 cp %{SOURCE1} .
135
136 %build
137
138 %define _tizenfx_bin_path Artifacts
139
140 GetFileList() {
141   PROFILE=$1
142   cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
143 }
144
145 GetFileList common > common.filelist
146 GetFileList mobile > mobile.filelist
147 GetFileList mobile-emul > mobile-emul.filelist
148 GetFileList tv > tv.filelist
149 GetFileList ivi > ivi.filelist
150 GetFileList wearable > wearable.filelist
151
152 rm -fr %{_tizenfx_bin_path}
153 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
154 ./build.sh --full
155 ./build.sh --dummy
156 ./build.sh --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}
157
158 %install
159 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
160 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
161 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
162 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
163
164 # Install Runtime Assemblies
165 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
166 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
167
168 # Install Debug Symbols
169 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
170 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
171
172 # Install Resource files
173 [ -d %{_tizenfx_bin_path}/bin/public/res ] \
174   && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
175 [ -d %{_tizenfx_bin_path}/bin/internal/res ] \
176   && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
177
178 # Install Dummy Assemblies
179 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
180
181 # Install NuGet Packages
182 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
183
184 %post
185 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
186
187
188 %files
189 %license LICENSE
190
191 %files nuget
192 %{DOTNET_NUGET_SOURCE}/*.nupkg
193
194 %files dummy
195 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
196
197 %files full
198 %manifest %{name}.manifest
199 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
200 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
201
202 %files debug
203 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
204
205 %files common -f common.filelist
206 %manifest %{name}.manifest
207
208 %files mobile -f mobile.filelist
209 %manifest %{name}.manifest
210
211 %files mobile-emul -f mobile-emul.filelist
212 %manifest %{name}.manifest
213
214 %files tv -f tv.filelist
215 %manifest %{name}.manifest
216
217 %files ivi -f ivi.filelist
218 %manifest %{name}.manifest
219
220 %files wearable -f wearable.filelist
221 %manifest %{name}.manifest