Set version to 4.0.1-preview1
[platform/core/csapi/tizenfx.git] / packaging / csapi-tizenfx.spec
1 # !! IMPORTANT !!
2 # This packaging spec file is for developer testing only.
3 # For Tizen release, the spec.in file should be used.
4
5 %define DOTNET_ASSEMBLY_PATH /usr/share/dotnet.tizen/framework
6 %define DOTNET_ASSEMBLY_DUMMY_PATH %{DOTNET_ASSEMBLY_PATH}/ref
7 %define DOTNET_ASSEMBLY_RES_PATH %{DOTNET_ASSEMBLY_PATH}/res
8 %define DOTNET_NUGET_SOURCE /nuget
9
10 %define _tizenfx_bin_path Artifacts
11
12 %define TIZEN_NET_API_VERSION 4
13 %define TIZEN_NET_NUGET_VERSION 4.0.1-preview1-99999
14 %define TIZEN_NET_INTERNAL_NUGET_VERSION 4.0.1.999
15
16 Name:       csapi-tizenfx
17 Summary:    Assemblies of Tizen .NET
18 Version:    99.99.99
19 Release:    1
20 Group:      Development/Libraries
21 License:    Apache-2.0
22 URL:        https://www.tizen.org
23 Source0:    %{name}-%{version}.tar.gz
24 Source1:    %{name}.manifest
25
26 BuildRequires: dotnet-build-tools
27
28 BuildArch: noarch
29 ExcludeArch: aarch64
30 AutoReqProv: no
31
32 Requires(post): vconf
33
34
35 %description
36 %{summary}
37
38 %package nuget
39 Summary:   NuGet package for %{name}
40 Group:     Development/Libraries
41 AutoReqProv: no
42
43 %description nuget
44 NuGet package for %{name}
45
46 %package dummy
47 Summary:   Dummy assemblies of Tizen .NET
48 Group:     Development/Libraries
49 AutoReqProv: no
50
51 %description dummy
52 Dummy assemblies of Tizen .NET
53
54 %package full
55 Summary:   All Tizen .NET assemblies
56 Group:     Development/Libraries
57 Requires:  %{name} = %{version}-%{release}
58 AutoReqProv: no
59
60 %description full
61 All Tizen .NET assemblies
62
63 %package debug
64 Summary:   All .pdb files of Tizen .NET
65 Group:     Development/Libraries
66 AutoReqProv: no
67
68 %description debug
69 All .pdb files of Tizen .NET
70
71 %package common
72 Summary:   Tizen .NET assemblies for Common profile
73 Group:     Development/Libraries
74 Requires:  %{name} = %{version}-%{release}
75 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
76 AutoReqProv: no
77
78 %description common
79 Tizen .NET assemblies for Common profile
80
81 %package mobile
82 Summary:   Tizen .NET assemblies for Mobile profile
83 Group:     Development/Libraries
84 Requires:  %{name} = %{version}-%{release}
85 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
86 AutoReqProv: no
87
88 %description mobile
89 Tizen .NET assemblies for Mobile profile
90
91 %package mobile-emul
92 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
93 Group:     Development/Libraries
94 Requires:  %{name} = %{version}-%{release}
95 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
96 AutoReqProv: no
97
98 %description mobile-emul
99 Tizen .NET assemblies for Emulator of Mobile profile
100
101 %package tv
102 Summary:   Tizen .NET assemblies for TV profile
103 Group:     Development/Libraries
104 Requires:  %{name} = %{version}-%{release}
105 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
106 AutoReqProv: no
107
108 %description tv
109 Tizen .NET assemblies for TV profile
110
111 %package ivi
112 Summary:   Tizen .NET assemblies for IVI profile
113 Group:     Development/Libraries
114 Requires:  %{name} = %{version}-%{release}
115 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
116 AutoReqProv: no
117
118 %description ivi
119 Tizen .NET assemblies for IVI profile
120
121 %package wearable
122 Summary:   Tizen .NET assemblies for Wearable profile
123 Group:     Development/Libraries
124 Requires:  %{name} = %{version}-%{release}
125 Requires:  csapi-tizenfx-dummy = %{version}-%{release}
126 AutoReqProv: no
127
128 %description wearable
129 Tizen .NET assemblies for Wearable profile
130
131 %prep
132 %setup -q
133 cp %{SOURCE1} .
134
135 %build
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 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