[Tizen] Fix merge conflict on previous commit
[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.48
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(capi-media-player)
59 BuildRequires: pkgconfig(capi-system-info)
60 # dali-adaptor uses ecore mainloop
61 %if 0%{?tizen_version_major} >= 5
62 BuildRequires:  pkgconfig(ecore-wl2)
63 %else
64 BuildRequires:  pkgconfig(ecore-wayland)
65 %endif
66
67 %description video-player-plugin
68 VideoPlayer plugin to play a video file for Dali
69
70 ##############################
71 # Dali Web Engine chromium Plugin
72 ##############################
73
74 %package web-engine-chromium-plugin
75 Summary:    Plugin to support WebView for Dali
76 Group:      System/Libraries
77 BuildRequires: pkgconfig(libtbm)
78 BuildRequires: pkgconfig(chromium-efl)
79 BuildRequires: pkgconfig(elementary)
80
81 %description web-engine-chromium-plugin
82 Web Engine chromium plugin to support WebView for Dali
83
84 ##############################
85 # Dali Web Engine Lite Plugin
86 ##############################
87
88 %package web-engine-lite-plugin
89 Summary:    Plugin to support WebView for Dali
90 Group:      System/Libraries
91 BuildRequires: pkgconfig(libtbm)
92 BuildRequires: pkgconfig(lightweight-web-engine)
93
94 %description web-engine-lite-plugin
95 Web Engine Lite plugin to support WebView for Dali
96
97 ##############################
98 # Preparation
99 ##############################
100 %prep
101 %setup -q
102
103 #Use TZ_PATH when tizen version is 3.x or greater
104
105 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
106 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
107 %define dev_include_path %{_includedir}
108
109 ##############################
110 # Build
111 ##############################
112 %build
113 PREFIX+="/usr"
114 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
115 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
116
117 %if 0%{?tizen_version_major} >= 5
118 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
119 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
120 configure_flags="--enable-ecore-wl2"
121 %endif
122
123 libtoolize --force
124 cd %{_builddir}/%{name}-%{version}/build/tizen
125 autoreconf --install
126
127 %configure --prefix=$PREFIX \
128            --enable-ecore-wl2 \
129            --enable-keyextension
130
131 make %{?jobs:-j%jobs}
132
133 ##############################
134 # Installation
135 ##############################
136 %install
137 rm -rf %{buildroot}
138 cd build/tizen
139 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
140
141 %pre
142 exit 0
143
144 ##############################
145 #  Post Install new package
146 ##############################
147 %post
148 /sbin/ldconfig
149 exit 0
150
151 %post key-extension
152 /sbin/ldconfig
153 exit 0
154
155 %post video-player-plugin
156 /sbin/ldconfig
157 exit 0
158
159 %post web-engine-chromium-plugin
160 /sbin/ldconfig
161 exit 0
162
163 %post web-engine-lite-plugin
164 pushd %{_libdir}
165 ln -sf libdali-web-engine-lite-plugin.so libdali-web-engine-plugin.so
166 popd
167 /sbin/ldconfig
168 exit 0
169
170 ##############################
171 #   Pre Uninstall old package
172 ##############################
173 %preun
174 exit 0
175
176 ##############################
177 #   Post Uninstall old package
178 ##############################
179 %postun
180 /sbin/ldconfig
181 exit 0
182
183 %postun key-extension
184 /sbin/ldconfig
185 exit 0
186
187 %postun video-player-plugin
188 /sbin/ldconfig
189 exit 0
190
191 %postun web-engine-chromium-plugin
192 /sbin/ldconfig
193 exit 0
194
195 %postun web-engine-lite-plugin
196 /sbin/ldconfig
197 exit 0
198
199 ##############################
200 # Files in Binary Packages
201 ##############################
202
203 %files
204 %manifest dali-extension.manifest
205 %defattr(-,root,root,-)
206 %license LICENSE
207
208 %files devel
209 %defattr(-,root,root,-)
210 %{_includedir}/%{name}/
211 %{_libdir}/pkgconfig/*.pc
212
213 %files key-extension
214 %manifest dali-extension.manifest
215 %defattr(-,root,root,-)
216 %{_libdir}/libdali-key-extension.so*
217 %license LICENSE
218
219 %files video-player-plugin
220 %manifest dali-extension.manifest
221 %defattr(-,root,root,-)
222 %{_libdir}/libdali-video-player-plugin.so*
223 %license LICENSE
224
225 %files web-engine-chromium-plugin
226 %manifest dali-extension.manifest
227 %defattr(-,root,root,-)
228 %{_libdir}/libdali-web-engine-chromium-plugin.so*
229 %license LICENSE
230
231 %files web-engine-lite-plugin
232 %manifest dali-extension.manifest
233 %defattr(-,root,root,-)
234 %{_libdir}/libdali-web-engine-lite-plugin.so*
235 %license LICENSE