Skip to content

Instantly share code, notes, and snippets.

@Xaekai
Last active April 7, 2020 22:10
Show Gist options
  • Save Xaekai/c026bfb318647e7f1b9c510b6ac40136 to your computer and use it in GitHub Desktop.
Save Xaekai/c026bfb318647e7f1b9c510b6ac40136 to your computer and use it in GitHub Desktop.
Patch for woefully insufficient PKGBUILD for vscodium
diff --git a/PKGBUILD b/PKGBUILD
index 9ddf03d..7677852 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,12 +1,14 @@
# Maintainer: Salamandar <felix <at> piedallu <dot> me >
# Inspired from the PKGBUILD for vscodium-bin
+# Contributor: Xaekai <aur <at> pink <dot> horse >
pkgname=vscodium-git
-pkgver=1.43.1
-pkgrel=2
+pkgver=1.43.2
+pkgrel=3
pkgdesc="VS Code without MS branding/telemetry/licensing."
arch=('x86_64' 'aarch64' 'armv7h')
-url='https://github.com/VSCodium/vscodium'
+url='https://github.com/VSCodium/vscodium.git'
+urlupstream='https://github.com/Microsoft/vscode.git'
license=('MIT')
_electron='electron6'
@@ -33,11 +35,18 @@ makedepends=(
'yarn'
'jq'
'libxdmcp'
+ 'git'
+ 'wget'
+ 'npm'
+ 'rpm-tools'
+ 'imagemagick'
+ 'dpkg'
+ #'fuse'
)
source=(
"git+${url}"
- 'git+https://github.com/Microsoft/vscode.git'
+ "git+${urlupstream}"
'vscodium.desktop'
)
sha256sums=(
@@ -84,17 +93,26 @@ build() {
export LATEST_MS_COMMIT=$(git rev-list --tags --max-count=1)
export LATEST_MS_TAG=$(git describe --tags "${LATEST_MS_COMMIT}")
+ # prevent automatic invocation of packagemanager for something already installed
+ # it prompts for a sudo password even though builduser is nopasswd in sudoers
+ sed -i -e 's/sudo apt-get/#sudo apt-get/' create_appimage.sh
+
+ # prevent attempt to use FUSE
+ sed -i -e 's/pkg2appimage/pkg2appimage --appimage-extract/' create_appimage.sh
+
./build.sh
}
package() {
+ pkgname='vscodium'
install -d -m755 ${pkgdir}/usr/bin
install -d -m755 ${pkgdir}/usr/share/{${pkgname},applications,pixmaps}
cp -r ${srcdir}/${pkgname} ${pkgdir}/usr/share
ln -s /usr/share/${pkgname}/bin/codium ${pkgdir}/usr/bin/code
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 vscodium-bin.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
- install -D -m644 ${srcdir}/${pkgname}/resources/app/resources/linux/code.png \
+ install -D -m644 vscodium.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
+ # This file is in a different place in source than a binary package
+ install -D -m644 ${srcdir}/${pkgname}/vscode/resources/linux/code.png \
${pkgdir}/usr/share/pixmaps/vscodium.png
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment