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