From 0e1612417c10e33bb65725f6400f5b4300c282a8 Mon Sep 17 00:00:00 2001
From: Toby Merz <realtiaz@gmail.com>
Date: Sat, 6 Apr 2019 09:23:30 +0200
Subject: [PATCH 1/2] New package: vscodium-bin-1.33.0

Closes #10582
---
 srcpkgs/vscodium-bin/REMOVE                 |  9 +++++
 srcpkgs/vscodium-bin/files/vscodium.desktop | 18 ++++++++++
 srcpkgs/vscodium-bin/template               | 37 +++++++++++++++++++++
 3 files changed, 64 insertions(+)
 create mode 100644 srcpkgs/vscodium-bin/REMOVE
 create mode 100644 srcpkgs/vscodium-bin/files/vscodium.desktop
 create mode 100644 srcpkgs/vscodium-bin/template

diff --git a/srcpkgs/vscodium-bin/REMOVE b/srcpkgs/vscodium-bin/REMOVE
new file mode 100644
index 00000000000..2ea0a945cc1
--- /dev/null
+++ b/srcpkgs/vscodium-bin/REMOVE
@@ -0,0 +1,9 @@
+if [ "$UPDATE" = "no" ]; then
+    case "$ACTION" in
+        post)
+            if [ -d usr/lib/vscodium ]; then
+                rm -rf usr/lib/vscodium
+            fi
+        ;;
+    esac
+fi
diff --git a/srcpkgs/vscodium-bin/files/vscodium.desktop b/srcpkgs/vscodium-bin/files/vscodium.desktop
new file mode 100644
index 00000000000..c30625790c0
--- /dev/null
+++ b/srcpkgs/vscodium-bin/files/vscodium.desktop
@@ -0,0 +1,18 @@
+[Desktop Entry]
+Name=VSCodium
+Comment=Code Editing. Redefined.
+GenericName=Text Editor
+Exec=/usr/lib/vscodium/vscodium --unity-launch %F
+Icon=vscodium
+Type=Application
+StartupNotify=true
+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/lib/vscodium/vscodium --new-window %F
+Icon=vscodium
diff --git a/srcpkgs/vscodium-bin/template b/srcpkgs/vscodium-bin/template
new file mode 100644
index 00000000000..dd4281f704b
--- /dev/null
+++ b/srcpkgs/vscodium-bin/template
@@ -0,0 +1,37 @@
+# Template file for 'vscodium-bin'
+pkgname=vscodium-bin
+version=1.33.0
+revision=1
+archs="i686 x86_64"
+create_wrksrc=yes
+depends="GConf libXtst libxkbfile nss dejavu-fonts-ttf"
+short_desc="Binary releases of VS Code without MS branding/telemetry/licensing"
+maintainer="shizonic <realtiaz@gmail.com>"
+license="MIT"
+homepage="https://github.com/VSCodium/vscodium"
+nostrip_files="vscodium"
+
+if [ "${XBPS_TARGET_MACHINE}" = "x86_64" ]; then
+	_archive="VSCodium-linux-x64-${version}.tar.gz"
+	checksum=388506a0bee87a72102bf20d32efaf18d6f5d29286bdda3684f63d87e63c646f
+else
+	_archive="VSCodium-linux-ia32-${version}.tar.gz"
+	checksum=cd2e8dddbb5858bc796279f2727c4ee6794653ddd0b6b4316d05334d4c7f2648
+fi
+distfiles="https://github.com/VSCodium/vscodium/releases/download/${version}/${_archive}"
+
+do_install() {
+	vmkdir usr/lib/vscodium
+	vcopy * usr/lib/vscodium
+
+	vmkdir usr/bin
+	ln -sf /usr/lib/vscodium/bin/vscodium ${DESTDIR}/usr/bin/
+
+	vmkdir usr/share/applications
+	vcopy ${FILESDIR}/vscodium.desktop usr/share/applications/
+
+	vmkdir usr/share/pixmaps
+	ln -sf /usr/lib/vscodium/resources/app/resources/linux/code.png ${DESTDIR}/usr/share/pixmaps/vscodium.png
+
+	vlicense resources/app/LICENSE.txt
+}

From 06868c4b91a2a65d4a13d2469f23a5923d22eff8 Mon Sep 17 00:00:00 2001
From: Toby Merz <realtiaz@gmail.com>
Date: Wed, 19 Jun 2019 10:28:12 +0200
Subject: [PATCH 2/2] vscodium-bin: update to 1.35.1.

---
 srcpkgs/vscodium-bin/files/vscodium.desktop |  4 ++--
 srcpkgs/vscodium-bin/template               | 17 ++++++++++-------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/srcpkgs/vscodium-bin/files/vscodium.desktop b/srcpkgs/vscodium-bin/files/vscodium.desktop
index c30625790c0..2109fd9f1ed 100644
--- a/srcpkgs/vscodium-bin/files/vscodium.desktop
+++ b/srcpkgs/vscodium-bin/files/vscodium.desktop
@@ -2,7 +2,7 @@
 Name=VSCodium
 Comment=Code Editing. Redefined.
 GenericName=Text Editor
-Exec=/usr/lib/vscodium/vscodium --unity-launch %F
+Exec=/usr/lib/vscodium/codium --unity-launch %F
 Icon=vscodium
 Type=Application
 StartupNotify=true
@@ -14,5 +14,5 @@ Keywords=vscode;
 
 [Desktop Action new-empty-window]
 Name=New Empty Window
-Exec=/usr/lib/vscodium/vscodium --new-window %F
+Exec=/usr/lib/vscodium/codium --new-window %F
 Icon=vscodium
diff --git a/srcpkgs/vscodium-bin/template b/srcpkgs/vscodium-bin/template
index dd4281f704b..4e2abf5eed6 100644
--- a/srcpkgs/vscodium-bin/template
+++ b/srcpkgs/vscodium-bin/template
@@ -1,6 +1,6 @@
 # Template file for 'vscodium-bin'
 pkgname=vscodium-bin
-version=1.33.0
+version=1.35.1
 revision=1
 archs="i686 x86_64"
 create_wrksrc=yes
@@ -9,29 +9,32 @@ short_desc="Binary releases of VS Code without MS branding/telemetry/licensing"
 maintainer="shizonic <realtiaz@gmail.com>"
 license="MIT"
 homepage="https://github.com/VSCodium/vscodium"
-nostrip_files="vscodium"
+nostrip_files="codium"
 
 if [ "${XBPS_TARGET_MACHINE}" = "x86_64" ]; then
 	_archive="VSCodium-linux-x64-${version}.tar.gz"
-	checksum=388506a0bee87a72102bf20d32efaf18d6f5d29286bdda3684f63d87e63c646f
+	checksum=6f5bb7c0c65e35cb21d01e806e059d1595b2a89ba95478845cfcc9ec2ea6e714
 else
 	_archive="VSCodium-linux-ia32-${version}.tar.gz"
-	checksum=cd2e8dddbb5858bc796279f2727c4ee6794653ddd0b6b4316d05334d4c7f2648
+	checksum=4350073b44c334c0870bb3f8397153375504f61bb3f06a6897c3c0c3fa14a744
 fi
 distfiles="https://github.com/VSCodium/vscodium/releases/download/${version}/${_archive}"
 
 do_install() {
+    sed -i 's,/usr/share/codium,/usr/lib/vscodium,g' bin/codium
+
 	vmkdir usr/lib/vscodium
 	vcopy * usr/lib/vscodium
 
 	vmkdir usr/bin
-	ln -sf /usr/lib/vscodium/bin/vscodium ${DESTDIR}/usr/bin/
+	ln -sf /usr/lib/vscodium/bin/codium ${DESTDIR}/usr/bin/codium
+    ln -sf /usr/lib/vscodium/bin/codium ${DESTDIR}/usr/bin/vscodium
 
 	vmkdir usr/share/applications
-	vcopy ${FILESDIR}/vscodium.desktop usr/share/applications/
+	vinstall ${FILESDIR}/vscodium.desktop 644 usr/share/applications
 
 	vmkdir usr/share/pixmaps
-	ln -sf /usr/lib/vscodium/resources/app/resources/linux/code.png ${DESTDIR}/usr/share/pixmaps/vscodium.png
+    vinstall resources/app/resources/linux/code.png 644 usr/share/pixmaps vscodium.png
 
 	vlicense resources/app/LICENSE.txt
 }
