]> git.pld-linux.org Git - packages/chromium-browser.git/commitdiff
setup master preferences file
authorElan Ruusamäe <glen@delfi.ee>
Sun, 30 Dec 2012 13:12:23 +0000 (15:12 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Sun, 30 Dec 2012 13:15:05 +0000 (15:15 +0200)
setup pld as homepage and first run open tab

chromium-browser.spec
master-prefs-path.patch [new file with mode: 0644]
master_preferences.json [new file with mode: 0644]

index e412bdab6c8947be12f4b72caa35e2bb8f913600..fe2c35cb8d580ec1af4631ff16de9737ae3af205 100644 (file)
@@ -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 (file)
index 0000000..298613f
--- /dev/null
@@ -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 (file)
index 0000000..434865e
--- /dev/null
@@ -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
+}
This page took 0.101025 seconds and 4 git commands to generate.