summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-10-06 06:17:38 (GMT)
committerManuel Bachmann <manuel.bachmann@open.eurogiciel.org>2014-10-06 06:17:38 (GMT)
commitf429403cbd68bc60dc2f3aa16f1682bd3a54283b (patch)
treeb318bafa7a64fc0f34325d0efe7afd7da080e75b
parent471f932f80babc3a9eaab429537b51ca8117621a (diff)
downloadchromium-sandbox/mbachmann/ozone-wayland.zip
chromium-sandbox/mbachmann/ozone-wayland.tar.gz
chromium-sandbox/mbachmann/ozone-wayland.tar.bz2
packaging: speed up RPMs creation, support a "toolkit" modesandbox/mbachmann/ozone-wayland
Speed up RPMS creation by changing the used algorithm (credits : sdx). Put binaries in the right directory, and add a "chromium" wrapper script to run the content_shell. Support a "toolkit" mode which will package separate .so files and create a new "chromium-devel" package which will contain header files. Use it with : gbs build --define 'TOOLKIT 1' Change-Id: Ide9ed8c76502a6ad6d175a10a01fb59c0452fabb Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
-rwxr-xr-xpackaging/chromium14
-rw-r--r--packaging/chromium.spec54
2 files changed, 62 insertions, 6 deletions
diff --git a/packaging/chromium b/packaging/chromium
new file mode 100755
index 0000000..a58f393
--- /dev/null
+++ b/packaging/chromium
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+arch=`uname -m`
+case "$arch" in
+ *64*) libdir="lib64";;
+ *) libdir="lib";;
+esac
+
+if [ -n "$1" ]
+then
+ /usr/$libdir/chromium/content_shell --no-sandbox $1
+else
+ /usr/$libdir/chromium/content_shell --no-sandbox http://www.google.com
+fi
diff --git a/packaging/chromium.spec b/packaging/chromium.spec
index a2d8e16..37e3555 100644
--- a/packaging/chromium.spec
+++ b/packaging/chromium.spec
@@ -7,6 +7,10 @@
# So let's disable nacl for 64-bit now.
%define _disable_nacl 1
+# speed up RPMs creation by using faster algorithms
+%define _source_payload w3.gzdio
+%define _binary_payload w3.gzdio
+
%if "%{NO_DEBUG}" == "1"
%define debug_package %{nil}
%define __debug_install_post %{nil}
@@ -22,6 +26,7 @@ Group: Web Framework/Web Run Time
Url: https://chromium.googlesource.com/chromium
Source: %name-%version.tar
Source1: %name.manifest
+Source2: chromium
Patch1: 0001-do-not-look-for-gtk2.patch
Patch2: 0002-do-not-look-for-webrtc-in-content.patch
Patch3: 0003-add_libyuv_dep_to_content_renderer.patch
@@ -101,10 +106,21 @@ ExclusiveArch:
%description
Chromium is a cross-platform Web browser based on the Blink engine. It is an open source project started by Google (https://chromium.googlesource.com/chromium).
+%if "%{TOOLKIT}" == "1"
+%package devel
+Summary: Development headers for the %{name} package
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+Development files for %{name}, useful only with shared component libraries
+%endif
+
%prep
%setup -q
cp %{SOURCE1} .
+cp %{SOURCE2} .
%patch1
%patch2
@@ -166,6 +182,10 @@ ln -s %{_datadir}/chromium/ozone ozone
# alsa uses "snd_seq_*" objects which are not compiled in in Tizen
GYP_DEFINES="use_ash=1 use_aura=1 chromeos=0 use_cups=0 use_gconf=0 use_gnome_keyring=0 disable_nacl=%{_disable_nacl} enable_webrtc=0 use_system_yasm=1 use_alsa=0"
+%if "%{TOOLKIT}" == "1"
+GYP_DEFINES="${GYP_DEFINES} component=shared_library"
+%endif
+
%if %{with wayland}
GYP_DEFINES="${GYP_DEFINES} use_ozone=1 enable_ozone_wayland_vkb=1 enable_xdg_shell=1"
patch -p1 < ozone/patches/0001-browser-Support-Desktop-Aura-creation-on-Ozone.patch
@@ -209,9 +229,20 @@ ninja %{?_smp_mflags} -C out/Debug content_shell
%install
-install -D -m 755 out/Debug/content_shell %{buildroot}%{_bindir}/content_shell
-install -D -m 755 out/Debug/content_shell.pak %{buildroot}%{_bindir}/content_shell.pak
-install -D -m 755 out/Debug/icudtl.dat %{buildroot}%{_bindir}/icudtl.dat
+install -D -m 755 chromium %{buildroot}%{_bindir}/chromium
+mkdir -p %{buildroot}%{_libdir}/chromium
+install -D -m 755 out/Debug/content_shell %{buildroot}%{_libdir}/chromium/content_shell
+install -D -m 755 out/Debug/content_shell.pak %{buildroot}%{_libdir}/chromium/content_shell.pak
+install -D -m 755 out/Debug/icudtl.dat %{buildroot}%{_libdir}/chromium/icudtl.dat
+%if "%{TOOLKIT}" == "1"
+mkdir -p %{buildroot}%{_libdir}/chromium/lib
+install -D -m 755 out/Debug/lib/*.so %{buildroot}%{_libdir}/chromium/lib/
+mkdir -p %{buildroot}%{_includedir}/chromium
+find . -name "*.h" -exec cp -f --parents {} %{buildroot}%{_includedir}/chromium/ \;
+pushd /usr/share/chromium
+find . -name "*.h" -exec cp -f --parents {} %{buildroot}%{_includedir}/chromium/ \;
+popd
+%endif
# experimental : save the build tree, so we can re-use the binaries next time
%if "%{INCREMENTAL}" == "1"
@@ -224,6 +255,17 @@ mv ../../usr/ /var/tmp/usr
%manifest %{name}.manifest
%defattr(-,root,root)
%license LICENSE
-%{_bindir}/content_shell
-%{_bindir}/content_shell.pak
-%{_bindir}/icudtl.dat
+%{_bindir}/chromium
+%{_libdir}/chromium/content_shell
+%{_libdir}/chromium/content_shell.pak
+%{_libdir}/chromium/icudtl.dat
+%if "%{TOOLKIT}" == "1"
+%{_libdir}/chromium/lib/*.so
+%endif
+
+%if "%{TOOLKIT}" == "1"
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/chromium/*
+%defattr(-,root,root)
+%endif