-
Notifications
You must be signed in to change notification settings - Fork 215
/
Google_Chrome.yml
44 lines (41 loc) · 2.8 KB
/
Google_Chrome.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# TODO: Add https://www.i-dont-care-about-cookies.eu/ - https://github.com/uBlockOrigin/uBlock-issues/issues/196#issuecomment-417963577
#
# We are not allowed to redistribute AppImages of Google Chrome,
# but you can easily make your own using this recipe like this on a Debian/Ubuntu system:
# wget -c "https://github.com/AppImage/pkg2appimage/raw/master/pkg2appimage"
# bash -ex pkg2appimage Google_Chrome
app: google-chrome
ingredients:
package: google-chrome-stable
dist: trusty
sources:
- deb http://us.archive.ubuntu.com/ubuntu/ trusty main universe
script:
- wget -c "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
- URL2=$(wget -q "https://api.github.com/repos/gorhill/uBlock/releases" -O - | grep browser_download_url | grep '.chromium.zip"' | head -n 1 | cut -d '"' -f 4)
- wget -c "$URL2"
- unzip *.chromium.zip
- export cs_extension_version=$(grep -r '"version":' uBlock0.chromium/manifest.json | cut -d '"' -f 4) # 1.16.13.101
- export cs_extension_id=$(wget -q "https://raw.githubusercontent.com/gorhill/uBlock/master/dist/chromium/publish-beta.py" -O - | grep "cs_extension_id =" | head -n 1 | cut -d "'" -f 2) # cgbcahbpdhpcegmbfconppldiemgcoii
script:
- mv ./opt/google/chrome/product_logo_64.png usr/share/icons/hicolor/64x64/apps/google-chrome.png
- mv ./opt/google/chrome/product_logo_32.png usr/share/icons/hicolor/32x32/apps/google-chrome.png
- mv ./opt/google/chrome/product_logo_256.png usr/share/icons/hicolor/256x256/apps/google-chrome.png
- mv ./opt/google/chrome/product_logo_24.png usr/share/icons/hicolor/24x24/apps/google-chrome.png
- mv ./opt/google/chrome/product_logo_128.png usr/share/icons/hicolor/128x128/apps/google-chrome.png
- mv ./opt/google/chrome/product_logo_48.png usr/share/icons/hicolor/48x48/apps/google-chrome.png
- cp usr/share/icons/hicolor/256x256/apps/google-chrome.png .
- sed -i -e 's|/usr/bin/google-chrome-stable %U|AppRun|g' google-chrome.desktop
- sed -i -e 's|3.26|3.00|g' opt/google/chrome/chrome
- cat > ./AppRun <<\EOF
- #!/bin/sh
- HERE=$(dirname $(readlink -f "${0}"))
- export LD_LIBRARY_PATH="${HERE}"/usr/lib:$PATH
- "${HERE}"/opt/google/chrome/google-chrome --password-store=basic $@
- EOF
- chmod a+x ./AppRun
- ./opt/google/chrome/chrome --version | grep -Eo "[0-9.]+" | head -n 1 > ../VERSION
- sed -i -e 's|// Drive extension|"cs_extension_id" : { "external_crx": "uBlock0.crx", "external_version": "cs_extension_version" },|g' opt/google/chrome/default_apps/external_extensions.json
- sed -i -e 's|cs_extension_id|'"$cs_extension_id"'|g' opt/google/chrome/default_apps/external_extensions.json
- sed -i -e 's|cs_extension_version|'"$cs_extension_version"'|g' opt/google/chrome/default_apps/external_extensions.json
- cp ../*.chromium.zip ./opt/google/chrome/default_apps/uBlock0.crx