summaryrefslogtreecommitdiff
path: root/packaging/chromium.spec
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/chromium.spec')
-rw-r--r--packaging/chromium.spec54
1 files changed, 48 insertions, 6 deletions
diff --git a/packaging/chromium.spec b/packaging/chromium.spec
index a2d8e1698282..37e35551821f 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