DALi Version 1.3.54
[platform/core/uifw/dali-extension.git] / packaging / dali-extension.spec
1 # NOTES
2 # This spec file is used to build DALi Extensions
3 #
4 # gbs will try to download the build.conf for the platform automatically from the repo location when
5 # performing a gbs build ( use gbs build -v to see it download location) E.g.
6 # http://download.tizen.org/snapshots/tizen/tv/tizen-tv/repos/arm-wayland/packages/repodata/xxxx-build.conf.gz
7
8 Name:       dali-extension
9 Summary:    The DALi Tizen Extensions
10 Version:    1.3.54
11 Release:    1
12 Group:      System/Libraries
13 License:    Apache-2.0 and BSD-3-Clause and MIT
14 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-extensions.git;a=summary
15 Source0:    %{name}-%{version}.tar.gz
16
17 Requires(post): /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19
20 BuildRequires:  pkgconfig
21 BuildRequires:  pkgconfig(dali-core)
22 BuildRequires:  pkgconfig(dali-adaptor)
23 BuildRequires:  pkgconfig(dali-toolkit)
24 BuildRequires:  pkgconfig(dlog)
25
26 %description
27 dali-extension
28
29 ##############################
30 # devel
31 ##############################
32 %package devel
33 Summary:    Development components for the DALi Extension
34 Group:      Development/Building
35 Requires:   %{name} = %{version}-%{release}
36
37 %description devel
38 Development components for the DALi Tizen Extensions - public headers and package configs
39
40 ##############################
41 # Dali Key Extension
42 ##############################
43
44 %package key-extension
45 Summary:    Plugin to support extension keys for Dali
46 Group:      System/Libraries
47
48 %description key-extension
49 Plugin to support extension keys for Dali
50
51 ##############################
52 # Dali VideoPlayer Plugin
53 ##############################
54
55 %package video-player-plugin
56 Summary:    Plugin to play a video file for Dali
57 Group:      System/Libraries
58 BuildRequires: pkgconfig(ecore-wayland)
59 BuildRequires: pkgconfig(capi-media-player)
60 BuildRequires: pkgconfig(capi-system-info)
61
62 %description video-player-plugin
63 VideoPlayer plugin to play a video file for Dali
64
65 ##############################
66 # Dali Web Engine chromium Plugin
67 ##############################
68
69 %package web-engine-chromium-plugin
70 Summary:    Plugin to support WebView for Dali
71 Group:      System/Libraries
72 BuildRequires: pkgconfig(libtbm)
73 BuildRequires: pkgconfig(chromium-efl)
74 BuildRequires: pkgconfig(elementary)
75
76 %description web-engine-chromium-plugin
77 Web Engine chromium plugin to support WebView for Dali
78
79 ##############################
80 # Dali Image Loader Plugin
81 ##############################
82
83 %package image-loader-plugin
84 Summary:    Plugin to image loading for Dali
85 Group:      System/Libraries
86
87 %description image-loader-plugin
88 Image Loader plugin to image loading file for Dali
89
90 ####################################
91 # Vector Animation Renderer Plugin
92 ####################################
93
94 %package vector-animation-renderer-plugin
95 Summary:    Plugin to render a vector animation
96 Group:      System/Libraries
97 BuildRequires:  pkgconfig(lottie-player)
98
99 %description vector-animation-renderer-plugin
100 Plugin to render a vector animation
101
102 ##############################
103 # Preparation
104 ##############################
105 %prep
106 %setup -q
107
108 #Use TZ_PATH when tizen version is 3.x or greater
109
110 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
111 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
112 %define dev_include_path %{_includedir}
113
114 # Use Image Loader Plugin
115 %define use_image_loader 0
116
117 ##############################
118 # Build
119 ##############################
120 %build
121 PREFIX+="/usr"
122 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
123 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
124
125 libtoolize --force
126 cd %{_builddir}/%{name}-%{version}/build/tizen
127 autoreconf --install
128
129 %configure --prefix=$PREFIX \
130            --enable-keyextension
131 %if 0%{?use_image_loader}
132 %configure \
133            --enable-imageloader-extension
134 %endif
135
136 make %{?jobs:-j%jobs}
137
138 ##############################
139 # Installation
140 ##############################
141 %install
142 rm -rf %{buildroot}
143
144 # install dali.sh
145 mkdir -p %{buildroot}%{_sysconfdir}/profile.d
146 install -m 0644 scripts/dali.sh %{buildroot}%{_sysconfdir}/profile.d
147
148 cd build/tizen
149 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
150
151 %pre
152 exit 0
153
154 ##############################
155 #  Post Install new package
156 ##############################
157 %post
158 /sbin/ldconfig
159 exit 0
160
161 %post key-extension
162 /sbin/ldconfig
163 exit 0
164
165 %post video-player-plugin
166 /sbin/ldconfig
167 exit 0
168
169 %post web-engine-chromium-plugin
170 /sbin/ldconfig
171 exit 0
172
173 %post image-loader-plugin
174 /sbin/ldconfig
175 exit 0
176
177 %post vector-animation-renderer-plugin
178 /sbin/ldconfig
179 exit 0
180
181 ##############################
182 #   Pre Uninstall old package
183 ##############################
184 %preun
185 exit 0
186
187 ##############################
188 #   Post Uninstall old package
189 ##############################
190 %postun
191 /sbin/ldconfig
192 exit 0
193
194 %postun key-extension
195 /sbin/ldconfig
196 exit 0
197
198 %postun video-player-plugin
199 /sbin/ldconfig
200 exit 0
201
202 %postun web-engine-chromium-plugin
203 /sbin/ldconfig
204 exit 0
205
206 %postun image-loader-plugin
207 /sbin/ldconfig
208 exit 0
209
210 %postun vector-animation-renderer-plugin
211 /sbin/ldconfig
212 exit 0
213
214 ##############################
215 # Files in Binary Packages
216 ##############################
217
218 %files
219 %manifest dali-extension.manifest
220 %defattr(-,root,root,-)
221 %{_sysconfdir}/profile.d/dali.sh
222 %license LICENSE
223
224 %files devel
225 %defattr(-,root,root,-)
226 %{_includedir}/%{name}/
227 %{_libdir}/pkgconfig/*.pc
228
229 %files key-extension
230 %manifest dali-extension.manifest
231 %defattr(-,root,root,-)
232 %{_libdir}/libdali-key-extension.so*
233 %license LICENSE
234
235 %files video-player-plugin
236 %manifest dali-extension.manifest
237 %defattr(-,root,root,-)
238 %{_libdir}/libdali-video-player-plugin.so*
239 %license LICENSE
240
241 %files web-engine-chromium-plugin
242 %manifest dali-extension.manifest
243 %defattr(-,root,root,-)
244 %{_libdir}/libdali-web-engine-chromium-plugin.so*
245 %license LICENSE
246
247 %if 0%{?use_image_loader}
248 %files image-loader-plugin
249 %manifest dali-extension.manifest
250 %defattr(-,root,root,-)
251 %{_libdir}/libdali-image-loader-plugin.so*
252 %license LICENSE
253 %endif
254
255 %files vector-animation-renderer-plugin
256 %manifest dali-extension.manifest
257 %defattr(-,root,root,-)
258 %{_libdir}/libdali-vector-animation-renderer-plugin.so*
259 %license LICENSE