1 # adjust compression algorithm to speed up RPMS creation
2 # source RPM and debug RPMS are big and take too much time
3 # when using standard (lzma) compression
4 %define _source_payload w3.gzdio
5 %define _binary_payload w3.gzdio
7 Name: chromium-efl-libs
8 %define ChromiumVersion 42.2311.0
10 Version: %{ChromiumVersion}.%{Week}
12 Summary: Chromium-based app runtime, private libraries
13 # The 'Group' should be specified as one of the following valid group list.
14 # https://wiki.tizen.org/wiki/Packaging/Guidelines#Group_Tag
15 Group: Web Framework/Web Engine
16 # The 'License' should be specified as some of the following known license list.
17 # http://spdx.org/licenses/
18 License: LGPL-2.1 or BSD-2-Clause
19 Source: %{name}-%{version}.tar.gz
20 Source1002: print-chromium-deps.py
23 %global __debug_install_post %{nil}
24 %global debug_package %{nil}
27 BuildRequires: binutils-gold
29 BuildRequires: bzip2-devel
30 BuildRequires: elfutils
31 BuildRequires: expat-devel
34 BuildRequires: libcap-devel
35 BuildRequires: libelf-devel
38 BuildRequires: python-xml
42 BuildRequires: pkgconfig(alsa)
43 BuildRequires: pkgconfig(dbus-1)
44 BuildRequires: pkgconfig(fontconfig)
45 BuildRequires: pkgconfig(freetype2)
46 BuildRequires: pkgconfig(gles20)
47 BuildRequires: pkgconfig(glib-2.0)
48 BuildRequires: pkgconfig(icu-i18n)
49 BuildRequires: pkgconfig(libdrm)
50 BuildRequires: pkgconfig(libexif)
51 BuildRequires: pkgconfig(libpci)
52 BuildRequires: pkgconfig(libpulse)
53 BuildRequires: pkgconfig(libudev)
54 BuildRequires: pkgconfig(libxml-2.0)
55 BuildRequires: pkgconfig(libxslt)
56 BuildRequires: pkgconfig(protobuf)
57 BuildRequires: pkgconfig(nss)
59 # chromium-efl/chromium_src dependencies.
60 BuildRequires: pkgconfig(appcore-efl)
61 BuildRequires: pkgconfig(capi-appfw-application)
62 BuildRequires: pkgconfig(capi-location-manager)
63 BuildRequires: pkgconfig(capi-media-audio-io)
64 BuildRequires: pkgconfig(capi-media-camera)
65 BuildRequires: pkgconfig(capi-media-player)
66 BuildRequires: pkgconfig(capi-media-tool)
67 BuildRequires: pkgconfig(capi-system-sensor)
68 BuildRequires: pkgconfig(capi-network-connection)
69 BuildRequires: pkgconfig(capi-system-device)
70 BuildRequires: pkgconfig(capi-system-system-settings)
71 BuildRequires: pkgconfig(ecore)
72 BuildRequires: pkgconfig(ecore-evas)
73 BuildRequires: pkgconfig(ecore-imf)
74 BuildRequires: pkgconfig(ecore-imf-evas)
75 BuildRequires: pkgconfig(ecore-input)
76 BuildRequires: pkgconfig(efl-assist)
77 BuildRequires: pkgconfig(elementary)
78 BuildRequires: pkgconfig(evas)
79 BuildRequires: pkgconfig(feedback)
80 BuildRequires: pkgconfig(glib-2.0)
81 BuildRequires: pkgconfig(gstreamer-1.0)
82 BuildRequires: pkgconfig(gstreamer-plugins-base-1.0)
83 BuildRequires: pkgconfig(gstreamer-app-1.0)
84 BuildRequires: pkgconfig(harfbuzz)
85 BuildRequires: pkgconfig(libtbm)
86 BuildRequires: pkgconfig(minizip)
87 BuildRequires: pkgconfig(nspr)
88 BuildRequires: pkgconfig(openssl)
89 BuildRequires: pkgconfig(scim)
90 BuildRequires: pkgconfig(tts)
91 BuildRequires: pkgconfig(vconf)
92 # TODO(a1.gomes): these dependencies seem wrong.
93 BuildRequires: pkgconfig(capi-system-info)
94 BuildRequires: pkgconfig(flac)
95 BuildRequires: pkgconfig(ui-gadget-1)
96 BuildRequires: pkgconfig(speex)
98 %if "%{?_with_wayland}" == "1"
99 BuildRequires: pkgconfig(wayland-client)
100 BuildRequires: pkgconfig(wayland-cursor)
101 BuildRequires: pkgconfig(wayland-egl)
105 This package contains private Chromium shared libraries required by Chromium-EWK and Crosswalk apps to run.
112 # Stop unconditionally passing -Wall to the compiler. Chromium has its own
113 # mechanisms for deciding which parts of the code need -Wall and which need it
114 # to be left out (since several pieces are built with -Werror). At least in
115 # M39, this is preventing the "rtc_base" target from being built because it
116 # does not expect -Wall to be passed to the compiler (see webrtc issue 3307).
117 export CXXFLAGS=`echo $CXXFLAGS | sed s,-Wall,,g`
119 # Do not use -finline-functions: it breaks the build because it causes -Wall to
120 # warn about some conditions that cannot really be reached (ie. variables that
121 # may be used uninitialized while in fact thay cannot be uninitialized). See
123 export CXXFLAGS=`echo $CXXFLAGS | sed s,-finline-functions,,g`
125 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
126 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
127 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
128 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
130 # Building the RPM in the GBS chroot fails with errors such as
131 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
132 # failed to set dynamic section sizes: Memory exhausted
133 # For now, work around it by passing a GNU ld-specific flag that optimizes the
134 # linker for memory usage.
135 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
137 # Support building in a non-standard directory, possibly outside %{_builddir}.
138 # Since the build root is erased every time a new build is performed, one way
139 # to avoid losing the build directory is to specify a location outside the
140 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
141 # (remember all paths are still inside the chroot):
142 # gbs build --define 'BUILDDIR_NAME /some/path'
143 BUILDDIR_NAME="%{?BUILDDIR_NAME}"
144 if [ -n "${BUILDDIR_NAME}" ]; then
145 mkdir -p "${BUILDDIR_NAME}"
146 ln -s "${BUILDDIR_NAME}" "%{OUTPUT_FOLDER}"
149 # For building for arm in OBS, we need :
150 # -> to unset sysroot value.
151 # sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project
152 # sysroot usage is not needed, we need to use arm libraries from the virtualized environment.
154 # Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation
157 export CFLAGS=`echo $CFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g`
158 export CXXFLAGS=`echo $CXXFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g`
159 export FFLAGS=`echo $FFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g`
162 ###### start of block copied/adapted from chromium-efl.spec
163 trap 'tizen_src/build/apply_patches.sh -r;\
164 error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT
166 tizen_src/build/apply_patches.sh
168 %if "%{tizen}" == "3.0"
169 %define chromium_efl_tizen_version 3.0
171 %if "%{tizen}" == "2.3" || "%{tizen}" == "2.4"
172 %define chromium_efl_tizen_version 2.4
174 %if "%{tizen}" == "2.0"
175 %define chromium_efl_tizen_version 2.3
177 %if "%{tizen}" == "2.2.1"
178 %define chromium_efl_tizen_version 2.2.1
181 %if %{!?TIZEN_PROFILE_TV:0}%{?TIZEN_PROFILE_TV:1} || "%{!?profile:0}%{?profile}" == "tv"
182 %define chromium_efl_tizen_profile tv
184 %define chromium_efl_tizen_profile mobile
188 CFLAGS=$(echo $CFLAGS | sed 's/-g[0-9]*/ /g')
189 CXXFLAGS=$(echo $CXXFLAGS | sed 's/-g[0-9]*/ /g')
192 %if "%{!?chromium_efl_tizen_profile:0}%{?chromium_efl_tizen_profile}" == "mobile"
193 %define OUTPUT_BUILD_PROFILE_TARGET mobile
195 %define OUTPUT_BUILD_PROFILE_TARGET tv
198 # The variable chromium-efl_tizen_version and _repository are essentially needed for build.
199 # Therefore, if the variable is not defined, it explicitly raises exception here.
200 %define OUTPUT_BASE_FOLDER out.tz_v%{chromium_efl_tizen_version}.%{OUTPUT_BUILD_PROFILE_TARGET}.%{_repository}.libs
201 export GYP_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER}
205 %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Debug
207 %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Release
210 export GYP_GENERATORS="dump_dependency_json,ninja"
212 %if %{?_skip_gyp:0}%{!?_skip_gyp:1}
213 ./tizen_src/build/gyp_chromiumefl.sh \
215 -Dbuilding_crosswalk_bin=0 \
216 -Dcomponent=shared_library \
217 %if 0%{?_remove_webcore_debug_symbols:1}
218 -Dremove_webcore_debug_symbols=1 \
220 %if 0%{?chromium_efl_tizen_version:1}
221 -Dchromium_efl_tizen_version=%{chromium_efl_tizen_version} \
223 %if "%{?_with_wayland}" == "1"
226 %if "%{?_repository}" == "emulator" || "%{?_repository}" == "emulator32-x11"
227 -Dtizen_emulator_support=1 \
229 -Dtizen_"%{OUTPUT_BUILD_PROFILE_TARGET}"=1 \
230 -Dbuilding_for_tizen_"%{OUTPUT_BUILD_PROFILE_TARGET}"=1
233 %if %{?_skip_ninja:0}%{!?_skip_ninja:1}
234 # We are not interested in building ${NINJA_TARGETS} themselves, since that is
235 # what crosswalk-bin.spec does. We want the Chromium dependencies that those
236 # targets need to build all the shared libraries we have to package.
237 NINJA_TARGETS="chromium-ewk xwalk xwalk_application_tools"
238 DEPENDENCIES=`python %{SOURCE1002} dump.json ${NINJA_TARGETS}`
241 tizen_src/build/prebuild/ninja.arm %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
244 tizen_src/build/prebuild/ninja-linux64 -v %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
246 tizen_src/build/prebuild/ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \
252 #XXX icudtl.dat is not copied by gyp. Do that manually
253 cp third_party/icu/android/icudtl.dat "%{OUTPUT_FOLDER}"
255 tizen_src/build/apply_patches.sh -r
257 ###### end of block copied/adapted from chromium-efl.spec
259 # In '%files' section below there are added all built libraries, which satisfy
260 # pattern: 'xwalk/lib/lib*.so'. During build crosswalk-bin.spec generates new
261 # library - libxwalk_backend_lib.so, which should not be packaged into
262 # crosswalk-libs, but then after incremental build it will also satisfy
263 # pattern, which was mentioned above.
264 rm -f "%{OUTPUT_FOLDER}"/lib/libxwalk_backend_lib.so
266 %define INSTALL_FOLDER chromium-efl-libs
269 # Supporting libraries and resources.
270 install -d %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/lib
271 install -m 0644 -p -D "%{OUTPUT_FOLDER}"/lib/*.so %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/lib/
272 install -m 0644 -p -D "%{OUTPUT_FOLDER}"/icudtl.dat %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/icudtl.dat
273 install -m 0644 -p -D "%{OUTPUT_FOLDER}"/libffmpegsumo.so %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/libffmpegsumo.so
274 install -m 0644 -p -D "%{OUTPUT_FOLDER}"/natives_blob.bin %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/natives_blob.bin
275 install -m 0644 -p -D "%{OUTPUT_FOLDER}"/snapshot_blob.bin %{buildroot}%{_libdir}/%{INSTALL_FOLDER}/snapshot_blob.bin
278 %manifest packaging/chromium-efl-libs.manifest
279 %{_libdir}/%{INSTALL_FOLDER}/icudtl.dat
280 %{_libdir}/%{INSTALL_FOLDER}/lib/lib*.so
281 %{_libdir}/%{INSTALL_FOLDER}/libffmpegsumo.so
282 %if %{?_disable_nacl}%{!?_disable_nacl:1} == 0
283 %{_libdir}/%{INSTALL_FOLDER}/nacl_bootstrap_raw
284 %{_libdir}/%{INSTALL_FOLDER}/nacl_helper
285 %{_libdir}/%{INSTALL_FOLDER}/nacl_helper_bootstrap
286 %{_libdir}/%{INSTALL_FOLDER}/nacl_irt_*.nexe
287 %{_libdir}/%{INSTALL_FOLDER}/pnacl/*
289 %{_libdir}/%{INSTALL_FOLDER}/natives_blob.bin
290 %{_libdir}/%{INSTALL_FOLDER}/snapshot_blob.bin