[OpenTK] Move opentk to external repository (#393)
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec.in
1
2 %define TIZEN_NET_API_VERSION @api_version@
3 %define TIZEN_NET_RPM_VERSION @rpm_version@
4 %define TIZEN_NET_NUGET_VERSION @nuget_version@
5 %define TIZEN_NET_INTERNAL_NUGET_VERSION @internal_nuget_version@
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:   Dummy assemblies of Tizen .NET
42 Group:     Development/Libraries
43 AutoReqProv: no
44
45 %description dummy
46 Dummy assemblies of Tizen .NET
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 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
70 AutoReqProv: no
71
72 %description common
73 Tizen .NET assemblies for Common profile
74
75 %package mobile
76 Summary:   Tizen .NET assemblies for Mobile profile
77 Group:     Development/Libraries
78 Requires:  %{name} = %{version}-%{release}
79 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
80 AutoReqProv: no
81
82 %description mobile
83 Tizen .NET assemblies for Mobile profile
84
85 %package mobile-emul
86 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
87 Group:     Development/Libraries
88 Requires:  %{name} = %{version}-%{release}
89 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
90 AutoReqProv: no
91
92 %description mobile-emul
93 Tizen .NET assemblies for Emulator of Mobile profile
94
95 %package tv
96 Summary:   Tizen .NET assemblies for TV profile
97 Group:     Development/Libraries
98 Requires:  %{name} = %{version}-%{release}
99 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
100 AutoReqProv: no
101
102 %description tv
103 Tizen .NET assemblies for TV profile
104
105 %package ivi
106 Summary:   Tizen .NET assemblies for IVI profile
107 Group:     Development/Libraries
108 Requires:  %{name} = %{version}-%{release}
109 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
110 AutoReqProv: no
111
112 %description ivi
113 Tizen .NET assemblies for IVI profile
114
115 %package wearable
116 Summary:   Tizen .NET assemblies for Wearable profile
117 Group:     Development/Libraries
118 Requires:  %{name} = %{version}-%{release}
119 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
120 AutoReqProv: no
121
122 %description wearable
123 Tizen .NET assemblies for Wearable profile
124
125 %prep
126 %setup -q
127 cp %{SOURCE1} .
128
129 # prepare external modules
130 for ext in $(ls -1 packaging/externals.*.tar.gz); do
131   extname=$(basename -- $ext)
132   extname=${extname#externals\.}
133   extname=${extname%\.tar\.gz}
134   mkdir -p externals/$extname
135   tar xvfz $ext -C externals/$extname
136 done
137
138 %build
139 %{?asan:export ASAN_OPTIONS=use_sigaltstack=false:allow_user_segv_handler=true:handle_sigfpe=false:`cat /ASAN_OPTIONS`}
140
141 %define _tizenfx_bin_path Artifacts
142
143 GetFileList() {
144   PROFILE=$1
145   cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
146 }
147
148 GetFileList common > common.filelist
149 GetFileList mobile > mobile.filelist
150 GetFileList mobile-emul > mobile-emul.filelist
151 GetFileList tv > tv.filelist
152 GetFileList ivi > ivi.filelist
153 GetFileList wearable > wearable.filelist
154
155 rm -fr %{_tizenfx_bin_path}
156 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
157 ./build.sh --full
158 ./build.sh --dummy
159 ./build.sh --pack %{TIZEN_NET_NUGET_VERSION} %{TIZEN_NET_INTERNAL_NUGET_VERSION}
160 ./build.sh --ext
161
162 %install
163 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
164 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
165 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
166 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
167
168 # Install Runtime Assemblies
169 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
170 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
171 [ -d %{_tizenfx_bin_path}/bin/external ] \
172   && install -p -m 644 %{_tizenfx_bin_path}/bin/external/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
173
174 # Install Debug Symbols
175 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
176 install -p -m 644 %{_tizenfx_bin_path}/bin/internal/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
177 [ -d %{_tizenfx_bin_path}/bin/external ] \
178   && install -p -m 644 %{_tizenfx_bin_path}/bin/external/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
179
180 # Install Resource files
181 [ -d %{_tizenfx_bin_path}/bin/public/res ] \
182   && install -p -m 644 %{_tizenfx_bin_path}/bin/public/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
183 [ -d %{_tizenfx_bin_path}/bin/internal/res ] \
184   && install -p -m 644 %{_tizenfx_bin_path}/bin/internal/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
185
186 # Install Dummy Assemblies
187 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
188
189 # Install NuGet Packages
190 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
191
192 %post
193 /usr/bin/vconftool set -t int db/dotnet/tizen_api_version %{TIZEN_NET_API_VERSION} -f
194
195
196 %files
197 %license LICENSE
198
199 %files nuget
200 %{DOTNET_NUGET_SOURCE}/*.nupkg
201
202 %files dummy
203 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
204
205 %files full
206 %manifest %{name}.manifest
207 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
208 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
209
210 %files debug
211 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
212
213 %files common -f common.filelist
214 %manifest %{name}.manifest
215
216 %files mobile -f mobile.filelist
217 %manifest %{name}.manifest
218
219 %files mobile-emul -f mobile-emul.filelist
220 %manifest %{name}.manifest
221
222 %files tv -f tv.filelist
223 %manifest %{name}.manifest
224
225 %files ivi -f ivi.filelist
226 %manifest %{name}.manifest
227
228 %files wearable -f wearable.filelist
229 %manifest %{name}.manifest