Skip to content

Commit

Permalink
add: zed-editor-stable-bin, zed-editor-preview-bin
Browse files Browse the repository at this point in the history
  • Loading branch information
bibelin committed Oct 1, 2024
1 parent 65b0c54 commit c59fead
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packagelist
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,8 @@ youtube-dl-git
youtube-music-deb
yt-dlp
zap
zed-editor-preview-bin
zed-editor-stable-bin
zen-browser-generic-bin
zen-browser-specific-bin
zentile-bin
Expand Down
18 changes: 18 additions & 0 deletions packages/zed-editor-preview-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pkgbase = zed-editor-preview-bin
gives = zed-editor-preview
pkgver = 0.155.1
pkgdesc = A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter (Preview release)
url = https://zed.dev
arch = x86_64
arch = aarch64
license = GPL-3.0-or-later
license = AGPL-3.0-or-later
license = Apache-2.0
maintainer = bibelin <[email protected]>
repology = project: zed-editor
source_x86_64 = https://zed.dev/api/releases/preview/0.155.1/zed-linux-x86_64.tar.gz
sha256sums_x86_64 = afc3f27925af4c4d029d5bf5e420384fd4301c45aef7030d4ee8c4f4d61bbb6f
source_aarch64 = https://zed.dev/api/releases/preview/0.155.1/zed-linux-aarch64.tar.gz
sha256sums_aarch64 = 6962817f1b23b85e805e2da687b4fb718fe42a88740c4d834dca4c35e4089fa0

pkgname = zed-editor-preview-bin
39 changes: 39 additions & 0 deletions packages/zed-editor-preview-bin/zed-editor-preview-bin.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
pkgname="zed-editor-preview-bin"
pkgdesc="A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter (Preview release)"
pkgver="0.155.1"
repology=("project: zed-editor")
gives="zed-editor-preview"
license=("GPL-3.0-or-later" "AGPL-3.0-or-later" "Apache-2.0")
arch=("x86_64" "aarch64")
url="https://zed.dev"
_channel="preview"
source=("${url}/api/releases/${_channel}/${pkgver}/zed-linux-${AARCH}.tar.gz")
sha256sums_x86_64=("afc3f27925af4c4d029d5bf5e420384fd4301c45aef7030d4ee8c4f4d61bbb6f")
sha256sums_aarch64=("6962817f1b23b85e805e2da687b4fb718fe42a88740c4d834dca4c35e4089fa0")
maintainer=("bibelin <[email protected]>")

# Desktop file should be renamed to dev.zed.Zed-Preview.desktop to show correct icon in GNOME on Wayland
# Issue: https://github.com/zed-industries/zed/issues/16694
_desktop="dev.zed.Zed-Preview.desktop"

package() {
install -Dm755 "zed-${_channel}.app/bin/zed" -t "${pkgdir}/opt/${gives}/bin/"
install -Dm755 "zed-${_channel}.app/libexec/zed-editor" -t "${pkgdir}/opt/${gives}/libexec"
find "${srcdir}/zed-${_channel}.app/lib" -type "f" -exec install -Dm644 "{}" -t "${pkgdir}/opt/${gives}/lib/" \;
install -Dm644 "zed-${_channel}.app/share/icons/hicolor/1024x1024/apps/zed.png" "${pkgdir}/usr/share/icons/${gives}.png"

install -Dm644 "zed-${_channel}.app/share/applications/zed-${_channel}.desktop" "${pkgdir}/usr/share/applications/${_desktop}"
# "zed" command can conflict with /usr/sbin/zed from zfs-zed package
sed -i "s/Exec=zed/Exec=${gives}/g" "${pkgdir}/usr/share/applications/${_desktop}"
sed -i "s/Icon=zed/Icon=${gives}/g" "${pkgdir}/usr/share/applications/${_desktop}"

mkdir -p "${pkgdir}/usr/bin"
# ZED_UPDATE_EXPLANATION blocks auto-updates and is used to inform the user
# https://zed.dev/docs/development/linux#notes-for-packaging-zed
cat > "${pkgdir}/usr/bin/${gives}" << EOL
#!/bin/sh
export ZED_UPDATE_EXPLANATION="Please use pacstall to update zed."
/opt/${gives}/bin/zed \$@
EOL
chmod +x "${pkgdir}/usr/bin/${gives}"
}
18 changes: 18 additions & 0 deletions packages/zed-editor-stable-bin/.SRCINFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pkgbase = zed-editor-stable-bin
gives = zed-editor
pkgver = 0.154.3
pkgdesc = A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter
url = https://zed.dev
arch = x86_64
arch = aarch64
license = GPL-3.0-or-later
license = AGPL-3.0-or-later
license = Apache-2.0
maintainer = bibelin <[email protected]>
repology = project: zed-editor
source_x86_64 = https://zed.dev/api/releases/stable/0.154.3/zed-linux-x86_64.tar.gz
sha256sums_x86_64 = 79bddf0449a9ca9fbd6943362a726165e30eb15f36b6a4e7d04caa5758015aac
source_aarch64 = https://zed.dev/api/releases/stable/0.154.3/zed-linux-aarch64.tar.gz
sha256sums_aarch64 = 19995cfdd7fa3337a1c86e10ffed6e268726c2097e24c429e30dd7ff743bc7ef

pkgname = zed-editor-stable-bin
39 changes: 39 additions & 0 deletions packages/zed-editor-stable-bin/zed-editor-stable-bin.pacscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
pkgname="zed-editor-stable-bin"
pkgdesc="A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter"
pkgver="0.154.3"
repology=("project: zed-editor")
gives="zed-editor"
license=("GPL-3.0-or-later" "AGPL-3.0-or-later" "Apache-2.0")
arch=("x86_64" "aarch64")
url="https://zed.dev"
_channel="stable"
source=("${url}/api/releases/${_channel}/${pkgver}/zed-linux-${AARCH}.tar.gz")
sha256sums_x86_64=("79bddf0449a9ca9fbd6943362a726165e30eb15f36b6a4e7d04caa5758015aac")
sha256sums_aarch64=("19995cfdd7fa3337a1c86e10ffed6e268726c2097e24c429e30dd7ff743bc7ef")
maintainer=("bibelin <[email protected]>")

# Desktop file should be renamed to dev.zed.Zed.desktop to show correct icon in GNOME on Wayland
# Issue: https://github.com/zed-industries/zed/issues/16694
_desktop="dev.zed.Zed.desktop"

package() {
install -Dm755 "zed.app/bin/zed" -t "${pkgdir}/opt/${gives}/bin/"
install -Dm755 "zed.app/libexec/zed-editor" -t "${pkgdir}/opt/${gives}/libexec"
find "${srcdir}/zed.app/lib" -type "f" -exec install -Dm644 "{}" -t "${pkgdir}/opt/${gives}/lib/" \;
install -Dm644 "zed.app/share/icons/hicolor/1024x1024/apps/zed.png" "${pkgdir}/usr/share/icons/${gives}.png"

install -Dm644 "zed.app/share/applications/zed.desktop" "${pkgdir}/usr/share/applications/${_desktop}"
# "zed" command can conflict with /usr/sbin/zed from zfs-zed package
sed -i "s/Exec=zed/Exec=${gives}/g" "${pkgdir}/usr/share/applications/${_desktop}"
sed -i "s/Icon=zed/Icon=${gives}/g" "${pkgdir}/usr/share/applications/${_desktop}"

mkdir -p "${pkgdir}/usr/bin"
# ZED_UPDATE_EXPLANATION blocks auto-updates and is used to inform the user
# https://zed.dev/docs/development/linux#notes-for-packaging-zed
cat > "${pkgdir}/usr/bin/${gives}" << EOL
#!/bin/sh
export ZED_UPDATE_EXPLANATION="Please use pacstall to update zed."
/opt/${gives}/bin/zed \$@
EOL
chmod +x "${pkgdir}/usr/bin/${gives}"
}
38 changes: 38 additions & 0 deletions srclist
Original file line number Diff line number Diff line change
Expand Up @@ -12091,6 +12091,44 @@ pkgbase = zap

pkgname = zap
---
pkgbase = zed-editor-preview-bin
gives = zed-editor-preview
pkgver = 0.155.1
pkgdesc = A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter (Preview release)
url = https://zed.dev
arch = x86_64
arch = aarch64
license = GPL-3.0-or-later
license = AGPL-3.0-or-later
license = Apache-2.0
maintainer = bibelin <[email protected]>
repology = project: zed-editor
source_x86_64 = https://zed.dev/api/releases/preview/0.155.1/zed-linux-x86_64.tar.gz
sha256sums_x86_64 = afc3f27925af4c4d029d5bf5e420384fd4301c45aef7030d4ee8c4f4d61bbb6f
source_aarch64 = https://zed.dev/api/releases/preview/0.155.1/zed-linux-aarch64.tar.gz
sha256sums_aarch64 = 6962817f1b23b85e805e2da687b4fb718fe42a88740c4d834dca4c35e4089fa0

pkgname = zed-editor-preview-bin
---
pkgbase = zed-editor-stable-bin
gives = zed-editor
pkgver = 0.154.3
pkgdesc = A high-performance, multiplayer code editor from the creators of Atom and Tree-sitter
url = https://zed.dev
arch = x86_64
arch = aarch64
license = GPL-3.0-or-later
license = AGPL-3.0-or-later
license = Apache-2.0
maintainer = bibelin <[email protected]>
repology = project: zed-editor
source_x86_64 = https://zed.dev/api/releases/stable/0.154.3/zed-linux-x86_64.tar.gz
sha256sums_x86_64 = 79bddf0449a9ca9fbd6943362a726165e30eb15f36b6a4e7d04caa5758015aac
source_aarch64 = https://zed.dev/api/releases/stable/0.154.3/zed-linux-aarch64.tar.gz
sha256sums_aarch64 = 19995cfdd7fa3337a1c86e10ffed6e268726c2097e24c429e30dd7ff743bc7ef

pkgname = zed-editor-stable-bin
---
pkgbase = zen-browser-generic-bin
gives = zen-browser
pkgver = 1.0.1-a.7
Expand Down

0 comments on commit c59fead

Please sign in to comment.