Skip to content

Commit

Permalink
Use appdata.xml and desktop files from upstream
Browse files Browse the repository at this point in the history
Instead of importing a copy here.
  • Loading branch information
cosimoc committed Aug 10, 2018
1 parent 6182e78 commit 05b4365
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 113 deletions.
72 changes: 0 additions & 72 deletions com.google.Chrome.appdata.xml

This file was deleted.

33 changes: 0 additions & 33 deletions com.google.Chrome.desktop

This file was deleted.

31 changes: 23 additions & 8 deletions com.google.Chrome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"app-id": "com.google.Chrome",
"rename-appdata-file": "google-chrome.appdata.xml",
"rename-desktop-file": "google-chrome.desktop",
"rename-icon": "google-chrome",
"runtime": "org.freedesktop.Platform",
"runtime-version": "1.6",
"sdk": "org.freedesktop.Sdk",
Expand All @@ -18,11 +21,26 @@
},
{
"type": "file",
"path": "com.google.Chrome.appdata.xml"
"url": "https://raw.githubusercontent.com/chromium/chromium/68.0.3440.84/chrome/installer/linux/common/desktop.template",
"sha256": "0ed6e52311026e0f4e98d7f94832eddf59f0b9d5114551f5e9ad886050f48d21",
"dest": "metadata"
},
{
"type": "file",
"path": "com.google.Chrome.desktop"
"url": "https://raw.githubusercontent.com/chromium/chromium/68.0.3440.84/chrome/installer/linux/common/google-chrome/google-chrome.appdata.xml.template",
"sha256": "053cdc185c4687ad93b32b4725619993104e5cf16134adaf493327b089fd3098",
"dest": "metadata"
},
{
"type": "file",
"url": "https://raw.githubusercontent.com/chromium/chromium/68.0.3440.84/chrome/installer/linux/common/google-chrome/google-chrome.info",
"sha256": "f41cd84a84956ff339e7c0fd2e730d18ad2d712eb67c986bfe5f66c8d1c17084",
"dest": "metadata"
},
{
"type": "file",
"path": "metadata-writer",
"dest": "metadata"
},
{
"type": "file",
Expand All @@ -41,13 +59,10 @@
"install -d /app/bin",
"install google-chrome-launcher /app/bin/google-chrome-launcher",

"install -d /app/share/appdata",
"install -m644 com.google.Chrome.appdata.xml /app/share/appdata/com.google.Chrome.appdata.xml",

"install -d /app/share/applications",
"install -m644 com.google.Chrome.desktop /app/share/applications/com.google.Chrome.desktop",
"chmod +x metadata/metadata-writer",
"cd metadata && ./metadata-writer",

"for icon_size in 64 128 256; do install -d /app/share/icons/hicolor/${icon_size}x${icon_size}/apps; install -m644 product_logo_${icon_size}.png /app/share/icons/hicolor/${icon_size}x${icon_size}/apps/com.google.Chrome.png; done"
"for icon_size in 64 128 256; do install -d /app/share/icons/hicolor/${icon_size}x${icon_size}/apps; install -m644 product_logo_${icon_size}.png /app/share/icons/hicolor/${icon_size}x${icon_size}/apps/google-chrome.png; done"
]
},
{
Expand Down
20 changes: 20 additions & 0 deletions metadata-writer
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

source google-chrome.info

do_subst () {
sed -e "s|@@FULLDESC@@|${FULLDESC}|g" \
-e "s|@@MENUNAME@@|${MENUNAME}|g" \
-e "s|@@PACKAGE@@|${PACKAGE}|g" \
-e "s|@@PRODUCTURL@@|${PRODUCTURL}|g" \
-e "s|@@SHORTDESC@@|${SHORTDESC}|g" \
-e "s|/usr/bin/@@USR_BIN_SYMLINK_NAME@@|google-chrome-launcher|g" \
$1 > $2
echo "Generated $2 from $1"
}

install -d /app/share/applications
install -d /app/share/appdata

do_subst desktop.template /app/share/applications/google-chrome.desktop
do_subst google-chrome.appdata.xml.template /app/share/appdata/google-chrome.appdata.xml

0 comments on commit 05b4365

Please sign in to comment.