summaryrefslogtreecommitdiff
path: root/packaging/tizen-release.spec
blob: 9bdd75fcf0278f8e38e3f82e037698c783a7efa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
Name:           tizen-release
Version:        8.0.0
Release:        0
License:        Apache-2.0
Summary:        Tizen release files
Url:            http://www.tizen.com
Group:          System/Base
Provides:       system-release = %{version}
Provides:       tizen-release = %{version}
Provides:       product()
Provides:       product(Tizen) = %{version}
BuildRequires:  sed
Requires:       %{name}-compat = %{version}-%{release}
Recommends:     %{name}-profile_common = %{version}-%{release}
Source1001:     LICENSE.APLv2

#HACK
Provides:       lsb = 4.1

%description
Tizen release files such as various /etc/ files that define the release.

%package profile_common
Summary:        tizen-release configuration for common profile
License:        Apache-2.0
Provides:       %{name}-compat = %{version}-%{release}
Conflicts:      %{name}-profile_mobile
Conflicts:      %{name}-profile_wearable
Conflicts:      %{name}-profile_tv
Conflicts:      %{name}-profile_ivi
%description profile_common
Tizen release files specific for common profile.
You need to install %{name} after this.

%package profile_mobile
Summary:        tizen-release configuration for mobile profile
License:        Apache-2.0
Provides:       %{name}-compat = %{version}-%{release}
Conflicts:      %{name}-profile_common
Conflicts:      %{name}-profile_wearable
Conflicts:      %{name}-profile_tv
Conflicts:      %{name}-profile_ivi
%description profile_mobile
Tizen release files specific for mobile profile.
You need to install %{name} after this.

%package profile_wearable
Summary:        tizen-release configuration for wearable profile
License:        Apache-2.0
Provides:       %{name}-compat = %{version}-%{release}
Conflicts:      %{name}-profile_mobile
Conflicts:      %{name}-profile_common
Conflicts:      %{name}-profile_tv
Conflicts:      %{name}-profile_ivi
%description profile_wearable
Tizen release files specific for wearable profile.
You need to install %{name} after this.

%package profile_tv
Summary:        tizen-release configuration for tv profile
License:        Apache-2.0
Provides:       %{name}-compat = %{version}-%{release}
Conflicts:      %{name}-profile_mobile
Conflicts:      %{name}-profile_wearable
Conflicts:      %{name}-profile_common
Conflicts:      %{name}-profile_ivi
%description profile_tv
Tizen release files specific for tv profile.
You need to install %{name} after this.

%package profile_ivi
Summary:        tizen-release configuration for ivi profile
License:        Apache-2.0
Provides:       %{name}-compat = %{version}-%{release}
Conflicts:      %{name}-profile_mobile
Conflicts:      %{name}-profile_wearable
Conflicts:      %{name}-profile_tv
Conflicts:      %{name}-profile_common
%description profile_ivi
Tizen release files specific for ivi profile.
You need to install %{name} after this.


%prep

%define release_type_default eng

%if z%{?tizen_build_devel_mode} == z && z%{?tizen_build_binary_release_type_eng} == z
	%define release_type %release_type_default
%else
	%if 0%{?tizen_build_devel_mode} == 1 || 0%{?tizen_build_devel_mode} == 1
		%define release_type %release_type_default
	%else
		%define release_type user
	%endif
%endif

%define build_variant_default NONE
%define build_variant %{?tizen_build_variant}%{?!tizen_build_variant:%{build_variant_default}}
cp %{SOURCE1001} .

%build

%install

%ifarch  %{ix86}
%define _tarch ia32
%else
%define _tarch %{_arch}
%endif

install -d %{buildroot}/etc
cat > %{buildroot}%{_sysconfdir}/tizen-release <<EOF
%{release_name} %{tizen_full_version} (%{_arch})
VERSION = %{tizen_full_version}
CODENAME = TSEVENDF
EOF

ln -s tizen-release %{buildroot}%{_sysconfdir}/system-release

cat > %{buildroot}%{_sysconfdir}/os-release <<EOF
NAME=Tizen
VERSION="%{tizen_full_version} (%{release_name})"
ID=tizen
VERSION_ID=%{tizen_full_version}
PRETTY_NAME="Tizen %{tizen_full_version} (%{release_name})"
ANSI_COLOR="0;36"
CPE_NAME="cpe:/o:tizen:tizen:%{tizen_full_version}"
EOF

mkdir -p %{buildroot}%{_sysconfdir}/products.d
cat >%{buildroot}%{_sysconfdir}/products.d/tizen.prod.proto << EOF
<?xml version="1.0" encoding="UTF-8"?>
<product schemeversion="0">
  <vendor>Tizen.org</vendor>
  <name>Tizen</name>
  <version>%{tizen_full_version}</version>
  <release>%{release_name}</release>
  <arch>%{_target_cpu}</arch>
  <productline>Tizen</productline>
  <register>
    <target>tizen-%{tizen_full_version}-%{_target_cpu}</target>
    <release></release>
    <repositories>
    </repositories>
  </register>
  <updaterepokey>000000000</updaterepokey>
  <summary>Tizen</summary>
  <description>Tizen</description>
  <linguas>
    <language>cs</language>
    <language>da</language>
    <language>de</language>
    <language>en</language>
    <language>en_GB</language>
    <language>en_US</language>
    <language>es</language>
    <language>fi</language>
    <language>fr</language>
    <language>hu</language>
    <language>it</language>
    <language>ja</language>
    <language>nb</language>
    <language>nl</language>
    <language>pl</language>
    <language>pt</language>
    <language>pt_BR</language>
    <language>ru</language>
    <language>sv</language>
    <language>zh</language>
    <language>zh_CN</language>
    <language>zh_TW</language>
  </linguas>
  <urls>
    <url name="releasenotes">http://www.tizen.org</url>
    <url name="register">http://www.tizen.org/</url>
    <url name="repository">https://download.tizen.org/snapshots/tizen/__PROFILEMACRO__/latest/repos/%{_repository}/packages/%{_tarch}/</url>
  </urls>
  <buildconfig>
    <producttheme>Tizen</producttheme>
    <betaversion></betaversion>
  </buildconfig>
  <installconfig>
    <defaultlang>en_US</defaultlang>
    <releasepackage name="tizen-release" flag="EQ" version="%{tizen_full_version}" release="%{release}" />
    <distribution>Tizen</distribution>
  </installconfig>
  <runtimeconfig />
</product>

EOF

pushd %{buildroot}%{_sysconfdir}/products.d
for P in mobile wearable tv ivi common; do sed "s|__PROFILEMACRO__|$P|" < tizen.prod.proto > tizen.prod.$P; done
rm tizen.prod.proto
popd

# this is a base product, create symlink
ln -s tizen.prod %{buildroot}%{_sysconfdir}/products.d/baseproduct


# generate tizen-build.conf


cat > %{buildroot}%{_sysconfdir}/tizen-build.conf.proto <<'EOF'
TZ_BUILD_RELEASE_NAME="%{release_name}"
TZ_BUILD_VERSION=%{tizen_version}
TZ_BUILD_FULLVER=%{tizen_full_version}
TZ_BUILD_RELEASE_TYPE=%{release_type}
TZ_BUILD_VARIANT=%{build_variant}

TZ_BUILD_PROFILE=__PROFILEMACRO__
TZ_BUILD_PROJECT=%{_project}
%{?asan:TZ_BUILD_REF_PROJECT=%{_ref_project}}
TZ_BUILD_VENDOR=%{vendor}
TZ_BUILD_REPO=%{_repository}
TZ_BUILD_ARCH=%{_arch}

TZ_BUILD_ID=@BUILD_ID@
TZ_BUILD_DATE=@BUILD_DATE@
TZ_BUILD_TIME=@BUILD_TIME@
TZ_BUILD_TS=@BUILD_TS@

TZ_BUILD_URL=http://download.tizen.org
TZ_BUILD_SNAPSHOT_URL=${TZ_BUILD_URL}/snapshots/tizen/__PROFILEMACRO__/
TZ_BUILD_DAILY_URL=${TZ_BUILD_URL}/releases/daily/tizen/__PROFILEMACRO__/
TZ_BUILD_WEEKLY_URL=${TZ_BUILD_URL}/releases/weekly/tizen/__PROFILEMACRO__/
TZ_BUILD_MILESTONE_URL=${TZ_BUILD_URL}/releases/milestone/tizen/__PROFILEMACRO__/

TZ_BUILD_WITH_MESA=%{?_with_mesa}
TZ_BUILD_WITH_WAYLAND=%{?_with_wayland}
TZ_BUILD_WITH_RDP=%{?_with_rdp}
TZ_BUILD_WITH_X=%{?_with_x}

EOF

pushd %{buildroot}%{_sysconfdir}
for P in mobile wearable tv ivi common; do sed "s|__PROFILEMACRO__|$P|" < tizen-build.conf.proto > tizen-build.conf.$P; done
rm tizen-build.conf.proto
popd

%files
%config %attr(0644,root,root) %{_sysconfdir}/tizen-release
%config %attr(0644,root,root) %{_sysconfdir}/os-release
%license LICENSE.APLv2
%{_sysconfdir}/system-release
%{_sysconfdir}/products.d/baseproduct

%post profile_common
ln -sf tizen.prod.common %{_sysconfdir}/products.d/tizen.prod
ln -sf tizen-build.conf.common %{_sysconfdir}/tizen-build.conf
%preun profile_common
rm %{_sysconfdir}/products.d/tizen.prod
rm %{_sysconfdir}/tizen-build.conf
%files profile_common
%license LICENSE.APLv2
%{_sysconfdir}/products.d/tizen.prod.common
%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.common

%post profile_mobile
ln -sf tizen.prod.mobile %{_sysconfdir}/products.d/tizen.prod
ln -sf tizen-build.conf.mobile %{_sysconfdir}/tizen-build.conf
%preun profile_mobile
rm %{_sysconfdir}/products.d/tizen.prod
rm %{_sysconfdir}/tizen-build.conf
%files profile_mobile
%license LICENSE.APLv2
%{_sysconfdir}/products.d/tizen.prod.mobile
%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.mobile

%post profile_wearable
ln -sf tizen.prod.wearable %{_sysconfdir}/products.d/tizen.prod
ln -sf tizen-build.conf.wearable %{_sysconfdir}/tizen-build.conf
%preun profile_wearable
rm %{_sysconfdir}/products.d/tizen.prod
rm %{_sysconfdir}/tizen-build.conf
%files profile_wearable
%license LICENSE.APLv2
%{_sysconfdir}/products.d/tizen.prod.wearable
%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.wearable

%post profile_tv
ln -sf tizen.prod.tv %{_sysconfdir}/products.d/tizen.prod
ln -sf tizen-build.conf.tv %{_sysconfdir}/tizen-build.conf
%preun profile_tv
rm %{_sysconfdir}/products.d/tizen.prod
rm %{_sysconfdir}/tizen-build.conf
%files profile_tv
%license LICENSE.APLv2
%{_sysconfdir}/products.d/tizen.prod.tv
%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.tv

%post profile_ivi
ln -sf tizen.prod.ivi %{_sysconfdir}/products.d/tizen.prod
ln -sf tizen-build.conf.ivi %{_sysconfdir}/tizen-build.conf
%preun profile_ivi
rm %{_sysconfdir}/products.d/tizen.prod
rm %{_sysconfdir}/tizen-build.conf
%files profile_ivi
%license LICENSE.APLv2
%{_sysconfdir}/products.d/tizen.prod.ivi
%config %attr(0444,root,root) %{_sysconfdir}/tizen-build.conf.ivi