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