2021-12-17 17:21:31 -05:00
|
|
|
name: codium
|
|
|
|
adopt-info: codium
|
|
|
|
summary: Code editing. Redefined.
|
|
|
|
description: |
|
|
|
|
Binary releases of Code without branding/telemetry/licensing
|
|
|
|
|
|
|
|
base: core18
|
|
|
|
grade: stable
|
|
|
|
confinement: classic
|
|
|
|
compression: lzo
|
|
|
|
|
|
|
|
parts:
|
|
|
|
codium:
|
|
|
|
plugin: nil
|
|
|
|
override-build: |
|
|
|
|
set -eu
|
|
|
|
ARCHITECTURE=$(dpkg --print-architecture)
|
|
|
|
# Get GitHub releases
|
|
|
|
wget --quiet https://api.github.com/repos/VSCodium/vscodium/releases -O latest.json
|
|
|
|
VERSION=$(jq -r 'sort_by(.tag_name)|last.tag_name' latest.json)
|
|
|
|
DEB_URL=$(jq -r 'map(select(.tag_name == "'"$VERSION"'"))|first.assets[].browser_download_url|select(endswith("'"_$ARCHITECTURE.deb"'"))' latest.json)
|
|
|
|
DEB=$(basename "${DEB_URL}")
|
|
|
|
# Downloading .deb"
|
|
|
|
wget "${DEB_URL}" -O "${SNAPCRAFT_PART_INSTALL}/${DEB}"
|
|
|
|
# Unpacking .deb"
|
|
|
|
dpkg -x "${SNAPCRAFT_PART_INSTALL}/${DEB}" ${SNAPCRAFT_PART_INSTALL}
|
|
|
|
rm -f latest.json
|
|
|
|
rm -f "${SNAPCRAFT_PART_INSTALL}/${DEB}"
|
|
|
|
# Set version
|
|
|
|
snapcraftctl set-version "$VERSION"
|
2021-12-17 23:17:12 -05:00
|
|
|
# Correct path to icon.
|
|
|
|
sed -i 's|Icon=vscodium|Icon=${SNAP}/usr/share/pixmaps/vscodium.png|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium.desktop
|
|
|
|
sed -i 's|Exec=/usr/share/codium/codium|Exec=codium|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium.desktop
|
|
|
|
sed -i 's|Icon=vscodium|Icon=/usr/share/pixmaps/vscodium.png|g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/codium-url-handler.desktop
|
2021-12-17 17:21:31 -05:00
|
|
|
build-packages:
|
|
|
|
- wget
|
2021-12-17 23:17:12 -05:00
|
|
|
- jq
|
2021-12-17 17:21:31 -05:00
|
|
|
stage-packages:
|
|
|
|
- fcitx-frontend-gtk3
|
|
|
|
- gvfs-libs
|
|
|
|
- libasound2
|
|
|
|
- libgconf-2-4
|
|
|
|
- libglib2.0-bin
|
|
|
|
- libgnome-keyring0
|
|
|
|
- libgtk-3-0
|
|
|
|
- libnotify4
|
|
|
|
- libnspr4
|
|
|
|
- libnss3
|
|
|
|
- libpcre3
|
|
|
|
- libpulse0
|
|
|
|
- libsecret-1-0
|
2021-12-18 04:24:44 -05:00
|
|
|
- libxshmfence1
|
2021-12-17 17:21:31 -05:00
|
|
|
- libxss1
|
|
|
|
- libxtst6
|
|
|
|
- zlib1g
|
2021-12-17 23:17:12 -05:00
|
|
|
- libx11-xcb1
|
|
|
|
- libxkbfile1
|
|
|
|
- libdrm2
|
|
|
|
- libgbm1
|
|
|
|
- libxcb-dri3-0
|
2021-12-17 17:21:31 -05:00
|
|
|
prime:
|
|
|
|
- -usr/share/doc
|
|
|
|
- -usr/share/fonts
|
|
|
|
- -usr/share/icons
|
|
|
|
- -usr/share/lintian
|
|
|
|
- -usr/share/man
|
2021-12-17 23:17:12 -05:00
|
|
|
- -usr/share/codium/chrome-sandbox
|
2021-12-17 17:21:31 -05:00
|
|
|
|
|
|
|
electron-launch:
|
|
|
|
after:
|
|
|
|
- codium
|
|
|
|
plugin: dump
|
2021-12-17 20:25:18 -05:00
|
|
|
source: snap/local
|
2021-12-17 17:21:31 -05:00
|
|
|
|
|
|
|
apps:
|
|
|
|
codium:
|
|
|
|
command: electron-launch $SNAP/usr/share/codium/bin/codium --no-sandbox
|
2021-12-18 04:24:44 -05:00
|
|
|
desktop: usr/share/applications/codium.desktop
|
2021-12-17 17:21:31 -05:00
|
|
|
environment:
|
|
|
|
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|
|
|
|
|
|
|
|
url-handler:
|
|
|
|
command: electron-launch $SNAP/usr/share/codium/bin/codium --open-url --no-sandbox
|
2021-12-18 04:24:44 -05:00
|
|
|
desktop: usr/share/applications/codium-url-handler.desktop
|
2021-12-17 17:21:31 -05:00
|
|
|
environment:
|
|
|
|
GSETTINGS_SCHEMA_DIR: $SNAP/usr/share/glib-2.0/schemas
|