Build using msbuild script instead of Tizen.NET.Private.sln
[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 file in the tizen branch 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 Name:       csapi-tizenfx
13 Summary:    Assemblies of Tizen .NET
14 Version:    99.99.99
15 Release:    1
16 Group:      Development/Libraries
17 License:    Apache-2.0
18 URL:        https://www.tizen.org
19 Source0:    %{name}-%{version}.tar.gz
20 Source1:    %{name}.manifest
21
22 BuildRequires: dotnet-build-tools
23
24 BuildArch: noarch
25 AutoReqProv: no
26
27 %description
28 %{summary}
29
30 %package nuget
31 Summary:   NuGet package for %{name}
32 Group:     Development/Libraries
33 AutoReqProv: no
34
35 %description nuget
36 NuGet package for %{name}
37
38 %package dummy
39 Summary:   Dummy assemblies of Tizen .NET
40 Group:     Development/Libraries
41 AutoReqProv: no
42
43 %description dummy
44 Dummy assemblies of Tizen .NET
45
46 %package full
47 Summary:   All Tizen .NET assemblies
48 Group:     Development/Libraries
49 AutoReqProv: no
50
51 %description full
52 All Tizen .NET assemblies
53
54 %package debug
55 Summary:   All .pdb files of Tizen .NET
56 Group:     Development/Libraries
57 AutoReqProv: no
58
59 %description debug
60 All .pdb files of Tizen .NET
61
62 %package common
63 Summary:   Tizen .NET assemblies for Common profile
64 Group:     Development/Libraries
65 Requires:  csapi-tizenfx-dummy
66 AutoReqProv: no
67
68 %description common
69 Tizen .NET assemblies for Common profile
70
71 %package mobile
72 Summary:   Tizen .NET assemblies for Mobile profile
73 Group:     Development/Libraries
74 Requires:  csapi-tizenfx-dummy
75 AutoReqProv: no
76
77 %description mobile
78 Tizen .NET assemblies for Mobile profile
79
80 %package mobile-emul
81 Summary:   Tizen .NET assemblies for Emulator of Mobile profile
82 Group:     Development/Libraries
83 Requires:  csapi-tizenfx-dummy
84 AutoReqProv: no
85
86 %description mobile-emul
87 Tizen .NET assemblies for Emulator of Mobile profile
88
89 %package tv
90 Summary:   Tizen .NET assemblies for TV profile
91 Group:     Development/Libraries
92 Requires:  csapi-tizenfx-dummy
93 AutoReqProv: no
94
95 %description tv
96 Tizen .NET assemblies for TV profile
97
98 %package ivi
99 Summary:   Tizen .NET assemblies for IVI profile
100 Group:     Development/Libraries
101 Requires:  csapi-tizenfx-dummy
102 AutoReqProv: no
103
104 %description ivi
105 Tizen .NET assemblies for IVI profile
106
107 %package wearable
108 Summary:   Tizen .NET assemblies for Wearable profile
109 Group:     Development/Libraries
110 Requires:  csapi-tizenfx-dummy
111 AutoReqProv: no
112
113 %description wearable
114 Tizen .NET assemblies for Wearable profile
115
116 %prep
117 %setup -q
118 cp %{SOURCE1} .
119
120 %build
121
122 GetFileList() {
123   PROFILE=$1
124   cat pkg/PlatformFileList.txt | grep -E "#$PROFILE[[:space:]]|#$PROFILE$" | cut -d# -f1 | sed "s#^#%{DOTNET_ASSEMBLY_PATH}/#"
125 }
126
127 GetFileList common > common.filelist
128 GetFileList mobile > mobile.filelist
129 GetFileList mobile-emul > mobile-emul.filelist
130 GetFileList tv > tv.filelist
131 GetFileList ivi > ivi.filelist
132 GetFileList wearable > wearable.filelist
133
134 rm -fr %{_tizenfx_bin_path}
135 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=true
136 ./build.sh --full
137 ./build.sh --dummy
138 ./build.sh --pack
139
140 %install
141 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_PATH}
142 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
143 mkdir -p %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
144 mkdir -p %{buildroot}%{DOTNET_NUGET_SOURCE}
145
146 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
147 install -p -m 644 %{_tizenfx_bin_path}/bin/public/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
148 install -p -m 644 %{_tizenfx_bin_path}/bin/platform/*.dll %{buildroot}%{DOTNET_ASSEMBLY_PATH}
149 install -p -m 644 %{_tizenfx_bin_path}/bin/platform/*.pdb %{buildroot}%{DOTNET_ASSEMBLY_PATH}
150 install -p -m 644 %{_tizenfx_bin_path}/bin/platform/res/* %{buildroot}%{DOTNET_ASSEMBLY_RES_PATH}
151 install -p -m 644 %{_tizenfx_bin_path}/bin/dummy/*.dll %{buildroot}%{DOTNET_ASSEMBLY_DUMMY_PATH}
152 install -p -m 644 %{_tizenfx_bin_path}/*.nupkg %{buildroot}%{DOTNET_NUGET_SOURCE}
153
154 %files nuget
155 %{DOTNET_NUGET_SOURCE}/*.nupkg
156
157 %files dummy
158 %attr(644,root,root) %{DOTNET_ASSEMBLY_DUMMY_PATH}/*.dll
159
160 %files full
161 %manifest %{name}.manifest
162 %license LICENSE
163 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.dll
164 %attr(644,root,root) %{DOTNET_ASSEMBLY_RES_PATH}/*
165
166 %files debug
167 %attr(644,root,root) %{DOTNET_ASSEMBLY_PATH}/*.pdb
168
169 %files common -f common.filelist
170 %manifest %{name}.manifest
171 %license LICENSE
172
173 %files mobile -f mobile.filelist
174 %manifest %{name}.manifest
175 %license LICENSE
176
177 %files mobile-emul -f mobile-emul.filelist
178 %manifest %{name}.manifest
179 %license LICENSE
180
181 %files tv -f tv.filelist
182 %manifest %{name}.manifest
183 %license LICENSE
184
185 %files ivi -f ivi.filelist
186 %manifest %{name}.manifest
187 %license LICENSE
188
189 %files wearable -f wearable.filelist
190 %manifest %{name}.manifest
191 %license LICENSE