[packages/chromium-browser] setup master preferences file
glen
glen at pld-linux.org
Sun Dec 30 14:15:50 CET 2012
commit 0562b86490500fc18588939d7e333ba345035c91
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Dec 30 15:12:23 2012 +0200
setup master preferences file
setup pld as homepage and first run open tab
chromium-browser.spec | 7 ++++++-
master-prefs-path.patch | 14 ++++++++++++++
master_preferences.json | 27 +++++++++++++++++++++++++++
3 files changed, 47 insertions(+), 1 deletion(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index e412bda..fe2c35c 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -69,7 +69,7 @@
Summary: A WebKit powered web browser
Name: chromium-browser
Version: %{branch}.%{patchver}
-Release: 1
+Release: 2
License: BSD, LGPL v2+ (ffmpeg)
Group: X11/Applications/Networking
Source0: http://carme.pld-linux.org/~glen/chromium-browser/src/stable/%{name}-%{branch}.%{basever}.tar.xz
@@ -85,6 +85,7 @@ Source5: find-lang.sh
Source6: update-source.sh
Source7: clean-source.sh
Source8: get-source.sh
+Source9: master_preferences.json
#Patch10: system-libs.patch
Patch1: plugin-searchdirs.patch
Patch2: gyp-system-minizip.patch
@@ -106,6 +107,7 @@ Patch19: system-jsoncpp.patch
Patch20: system-speex.patch
Patch21: system-srtp.patch
Patch22: gnome3-volume-control.patch
+Patch23: master-prefs-path.patch
URL: http://www.chromium.org/Home
%{?with_gconf:BuildRequires: GConf2-devel}
BuildRequires: OpenGL-GLU-devel
@@ -269,6 +271,7 @@ cd src
cd ..
%patch18 -p1
%patch20 -p1
+%patch23 -p1
cd src
@@ -412,6 +415,7 @@ install -p chrome_sandbox $RPM_BUILD_ROOT%{_libdir}/%{name}/chromium-sandbox
install -p libffmpegsumo.so $RPM_BUILD_ROOT%{_libdir}/%{name}
%endif
cp -p %{SOURCE3} $RPM_BUILD_ROOT%{_desktopdir}
+cp -p %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/master_preferences
%{__rm} -r $RPM_BUILD_ROOT%{_libdir}/%{name}/resources/extension/demo
@@ -471,6 +475,7 @@ fi
%config(noreplace) %verify(not md5 mtime size) %{_browserpluginsconfdir}/blacklist.d/%{name}.*.blacklist
%dir %{_sysconfdir}/%{name}
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/default
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/master_preferences
%attr(755,root,root) %{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%{_desktopdir}/*.desktop
diff --git a/master-prefs-path.patch b/master-prefs-path.patch
new file mode 100644
index 0000000..298613f
--- /dev/null
+++ b/master-prefs-path.patch
@@ -0,0 +1,14 @@
+Index: chromium/src/chrome/browser/first_run/first_run_linux.cc
+===================================================================
+--- chromium.orig/src/chrome/browser/first_run/first_run_linux.cc
++++ chromium/src/chrome/browser/first_run/first_run_linux.cc
+@@ -100,8 +100,7 @@ void AutoImport(
+ FilePath MasterPrefsPath() {
+ // The standard location of the master prefs is next to the chrome binary.
+ FilePath master_prefs;
+- if (!PathService::Get(base::DIR_EXE, &master_prefs))
+- return FilePath();
++ master_prefs = FilePath("/etc/chromium-browser");
+ return master_prefs.AppendASCII(installer::kDefaultMasterPrefs);
+ }
+
diff --git a/master_preferences.json b/master_preferences.json
new file mode 100644
index 0000000..434865e
--- /dev/null
+++ b/master_preferences.json
@@ -0,0 +1,27 @@
+{
+ "distribution": {
+ "skip_first_run_ui": true,
+ "import_bookmarks_from_file": "/etc/chromium-browser/default_bookmarks.html",
+ "alternate_shortcut_text": false,
+ "chrome_shortcut_icon_index": 0,
+ "create_all_shortcuts": true,
+ "show_welcome_page": true,
+ "make_chrome_default": false,
+ "make_chrome_default_for_user": false,
+ "system_level": false,
+ "verbose_logging": false
+ },
+ "browser": {
+ "show_home_button": true,
+ "check_default_browser": false
+ },
+ "bookmark_bar": {
+ "show_on_all_tabs": true
+ },
+ "first_run_tabs": [
+ "https://www.pld-linux.org/",
+ "https://www.google.com/intl/en/chrome/browser/welcome.html"
+ ],
+ "homepage": "https://www.pld-linux.org/",
+ "homepage_is_newtabpage": false
+}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/0562b86490500fc18588939d7e333ba345035c91
More information about the pld-cvs-commit
mailing list