X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Fcrosswalk.spec;h=8e9c587b9036809c78a12704708b740fdd1fb190;hb=949d079b90dcfa5fa918e1f366a6efb689615d20;hp=819cfe277daeb1065dbd7224d30367a3bbb24800;hpb=1d7e5b4973027c8ae21998059ccd6ee181316ebb;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/packaging/crosswalk.spec b/packaging/crosswalk.spec index 819cfe2..8e9c587 100644 --- a/packaging/crosswalk.spec +++ b/packaging/crosswalk.spec @@ -1,10 +1,32 @@ %bcond_with x %bcond_with wayland +%ifarch x86_64 %{arm} +### x86_64 +# NaCl build on 64bit system require libc 32bit to build the 32 IRT. +# While Tizen 64bit image does not offer 32bit packages at all, +# check https://bugs.tizen.org/jira/browse/PTREL-803 for details. +# So disable nacl for 64bit now. +### ARM +# Due to OBS build for ARM some files needed by NaCl to be build +# are not present. +%define _disable_nacl 1 +%else +# Since M39, Google has stopped shipping a 32-bit PNaCl toolchain, so we cannot +# build NaCl on a fully 32-bit host anymore. See XWALK-2679. +%define _disable_nacl 1 +%endif + +# adjust compression algorithm to speed up RPMS creation +# source RPM and debug RPMS are big and take too much time +# when using standard (lzma) compression +%define _source_payload w3.gzdio +%define _binary_payload w3.gzdio + Name: crosswalk -Version: 6.34.115.0 +Version: 11.39.260.0 Release: 0 -Summary: Crosswalk is an app runtime based on Chromium +Summary: Chromium-based app runtime License: (BSD-3-Clause and LGPL-2.1+) Group: Web Framework/Web Run Time Url: https://github.com/otcshare/crosswalk @@ -15,21 +37,24 @@ Source3: xwalk.service.in Source1001: crosswalk.manifest Source1002: %{name}.xml.in Source1003: %{name}.png -Patch1: %{name}-do-not-look-for-gtk2-when-using-aura.patch -Patch8: %{name}-mesa-ozone-typedefs.patch -Patch9: Blink-Add-GCC-flag-Wno-narrowing-fix-64bits-build.patch +Patch10: crosswalk-do-not-look-for-gtk-dependencies-on-x11.patch +BuildRequires: binutils-gold BuildRequires: bison BuildRequires: bzip2-devel +BuildRequires: elfutils BuildRequires: expat-devel BuildRequires: flex BuildRequires: gperf BuildRequires: libcap-devel +BuildRequires: libelf-devel BuildRequires: ninja BuildRequires: python BuildRequires: python-xml BuildRequires: perl BuildRequires: which +BuildRequires: yasm +BuildRequires: pkgconfig(ail) BuildRequires: pkgconfig(alsa) BuildRequires: pkgconfig(appcore-common) BuildRequires: pkgconfig(cairo) @@ -45,17 +70,32 @@ BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(libpulse) +BuildRequires: pkgconfig(libtzplatform-config) BuildRequires: pkgconfig(libudev) BuildRequires: pkgconfig(libxml-2.0) BuildRequires: pkgconfig(libxslt) BuildRequires: pkgconfig(pango) +BuildRequires: pkgconfig(pkgmgr) BuildRequires: pkgconfig(pkgmgr-info) +BuildRequires: pkgconfig(pkgmgr-installer) BuildRequires: pkgconfig(pkgmgr-parser) -BuildRequires: pkgconfig(nspr) -BuildRequires: pkgconfig(nss) +BuildRequires: pkgconfig(secure-storage) BuildRequires: pkgconfig(sensor) +BuildRequires: pkgconfig(nss) BuildRequires: pkgconfig(vconf) +BuildRequires: pkgconfig(xmlsec1) +Requires: ca-certificates-tizen +Requires: ss-server + +%if %{with wayland} +BuildRequires: pkgconfig(wayland-client) +BuildRequires: pkgconfig(wayland-cursor) +BuildRequires: pkgconfig(wayland-egl) +BuildRequires: pkgconfig(xkbcommon) +%endif + %if %{with x} +BuildRequires: pkgconfig(scim) BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xcomposite) BuildRequires: pkgconfig(xcursor) @@ -70,22 +110,18 @@ BuildRequires: pkgconfig(xt) BuildRequires: pkgconfig(xtst) %endif -%if %{with wayland} -BuildRequires: pkgconfig(wayland-client) -BuildRequires: pkgconfig(wayland-cursor) -BuildRequires: pkgconfig(wayland-egl) -BuildRequires: pkgconfig(xkbcommon) -%else -BuildRequires: pkgconfig(scim) +%if "%{profile}" == "ivi" +BuildRequires: pkgconfig(murphy-common) +BuildRequires: pkgconfig(murphy-resource) %endif %description 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). -%define _manifestdir /usr/share/packages -%define _manifestdir_ro /opt/share/packages -%define _desktop_icondir /usr/share/icons/default/small -%define _desktop_icondir_ro /opt/share/icons/default/small +%define _manifestdir %TZ_SYS_RO_PACKAGES +%define _manifestdir_ro %TZ_SYS_RO_PACKAGE +%define _desktop_icondir %TZ_SYS_RW_ICONS/default/small +%define _desktop_icondir_ro %TZ_SYS_RO_ICONS/default/small %define _dbusservicedir /usr/share/dbus-1/services %define _systemduserservicedir /usr/lib/systemd/user @@ -105,29 +141,34 @@ cp -a src/AUTHORS AUTHORS.chromium cp -a src/LICENSE LICENSE.chromium cp -a src/xwalk/LICENSE LICENSE.xwalk -%patch1 - -%if "%{tizen}" < "3.0" -%patch2 -%patch3 -%patch4 -%patch5 -p1 -%patch6 -%endif - -%if %{with wayland} -%patch8 +# The profiles using Wayland (and thus Ozone) do not need this patch. +%if !%{with wayland} +%patch10 %endif -%patch9 - %build +# Stop unconditionally passing -Wall to the compiler. Chromium has its own +# mechanisms for deciding which parts of the code need -Wall and which need it +# to be left out (since several pieces are built with -Werror). At least in +# M39, this is preventing the "rtc_base" target from being built because it +# does not expect -Wall to be passed to the compiler (see webrtc issue 3307). +export CXXFLAGS=`echo $CXXFLAGS | sed s,-Wall,,g` + # For ffmpeg on ia32. The original CFLAGS set by the gyp and config files in # src/third_party/ffmpeg already pass -O2 -fomit-frame-pointer, but Tizen's # CFLAGS end up appending -fno-omit-frame-pointer. See http://crbug.com/37246 export CFLAGS=`echo $CFLAGS | sed s,-fno-omit-frame-pointer,,g` +%if ! %{_disable_nacl} +# For nacl_bootstrap on ia32. The original CFLAGS set by the gyp +# native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp already ignored +# -fstack-protector and -funwind-tables, but Tizen's CFLAGS end up appending them, thus +# causing linking failures. Check XWALK-1689 for details. +export CFLAGS=`echo $CFLAGS | sed s,-fstack-protector,,g` +export CFLAGS=`echo $CFLAGS | sed s,-funwind-tables,,g` +%endif + # Building the RPM in the GBS chroot fails with errors such as # /usr/lib/gcc/i586-tizen-linux/4.7/../../../../i586-tizen-linux/bin/ld: # failed to set dynamic section sizes: Memory exhausted @@ -151,6 +192,29 @@ fi GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Duse_ozone=1" %endif +GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_nacl=%{_disable_nacl}" + +# Linking fails when fatal ld warnings are enabled. See XWALK-1379. +GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Ddisable_fatal_linker_warnings=1" + +# For building for arm in OBS, we need : +# -> to unset sysroot value. +# sysroot variable is automatically set for cross compilation to use arm-sysroot provided by Chromium project +# sysroot usage is not needed, we need to use arm libraries from the virtualized environment. +# +# Crosswalk build fails if the fpu selected in the gcc option is different from neon in case of arm7 compilation +# So force it. +%ifarch %{arm} +GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Dsysroot= " +export CFLAGS=`echo $CFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g` +export CXXFLAGS=`echo $CXXFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g` +export FFLAGS=`echo $FFLAGS | sed s,-mfpu=vfpv3,-mfpu=neon,g` +%endif + +%if "%{profile}" == "ivi" +GYP_EXTRA_FLAGS="${GYP_EXTRA_FLAGS} -Denable_murphy=1" +%endif + # --no-parallel is added because chroot does not mount a /dev/shm, this will # cause python multiprocessing.SemLock error. export GYP_GENERATORS='ninja' @@ -158,7 +222,10 @@ export GYP_GENERATORS='ninja' --no-parallel \ ${GYP_EXTRA_FLAGS} \ -Dchromeos=0 \ --Ddisable_nacl=1 \ +-Dclang=0 \ +-Dlinux_use_bundled_binutils=0 \ +-Dlinux_use_bundled_gold=0 \ +-Dlinux_use_gold_flags=1 \ -Dtizen=1 \ -Dpython_ver=2.7 \ -Duse_aura=1 \ @@ -169,47 +236,81 @@ ${GYP_EXTRA_FLAGS} \ -Duse_system_bzip2=1 \ -Duse_system_libexif=1 \ -Duse_system_libxml=1 \ --Duse_system_nspr=1 \ +-Duse_system_yasm=1 \ +-Dshared_process_mode=1 \ -Denable_hidpi=1 -ninja %{?_smp_mflags} -C src/out/Release xwalk xwalkctl xwalk_launcher xwalk-pkg-helper +ninja %{?_smp_mflags} -C src/out/Release xwalk xwalk_launcher xwalk_application_tools %install # Binaries. -install -p -D xwalk %{buildroot}%{_bindir}/xwalk -install -p -D %{SOURCE2} %{buildroot}%{_dbusservicedir}/org.crosswalkproject.Runtime1.service -install -p -D xwalk.service %{buildroot}%{_systemduserservicedir}/xwalk.service -install -p -D src/out/Release/xwalk %{buildroot}%{_libdir}/xwalk/xwalk -install -p -D src/out/Release/xwalkctl %{buildroot}%{_bindir}/xwalkctl -install -p -D src/out/Release/xwalk-launcher %{buildroot}%{_bindir}/xwalk-launcher -# xwalk-pkg-helper needs to be set-user-ID-root so it can finish the installation process. -install -m 06755 -p -D src/out/Release/xwalk-pkg-helper %{buildroot}%{_bindir}/xwalk-pkg-helper +install -m 0755 -p -D src/out/Release/xwalk %{buildroot}%{_libdir}/xwalk/xwalk +install -m 0755 -p -D src/out/Release/xwalkctl %{buildroot}%{_bindir}/xwalkctl +install -m 0755 -p -D src/out/Release/xwalk-launcher %{buildroot}%{_bindir}/xwalk-launcher +install -m 0755 -p -D src/out/Release/xwalk_backend %{buildroot}%{_libdir}/xwalk/xwalk_backend # Supporting libraries and resources. -install -p -D src/out/Release/icudtl.dat %{buildroot}%{_libdir}/xwalk/icudtl.dat -install -p -D src/out/Release/libffmpegsumo.so %{buildroot}%{_libdir}/xwalk/libffmpegsumo.so -install -p -D src/out/Release/xwalk.pak %{buildroot}%{_libdir}/xwalk/xwalk.pak +install -m 0644 -p -D %{SOURCE2} %{buildroot}%{_dbusservicedir}/org.crosswalkproject.Runtime1.service +install -m 0644 -p -D xwalk.service %{buildroot}%{_systemduserservicedir}/xwalk.service +install -m 0644 -p -D src/out/Release/lib/libxwalk_backend_lib.so %{buildroot}%{_libdir}/xwalk/libxwalk_backend_lib.so +install -m 0644 -p -D src/out/Release/icudtl.dat %{buildroot}%{_libdir}/xwalk/icudtl.dat +install -m 0644 -p -D src/out/Release/libffmpegsumo.so %{buildroot}%{_libdir}/xwalk/libffmpegsumo.so +install -m 0644 -p -D src/out/Release/xwalk.pak %{buildroot}%{_libdir}/xwalk/xwalk.pak +install -d %{buildroot}%{_datadir}/xwalk +install -m 0644 -p -D src/xwalk/application/common/tizen/configuration/*.xsd %{buildroot}%{_datadir}/xwalk + +# PNaCl +%if ! %{_disable_nacl} +install -m 0755 -p -D src/out/Release/nacl_bootstrap_raw %{buildroot}%{_libdir}/xwalk/nacl_bootstrap_raw +install -m 0755 -p -D src/out/Release/nacl_helper %{buildroot}%{_libdir}/xwalk/nacl_helper +install -m 0755 -p -D src/out/Release/nacl_helper_bootstrap %{buildroot}%{_libdir}/xwalk/nacl_helper_bootstrap +install -m 0644 -p -D src/out/Release/nacl_irt_*.nexe %{buildroot}%{_libdir}/xwalk +install -d %{buildroot}%{_libdir}/xwalk/pnacl +install -m 0644 -p -D src/out/Release/pnacl/* %{buildroot}%{_libdir}/xwalk/pnacl +%endif # Register xwalk to the package manager. -install -p -D %{name}.xml %{buildroot}%{_manifestdir}/%{name}.xml -install -p -D %{name}.png %{buildroot}%{_desktop_icondir}/%{name}.png +install -m 0644 -p -D %{name}.xml %{buildroot}%{_manifestdir}/%{name}.xml +install -m 0644 -p -D %{name}.png %{buildroot}%{_desktop_icondir}/%{name}.png %post mkdir -p %{_desktop_icondir_ro} mkdir -p %{_manifestdir_ro} +ln -sf %{_libdir}/xwalk/libxwalk_backend_lib.so /etc/package-manager/backendlib/libxpk.so +ln -sf %{_libdir}/xwalk/libxwalk_backend_lib.so /etc/package-manager/backendlib/libwgt.so +ln -sf %{_libdir}/xwalk/xwalk_backend /etc/package-manager/backend/xpk +ln -sf %{_libdir}/xwalk/xwalk_backend /etc/package-manager/backend/wgt + +%preun +if [ $1 -eq 0 ] ; then + # don't remove if we are upgrade the rpm package +[ -L /etc/package-manager/backendlib/libxpk.so ] && rm /etc/package-manager/backendlib/libxpk.so +[ -L /etc/package-manager/backendlib/libwgt.so ] && rm /etc/package-manager/backendlib/libwgt.so +[ -L /etc/package-manager/backend/xpk ] && rm /etc/package-manager/backend/xpk +[ -L /etc/package-manager/backend/wgt ] && rm /etc/package-manager/backend/wgt +fi + %files %manifest %{name}.manifest %license AUTHORS.chromium LICENSE.chromium LICENSE.xwalk -%{_bindir}/xwalk %{_bindir}/xwalkctl %{_bindir}/xwalk-launcher -%{_bindir}/xwalk-pkg-helper %{_libdir}/xwalk/icudtl.dat %{_libdir}/xwalk/libffmpegsumo.so +%if ! %{_disable_nacl} +%{_libdir}/xwalk/nacl_bootstrap_raw +%{_libdir}/xwalk/nacl_helper +%{_libdir}/xwalk/nacl_helper_bootstrap +%{_libdir}/xwalk/nacl_irt_*.nexe +%{_libdir}/xwalk/pnacl/* +%endif %{_libdir}/xwalk/xwalk %{_libdir}/xwalk/xwalk.pak +%{_libdir}/xwalk/libxwalk_backend_lib.so +%{_libdir}/xwalk/xwalk_backend %{_manifestdir}/%{name}.xml %{_desktop_icondir}/%{name}.png %{_dbusservicedir}/org.crosswalkproject.Runtime1.service %{_systemduserservicedir}/xwalk.service +%{_datadir}/xwalk/*