summaryrefslogtreecommitdiffstats
path: root/src/electron/vscodium
diff options
context:
space:
mode:
authorLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-05 16:58:55 +0100
committerLibravatarLarge Libravatar memdmp <memdmpestrogenzone>2025-01-05 16:58:55 +0100
commitcbf7ff3317301eba3cea52add69d390cbed5d7c4 (patch)
tree0da106f2e1bab02925c7d2de9851424d2bf15762 /src/electron/vscodium
parentcffde6b78d41825e862e2542c485030d8e2733af (diff)
downloadalpine-packages-cbf7ff3317301eba3cea52add69d390cbed5d7c4.tar.gz
alpine-packages-cbf7ff3317301eba3cea52add69d390cbed5d7c4.tar.bz2
alpine-packages-cbf7ff3317301eba3cea52add69d390cbed5d7c4.tar.lz
alpine-packages-cbf7ff3317301eba3cea52add69d390cbed5d7c4.zip

feat: vscodium

Diffstat (limited to 'src/electron/vscodium')
-rw-r--r--src/electron/vscodium/APKBUILD135
-rw-r--r--src/electron/vscodium/freedesktop/vscodium-uri-handler.desktop13
-rw-r--r--src/electron/vscodium/freedesktop/vscodium-wayland.desktop19
-rw-r--r--src/electron/vscodium/freedesktop/vscodium.desktop19
4 files changed, 186 insertions, 0 deletions
diff --git a/src/electron/vscodium/APKBUILD b/src/electron/vscodium/APKBUILD
new file mode 100644
index 0000000..09e8a20
--- /dev/null
+++ b/src/electron/vscodium/APKBUILD
@@ -0,0 +1,135 @@
+# Contributor: memdmp <memdmp@estrogen.zone>
+# Maintainer: memdmp <memdmp@estrogen.zone>
+
+# Originally based on AUR package for vscodium
+pkgname=vscodium
+pkgver=1.96.0.24347
+pkgrel=0
+pkgdesc="Binary releases of VS Code without MS branding/telemetry/licensing"
+url="https://github.com/VSCodium/vscodium"
+#arch="all"
+arch="x86_64"
+license="MIT"
+depends="fontconfig libxtst gtk+3.0 alsa-lib nss libnotify libxscrnsaver musl libxkbfile"
+makedepends="nodejs-current yarn npm jq git git-lfs patch python3 py3-distutils-extra pkgconf bash krb5-dev libx11-dev libxkbfile-dev"
+checkdepends=""
+options="net"
+install=""
+subpackages=""
+source="
+freedesktop/${pkgname}.desktop
+freedesktop/${pkgname}-wayland.desktop
+freedesktop/${pkgname}-uri-handler.desktop
+${pkgname}-${pkgver}.tar.gz::https://github.com/VSCodium/vscodium/releases/download/${pkgver}/VSCodium-${pkgver}-src.tar.gz
+"
+builddir="$srcdir/"
+
+case "$CARCH" in
+ x86_64)
+ _vscode_arch=x64
+ ;;
+ aarch64)
+ _vscode_arch=arm64
+ ;;
+ armv7h)
+ _vscode_arch=arm
+ ;;
+ *)
+ # Needed for mksrcinfo
+ _vscode_arch=DUMMY
+ ;;
+esac
+build() {
+# Deactivate any pre-loaded nvm, and make sure we use our own in the current source directory
+# command -v nvm >/dev/null && nvm deactivate && nvm unload
+# export NVM_DIR="${srcdir}/.nvm"
+# source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]]
+
+ # Install the correct version of NodeJS (read from .nvmrc)
+# nvm install $(cat .nvmrc)
+# nvm use
+
+ # Check if the correct version of node is being used
+# nvmrc_version="$(cat .nvmrc)"
+# if [[ "$nvmrc_version" != "v"* ]]
+# then
+ # Add the v prefix, because it seems to be missing in .nvmrc
+# echo "Configured .nvmrc version is [$nvmrc_version], adding the v prefix before checking if it matches with the node command."
+# nvmrc_version="v$nvmrc_version"
+# fi
+
+ # Now check if the version matches exactly, or at least starts with the same prefix
+# if [[ "$(node --version)" != "$nvmrc_version"* ]]
+# then
+# echo "Using the wrong version of NodeJS! Expected ["$nvmrc_version"] but using ["$(node --version)"]."
+# exit 1
+# fi
+# echo "Installed version of node ["$(node --version)"] matches required version ["$nvmrc_version"], continuing."
+
+ # Remove old build
+ if [ -d "vscode" ]; then
+ rm -rf vscode* VSCode*
+ fi
+
+ # Export necessary environment variables
+ export SHOULD_BUILD="yes"
+ export SHOULD_BUILD_REH="no"
+ export CI_BUILD="no"
+ export OS_NAME="linux"
+ export VSCODE_ARCH="$_vscode_arch"
+ export VSCODE_QUALITY="stable"
+ export RELEASE_VERSION="$pkgver"
+ # the app will be updated with apk
+ export DISABLE_UPDATE="yes"
+
+ # Disabling this patch, since it is for win32 and does not apply here
+ rm -rf patches/cleanup-archive.patch
+ # Same for ppc64le-support.patch since that is not a supported architecture
+ rm -rf patches/ppc64le-support.patch
+ bash -c '
+ set -eax
+ . get_repo.sh
+ . build.sh
+ '
+}
+
+check() {
+ # Replace with proper check command(s).
+ # Remove and add !check option if there is no check command.
+ :
+}
+
+package() {
+ bash -c "
+ set -eax
+ install -d -m755 ${pkgdir}/usr/bin
+ install -d -m755 ${pkgdir}/usr/share/{${pkgname},applications,pixmaps}
+ install -d -m755 ${pkgdir}/usr/share/licenses/${pkgname}
+
+ cp -r ${srcdir}/VSCode-linux-${_vscode_arch}/* ${pkgdir}/usr/share/${pkgname}
+ cp -r ${srcdir}/VSCode-linux-${_vscode_arch}/resources/app/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}
+
+ ln -s /usr/share/${pkgname}/bin/codium ${pkgdir}/usr/bin/codium
+ ln -s /usr/share/${pkgname}/bin/codium ${pkgdir}/usr/bin/vscodium
+
+ install -D -m644 ${pkgname}.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ install -D -m644 ${pkgname}-wayland.desktop ${pkgdir}/usr/share/applications/${pkgname}-wayland.desktop
+ install -D -m644 ${pkgname}-uri-handler.desktop ${pkgdir}/usr/share/applications/${pkgname}-uri-handler.desktop
+ install -D -m644 ${srcdir}/VSCode-linux-${_vscode_arch}/resources/app/resources/linux/code.png ${pkgdir}/usr/share/pixmaps/${pkgname}.png
+
+ # Symlink shell completions
+ # TODO: split into completion packages
+ install -d -m755 ${pkgdir}/usr/share/zsh/site-functions
+ install -d -m755 ${pkgdir}/usr/share/bash-completion/completions
+ ln -s /usr/share/${pkgname}/resources/completions/zsh/_codium ${pkgdir}/usr/share/zsh/site-functions
+ ln -s /usr/share/${pkgname}/resources/completions/bash/codium ${pkgdir}/usr/share/bash-completion/completions
+ "
+}
+
+sha512sums="
+9d23e7b2484773d77437f882d8669a423cea9511e366b18795c450148aacf609993d8eb2200fbb0b7573a3740e2d84944a428e56d3d78785f32de1041120dbfd vscodium.desktop
+16f560738d72d7dec918c716c9f3073249d76175743b8ffa8b21764913f3d990b16467bdeb6be43aa80a45787bf4e6deb55d0ac132a8bebed06d76f6f383cf97 vscodium-wayland.desktop
+999fce259ff9a9217a756c916ed8a75bf211ecf61b5d65e0b10f6d9e27c0fca384ad6429198a2c8d6788889d77fc1b8be7af6e71bfd50dcaaf0085638bf5637c vscodium-uri-handler.desktop
+3e6877b987f1ef1ec0fd8606d1fb544f8045d645257fee894bbc47168f5bdd6353d00ad6331f6c102cd0d993ffe8aac34e580911b65550ba1bec542a0ca46de5 vscodium-1.96.0.24347.tar.gz
+"
+
diff --git a/src/electron/vscodium/freedesktop/vscodium-uri-handler.desktop b/src/electron/vscodium/freedesktop/vscodium-uri-handler.desktop
new file mode 100644
index 0000000..4844f11
--- /dev/null
+++ b/src/electron/vscodium/freedesktop/vscodium-uri-handler.desktop
@@ -0,0 +1,13 @@
+[Desktop Entry]
+Name=VSCodium - URL Handler
+Comment=Code Editing. Redefined.
+GenericName=Text Editor
+Exec=/usr/bin/codium --open-url %U
+Icon=vscodium
+Type=Application
+NoDisplay=true
+StartupNotify=false
+Categories=Utility;TextEditor;Development;IDE;
+MimeType=x-scheme-handler/vscode;
+Keywords=vscode;
+
diff --git a/src/electron/vscodium/freedesktop/vscodium-wayland.desktop b/src/electron/vscodium/freedesktop/vscodium-wayland.desktop
new file mode 100644
index 0000000..20329cb
--- /dev/null
+++ b/src/electron/vscodium/freedesktop/vscodium-wayland.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Name=VSCodium - Wayland
+Comment=Code Editing. Redefined.
+GenericName=Text Editor
+Exec=/usr/bin/codium --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland %F
+Icon=vscodium
+Type=Application
+StartupNotify=false
+StartupWMClass=codium-url-handler
+Categories=Utility;Development;IDE;
+MimeType=text/plain;inode/directory;
+Actions=new-empty-window;
+Keywords=vscode;
+
+[Desktop Action new-empty-window]
+Name=New Empty Window
+Exec=/usr/bin/codium --enable-features=UseOzonePlatform,WaylandWindowDecorations --ozone-platform=wayland --new-window %F
+Icon=vscodium
+
diff --git a/src/electron/vscodium/freedesktop/vscodium.desktop b/src/electron/vscodium/freedesktop/vscodium.desktop
new file mode 100644
index 0000000..453d57c
--- /dev/null
+++ b/src/electron/vscodium/freedesktop/vscodium.desktop
@@ -0,0 +1,19 @@
+[Desktop Entry]
+Name=VSCodium
+Comment=Code Editing. Redefined.
+GenericName=Text Editor
+Exec=/usr/bin/codium %F
+Icon=vscodium
+Type=Application
+StartupNotify=false
+StartupWMClass=VSCodium
+Categories=Utility;Development;IDE;
+MimeType=text/plain;inode/directory;
+Actions=new-empty-window;
+Keywords=vscode;
+
+[Desktop Action new-empty-window]
+Name=New Empty Window
+Exec=/usr/bin/codium --new-window %F
+Icon=vscodium
+