Created
June 3, 2024 06:11
-
-
Save kseistrup/0892d830bb76fc1265ad203dde9b4900 to your computer and use it in GitHub Desktop.
PKGBUILD for JetBrains Space
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- sh -*- | |
# Maintainer: Katie Volz <iggyvolz@gmail.com> | |
# Contributor: Klaus Alexander Seistrup <klaus@seistrup.dk> | |
pkgname='jetbrains-space' | |
pkgver=2023.1.7 | |
pkgrel=1 | |
pkgdesc='All-in-one collaboration solution for software development, instant communication, and team and project management' | |
arch=('x86_64') | |
url='https://jetbrains.space/' | |
license=('LicenseRef-JetBrains-Proprietary') # SPDX-License-Identifier: LicenseRef-JetBrains-Proprietary | |
depends=( | |
'alsa-lib' | |
'at-spi2-core' | |
'cairo' | |
'dbus' | |
'expat' | |
'gcc-libs' | |
'glib2' | |
'glibc' | |
'gtk3' | |
'libcups' | |
'libdrm' | |
'libx11' | |
'libxcb' | |
'libxcomposite' | |
'libxdamage' | |
'libxext' | |
'libxfixes' | |
'libxkbcommon' | |
'libxrandr' | |
'mesa' | |
'nspr' | |
'nss' | |
'pango' | |
) | |
makedepends=('squashfs-tools') | |
_snap="$pkgname-$pkgver.snap" | |
# https://search.apps.ubuntu.com/api/v1/package/space -> download_url | |
source=("$_snap::https://api.snapcraft.io/api/v1/snaps/download/h2GSR1wZNkxXqL4g6jfQichyULVb2ucl_41.snap") | |
sha512sums=('4969154a5fceac28e644099d0cb3fa60e074ddfc6de98a9fd8a747e8774f3a75d5484cc9d0ce1bc088f83828dd9e4002f15a4e6d59c8dc59ee2a153512bf56f0') | |
noextract=("$_snap") | |
options=('!emptydirs') | |
prepare() { | |
unsquashfs -f "$_snap" | |
} | |
package() { | |
mkdir -p "$pkgdir/opt" | |
cp -R "$srcdir/squashfs-root" "$pkgdir/opt/space" | |
# Remove libraries that are already found in system | |
for _lib in "$pkgdir/opt/space/"lib*.so{,.1}; do | |
case "$_lib" in | |
# — except libffmpeg.so | |
*/libffmpeg.so* ) continue ;; | |
* ) rm -vf "$_lib" ;; | |
esac | |
done | |
rm -vrf "$pkgdir/opt/space/lib/" | |
rm -vrf "$pkgdir/opt/space/usr/lib/" | |
# Remove Snap related shell scripts | |
rm -vrf "$pkgdir/opt/space/"*.sh | |
mkdir -p "$pkgdir/usr/bin" | |
ln -s "../../opt/space/space" "$pkgdir/usr/bin/space" | |
sed -i "s@\${SNAP}@/opt/space@" "$srcdir/squashfs-root/meta/gui/space.desktop" | |
install -vDm0644 -t "$pkgdir/usr/share/applications" \ | |
"$srcdir/squashfs-root/meta/gui/space.desktop" | |
cat <<EOF | install -vDm0644 /dev/stdin "$pkgdir/usr/share/licenses/$pkgname/LICENSE" | |
Proprietary license | |
EOF | |
} | |
# eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment