Merge "recover PixmapImage::GetPixmap() without any parameter" into tizen
[platform/core/uifw/dali-adaptor.git] / packaging / dali-adaptor-wearable.spec
1 Name:       dali-adaptor
2 Summary:    The DALi Tizen Adaptor
3 Version:    1.0.23
4 Release:    1
5 Group:      System/Libraries
6 License:    Apache-2.0
7 URL:        https://review.tizen.org/git/?p=platform/core/uifw/dali-adaptor.git;a=summary
8 Source0:    %{name}-%{version}.tar.gz
9
10 %define dali_profile WEARABLE
11 %define dali_wearable_profile 1
12
13 Requires(post): /sbin/ldconfig
14 Requires(postun): /sbin/ldconfig
15 Requires:       boost-thread
16 Requires:       giflib
17 BuildRequires:  pkgconfig
18 BuildRequires:  gawk
19 BuildRequires:  pkgconfig(sensor)
20 BuildRequires:  pkgconfig(aul)
21 BuildRequires:  boost-devel
22 BuildRequires:  giflib-devel
23 BuildRequires:  pkgconfig(xi)
24 BuildRequires:  pkgconfig(fontconfig)
25 BuildRequires:  pkgconfig(elementary)
26 BuildRequires:  pkgconfig(capi-appfw-application)
27 BuildRequires:  libjpeg-turbo-devel
28 BuildRequires:  pkgconfig(evas)
29 BuildRequires:  pkgconfig(xfixes)
30 BuildRequires:  pkgconfig(xdamage)
31 BuildRequires:  pkgconfig(utilX)
32 BuildRequires:  dali-devel
33 BuildRequires:  dali-integration-devel
34 BuildRequires:  libxml2-devel
35 BuildRequires:  pkgconfig(vconf)
36 BuildRequires:  tts-devel
37 BuildRequires:  pkgconfig(dlog)
38 BuildRequires:  libdrm-devel
39 BuildRequires:  pkgconfig(libexif)
40 BuildRequires:  pkgconfig(capi-system-system-settings)
41 BuildRequires:  pkgconfig(libpng)
42 BuildRequires:  pkgconfig(gles20)
43 BuildRequires:  pkgconfig(efl-assist)
44
45 %description
46 The DALi Tizen Adaptor provides a Tizen specific implementation of the dali-core
47 platform abstraction and application shell
48
49 ##############################
50 # devel
51 ##############################
52 %package devel
53 Summary:    Development components for the DALi Tizen Adaptor
54 Group:      Development/Building
55 Requires:   %{name} = %{version}-%{release}
56
57 %description devel
58 Development components for the DALi Tizen Adaptor - public headers and package configs
59
60 ##############################
61 # Dali Feedback Plugin
62 ##############################
63 %package dali-feedback-plugin
64 Summary:    Plugin to play haptic and audio feedback for Dali
65 Group:      System/Libraries
66 Requires:       libdeviced
67 BuildRequires:  pkgconfig(mm-sound)
68 BuildRequires:  pkgconfig(deviced)
69 BuildRequires:  libfeedback-devel
70
71 %description dali-feedback-plugin
72 Feedback plugin to play haptic and audio feedback for Dali
73
74 ##############################
75 # Preparation
76 ##############################
77 %prep
78 %setup -q
79 %define dali_data_rw_dir         /opt/usr/share/dali/
80 %define dali_data_ro_dir         /usr/share/dali/
81 %define user_font_cache_dir      %{dali_data_rw_dir}/glyphcache/
82 %define user_shader_cache_dir    %{dali_data_rw_dir}/core/shaderbin/
83 %define font_preloaded_path      /usr/share/fonts/
84 %define font_downloaded_path     /opt/share/fonts/
85 %define font_application_path    /usr/share/app_fonts/
86 %define font_configuration_file  /opt/etc/fonts/conf.avail/99-slp.conf
87 %define dali_plugin_sound_files  %{dali_data_ro_dir}/plugins/sounds/
88 %define dali_plugin_theme_files  %{dali_data_ro_dir}/themes/feedback-themes/
89
90 %define dev_include_path %{_includedir}
91
92 ##############################
93 # Build
94 ##############################
95 %build
96 PREFIX+="/usr"
97 CXXFLAGS+=" -Wall -g -Os -fPIC -fvisibility-inlines-hidden -fdata-sections -ffunction-sections "
98 LDFLAGS+=" -Wl,--rpath=%{_libdir} -Wl,--as-needed -Wl,--gc-sections "
99
100 %if 0%{?sec_build_binary_debug_enable}
101 export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
102 export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
103 export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
104 %endif
105
106 %ifarch %{arm}
107 CXXFLAGS+=" -D_ARCH_ARM_ -lgcc"
108 %endif
109
110 libtoolize --force
111 cd %{_builddir}/%{name}-%{version}/build/tizen
112 autoreconf --install
113 DALI_DATA_RW_DIR="%{dali_data_rw_dir}" ; export DALI_DATA_RW_DIR
114 DALI_DATA_RO_DIR="%{dali_data_ro_dir}" ; export DALI_DATA_RO_DIR
115 FONT_PRELOADED_PATH="%{font_preloaded_path}" ; export FONT_PRELOADED_PATH
116 FONT_DOWNLOADED_PATH="%{font_downloaded_path}" ; export FONT_DOWNLOADED_PATH
117 FONT_APPLICATION_PATH="%{font_application_path}" ; export FONT_APPLICATION_PATH
118 FONT_CONFIGURATION_FILE="%{font_configuration_file}" ; export FONT_CONFIGURATION_FILE
119
120 %configure --with-jpeg-turbo --enable-gles=30 --enable-profile=%{dali_profile} --libdir=%{_libdir}
121
122 make %{?jobs:-j%jobs}
123
124 ##############################
125 # Installation
126 ##############################
127 %install
128 rm -rf %{buildroot}
129 cd build/tizen
130 %make_install DALI_DATA_RW_DIR="%{dali_data_rw_dir}" DALI_DATA_RO_DIR="%{dali_data_ro_dir}"
131
132 # LICENSE
133 mkdir -p %{buildroot}/usr/share/license
134 cp -af %{_builddir}/%{name}-%{version}/LICENSE %{buildroot}/usr/share/license/%{name}
135
136 ##############################
137 # Upgrade order:
138 # 1 - Pre Install new package
139 # 2 - Install new package
140 # 3 - Post install new package
141 # 4 - Pre uninstall old package
142 # 5 - Remove files not overwritten by new package
143 # 6 - Post uninstall old package
144 ##############################
145
146 %pre
147 rm -f %{user_font_cache_dir}/*
148 rm -f %{user_shader_cache_dir}/*
149 exit 0
150
151 ##############################
152 #  Post Install new package
153 ##############################
154 %post
155 /sbin/ldconfig
156 chown 5000:5000 %{user_font_cache_dir}
157 chown 5000:5000 %{user_shader_cache_dir}
158 exit 0
159
160 %if 0%{?dali_feedback_plugin}
161 %post dali-feedback-plugin
162 /sbin/ldconfig
163 exit 0
164 %endif
165
166 ##############################
167 #   Pre Uninstall old package
168 ##############################
169 %preun
170 rm -f %{user_font_cache_dir}/*
171 rm -f %{user_shader_cache_dir}/*
172 exit 0
173
174 ##############################
175 #   Post Uninstall old package
176 ##############################
177 %postun
178 /sbin/ldconfig
179 exit 0
180
181 %if 0%{?dali_feedback_plugin}
182 %postun dali-feedback-plugin
183 /sbin/ldconfig
184 exit 0
185 %endif
186
187 ##############################
188 # Files in Binary Packages
189 ##############################
190
191 %files
192 %manifest dali-adaptor.manifest-mobile
193 %defattr(-,root,root,-)
194 %{_libdir}/libdali-adap*.so*
195 %defattr(-,app,app,-)
196 %dir %{user_font_cache_dir}
197 %dir %{user_shader_cache_dir}
198 %{_bindir}/*
199 %{_datadir}/license/%{name}
200
201 %files devel
202 %defattr(-,root,root,-)
203 %{dev_include_path}/dali/*
204 %{_libdir}/pkgconfig/dali*.pc
205
206 %if 0%{?dali_feedback_plugin}
207 %files dali-feedback-plugin
208 %defattr(-,root,root,-)
209 %{_libdir}/libdali-feedback-plugin.so*
210 %{dali_plugin_sound_files}/*
211 %{dali_plugin_theme_files}/*
212 %endif
213