[Tizen] ecore-wl2: applying ecore-wl2
[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.24
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 # Preparation
72 ##############################
73 %prep
74 %setup -q
75
76 #Use TZ_PATH when tizen version is 3.x or greater
77
78 %define dali_data_rw_dir         %TZ_SYS_RO_SHARE/dali/
79 %define dali_data_ro_dir         %TZ_SYS_RO_SHARE/dali/
80 %define dev_include_path %{_includedir}
81
82 ##############################
83 # Build
84 ##############################
85 %build
86 PREFIX+="/usr"
87 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections -DGL_GLEXT_PROTOTYPES"
88 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections -Wl,-Bsymbolic-functions "
89
90 %if 0%{?tizen_version_major} >= 5
91 CFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
92 CXXFLAGS+=" -DECORE_WL2 -DEFL_BETA_API_SUPPORT"
93 configure_flags="--enable-ecore-wl2"
94 %endif
95
96 libtoolize --force
97 cd %{_builddir}/%{name}-%{version}/build/tizen
98 autoreconf --install
99
100 %configure --prefix=$PREFIX \
101            --enable-ecore-wl2 \
102            --enable-keyextension
103
104 make %{?jobs:-j%jobs}
105
106 ##############################
107 # Installation
108 ##############################
109 %install
110 rm -rf %{buildroot}
111 cd build/tizen
112 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
113
114 %pre
115 exit 0
116
117 ##############################
118 #  Post Install new package
119 ##############################
120 %post
121 /sbin/ldconfig
122 exit 0
123
124 %post key-extension
125 /sbin/ldconfig
126 exit 0
127
128 %post video-player-plugin
129 /sbin/ldconfig
130 exit 0
131
132 ##############################
133 #   Pre Uninstall old package
134 ##############################
135 %preun
136 exit 0
137
138 ##############################
139 #   Post Uninstall old package
140 ##############################
141 %postun
142 /sbin/ldconfig
143 exit 0
144
145 %postun key-extension
146 /sbin/ldconfig
147 exit 0
148
149 %postun video-player-plugin
150 /sbin/ldconfig
151 exit 0
152
153 ##############################
154 # Files in Binary Packages
155 ##############################
156
157 %files
158 %manifest dali-extension.manifest
159 %defattr(-,root,root,-)
160 %license LICENSE
161
162 %files devel
163 %defattr(-,root,root,-)
164 %{_includedir}/%{name}/
165 %{_libdir}/pkgconfig/*.pc
166
167 %files key-extension
168 %manifest dali-extension.manifest
169 %defattr(-,root,root,-)
170 %{_libdir}/libdali-key-extension.so*
171 %license LICENSE
172
173 %files video-player-plugin
174 %manifest dali-extension.manifest
175 %defattr(-,root,root,-)
176 %{_libdir}/libdali-video-player-plugin.so*
177 %license LICENSE