7 Summary: Crosswalk is an app runtime based on Chromium
8 License: (BSD-3-Clause and LGPL-2.1+)
9 Group: Web Framework/Web Run Time
10 Url: https://github.com/otcshare/crosswalk
13 Source2: org.crosswalkproject.Runtime1.service
14 Source3: xwalk.service
15 Source1001: crosswalk.manifest
16 Source1002: %{name}.xml.in
17 Source1003: %{name}.png
18 Patch1: %{name}-do-not-look-for-gtk2-when-using-aura.patch
19 Patch7: %{name}-tizen-audio-session-manager.patch
20 Patch8: %{name}-mesa-ozone-typedefs.patch
21 Patch9: Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch
24 BuildRequires: bzip2-devel
25 BuildRequires: expat-devel
28 BuildRequires: libcap-devel
30 BuildRequires: python-xml
33 BuildRequires: pkgconfig(alsa)
34 BuildRequires: pkgconfig(appcore-common)
35 BuildRequires: pkgconfig(audio-session-mgr)
36 BuildRequires: pkgconfig(cairo)
37 BuildRequires: pkgconfig(capi-location-manager)
38 BuildRequires: pkgconfig(dbus-1)
39 BuildRequires: pkgconfig(fontconfig)
40 BuildRequires: pkgconfig(freetype2)
41 BuildRequires: pkgconfig(gles20)
42 BuildRequires: pkgconfig(glib-2.0)
43 BuildRequires: pkgconfig(haptic)
44 BuildRequires: pkgconfig(icu-i18n)
45 BuildRequires: pkgconfig(libdrm)
46 BuildRequires: pkgconfig(libexif)
47 BuildRequires: pkgconfig(libpci)
48 BuildRequires: pkgconfig(libpulse)
49 BuildRequires: pkgconfig(libudev)
50 BuildRequires: pkgconfig(libxml-2.0)
51 BuildRequires: pkgconfig(libxslt)
52 BuildRequires: pkgconfig(pango)
53 BuildRequires: pkgconfig(pkgmgr-info)
54 BuildRequires: pkgconfig(pkgmgr-parser)
55 BuildRequires: pkgconfig(nspr)
56 BuildRequires: pkgconfig(nss)
57 BuildRequires: pkgconfig(sensor)
58 BuildRequires: pkgconfig(vconf)
60 BuildRequires: pkgconfig(x11)
61 BuildRequires: pkgconfig(xcomposite)
62 BuildRequires: pkgconfig(xcursor)
63 BuildRequires: pkgconfig(xdamage)
64 BuildRequires: pkgconfig(xext)
65 BuildRequires: pkgconfig(xfixes)
66 BuildRequires: pkgconfig(xi)
67 BuildRequires: pkgconfig(xrandr)
68 BuildRequires: pkgconfig(xrender)
69 BuildRequires: pkgconfig(xscrnsaver)
70 BuildRequires: pkgconfig(xt)
71 BuildRequires: pkgconfig(xtst)
75 BuildRequires: pkgconfig(wayland-client)
76 BuildRequires: pkgconfig(wayland-cursor)
77 BuildRequires: pkgconfig(wayland-egl)
78 BuildRequires: pkgconfig(xkbcommon)
80 BuildRequires: pkgconfig(scim)
84 Crosswalk is an app runtime based on Chromium. It is an open source project started by the Intel Open Source Technology Center (http://www.01.org).
86 %package emulator-support
87 Summary: Support files necessary for running Crosswalk on the Tizen emulator
88 License: (BSD-3-Clause and LGPL-2.1+)
89 Group: Web Framework/Web Run Time
90 Url: https://github.com/otcshare/crosswalk
92 %description emulator-support
93 This package contains additional support files that are needed for running Crosswalk on the Tizen emulator.
95 %define _manifestdir /usr/share/packages
96 %define _desktop_icondir /usr/share/icons/default/small
97 %define _dbusservicedir /usr/share/dbus-1/services
98 %define _systemduserservicedir /usr/lib/systemd/user
101 %setup -q -n crosswalk
106 sed "s/@VERSION@/%{version}/g" %{name}.xml.in > %{name}.xml
108 cp -a src/AUTHORS AUTHORS.chromium
109 cp -a src/LICENSE LICENSE.chromium
110 cp -a src/xwalk/LICENSE LICENSE.xwalk
115 %if "%{tizen}" < "3.0"
131 # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in
132 # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's
133 # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246
134 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g`
136 # Building the RPM in the GBS chroot fails with errors such as
137 # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld:
138 # failed to set dynamic section sizes: Memory exhausted
139 # For now, work around it by passing a GNU ld-specific flag that optimizes the
140 # linker for memory usage.
141 export LDFLAGS="${LDFLAGS} -Wl,--no-keep-memory"
143 # Support building in a non-standard directory, possibly outside %{_builddir}.
144 # Since the build root is erased every time a new build is performed, one way
145 # to avoid losing the build directory is to specify a location outside the
146 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
147 # (remember all paths are still inside the chroot):
148 # gbs build --define 'BUILDDIR_NAME /some/path'
150 # The --depth and --generator-output combo is used to put all the Makefiles
151 # inside the build directory, and (this is the important part) keep file lists
152 # (generatedwith <|() in gyp) in the build directory as well, otherwise they
153 # will be in the source directory, erased every time and trigger an almost full
154 # Blink rebuild (among other smaller targets).
155 # We cannot always pass those flags, though, because gyp's make generator does
156 # not work if the --generator-output is the top-level source directory.
157 BUILDDIR_NAME="%{?BUILDDIR_NAME}"
158 if [ -z "${BUILDDIR_NAME}" ]; then
161 GYP_EXTRA_FLAGS="--depth=. --generator-output=${BUILDDIR_NAME}"
165 GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ash=1 -Duse_ozone=1"
168 # Change src/ so that we can pass "." to --depth below, otherwise we would need
169 # to pass "src" to it, but this confuses the gyp make generator, that expects
170 # to be called from the root source directory.
173 # --no-parallel is added because chroot does not mount a /dev/shm, this will
174 # cause python multiprocessing.SemLock error.
175 export GYP_GENERATORS='make'
176 ./xwalk/gyp_xwalk xwalk/xwalk.gyp \
187 -Duse_system_bzip2=1 \
189 -Duse_system_libexif=1 \
190 -Duse_system_libxml=1 \
191 -Duse_system_nspr=1 \
196 make %{?_smp_mflags} -C "${BUILDDIR_NAME}" BUILDTYPE=Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper
199 # Support building in a non-standard directory, possibly outside %{_builddir}.
200 # Since the build root is erased every time a new build is performed, one way
201 # to avoid losing the build directory is to specify a location outside the
202 # build root to the BUILDDIR_NAME definition, such as "/var/tmp/xwalk-build"
203 # (remember all paths are still inside the chroot):
204 # gbs build --define 'BUILDDIR_NAME /some/path'
205 BUILDDIR_NAME="%{?BUILDDIR_NAME}"
206 if [ -z "${BUILDDIR_NAME}" ]; then
210 # Since BUILDDIR_NAME can be either a relative path or an absolute one, we need
211 # to cd into src/ so that it means the same thing in the build and install
212 # stages: during the former, a relative location refers to a place inside src/,
213 # whereas during the latter a relative location by default would refer to a
214 # place one directory above src/. If BUILDDIR_NAME is an absolute path, this is
219 install -p -D %{SOURCE1} %{buildroot}%{_bindir}/xwalk
220 install -p -D %{SOURCE2} %{buildroot}%{_dbusservicedir}/org.crosswalkproject.Runtime1.service
221 install -p -D %{SOURCE3} %{buildroot}%{_systemduserservicedir}/xwalk.service
222 install -p -D ${BUILDDIR_NAME}/out/Release/xwalk %{buildroot}%{_libdir}/xwalk/xwalk
223 install -p -D ${BUILDDIR_NAME}/out/Release/xwalkctl %{buildroot}%{_bindir}/xwalkctl
224 install -p -D ${BUILDDIR_NAME}/out/Release/xwalk-launcher %{buildroot}%{_bindir}/xwalk-launcher
225 # xwalk-pkg-helper needs to be set-user-ID-root so it can finish the installation process.
226 install -m 06755 -p -D ${BUILDDIR_NAME}/out/Release/xwalk-pkg-helper %{buildroot}%{_bindir}/xwalk-pkg-helper
228 # Supporting libraries and resources.
229 install -p -D ${BUILDDIR_NAME}/out/Release/icudtl.dat %{buildroot}%{_libdir}/xwalk/icudtl.dat
230 install -p -D ${BUILDDIR_NAME}/out/Release/libffmpegsumo.so %{buildroot}%{_libdir}/xwalk/libffmpegsumo.so
231 install -p -D ${BUILDDIR_NAME}/out/Release/libosmesa.so %{buildroot}%{_libdir}/xwalk/libosmesa.so
232 install -p -D ${BUILDDIR_NAME}/out/Release/xwalk.pak %{buildroot}%{_libdir}/xwalk/xwalk.pak
234 # Register xwalk to the package manager.
235 install -p -D ../%{name}.xml %{buildroot}%{_manifestdir}/%{name}.xml
236 install -p -D ../%{name}.png %{buildroot}%{_desktop_icondir}/%{name}.png
239 %manifest %{name}.manifest
240 %license AUTHORS.chromium LICENSE.chromium LICENSE.xwalk
243 %{_bindir}/xwalk-launcher
244 %{_bindir}/xwalk-pkg-helper
245 %{_libdir}/xwalk/icudtl.dat
246 %{_libdir}/xwalk/libffmpegsumo.so
247 %{_libdir}/xwalk/xwalk
248 %{_libdir}/xwalk/xwalk.pak
249 %{_manifestdir}/%{name}.xml
250 %{_desktop_icondir}/%{name}.png
251 %{_dbusservicedir}/org.crosswalkproject.Runtime1.service
252 %{_systemduserservicedir}/xwalk.service
254 %files emulator-support
255 %{_libdir}/xwalk/libosmesa.so