Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(neovim-git): Use inline create alternatives scripts instead of files #15

Merged
merged 1 commit into from
Jul 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions packages/neovim-git/.SRCINFO
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ pkgver = 0.10.1
pkgdesc = Vim fork maintained by the community
url = https://neovim.io/
source = https://github.com/neovim/neovim.git
source = ex
source = rview
source = rvim
source = view
source = vimdiff
makedepends = ninja-build
makedepends = gettext
makedepends = libtool-bin
Expand All @@ -34,9 +29,3 @@ replaces = neovim-deb
replaces = neovim-bin
maintainer = Elsie19 <[email protected]>
repology = project: neovim
sha256sums = SKIP
sha256sums = 5d3178628afc39f0318638cad19e9ad06ada89926dfb263e93ab35cc8f60e911
sha256sums = f04c9baa97f49afe7969826b45e283c60e2d52e28aa3ea7fa93a62dab0408a55
sha256sums = 8528f61eaca19285c8220c7d12099743d76abf872a30515698644c91a05c55e0
sha256sums = 3cb963a264b6cf45749627408b5a62c6945e5e426b595bb5e6a388194c2c1990
sha256sums = 1d3123b9d97a4889696ab72db558041b5cca8e26ff51ae557f7842242a7d4ed1
2 changes: 0 additions & 2 deletions packages/neovim-git/ex

This file was deleted.

46 changes: 21 additions & 25 deletions packages/neovim-git/neovim-git.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,7 @@ pkgname="neovim-git"
gives="neovim"
pkgver="0.10.1"
repology=("project: ${gives}")
source=(
"https://github.com/neovim/neovim.git"
"ex"
"rview"
"rvim"
"view"
"vimdiff"
)
sha256sums=(
"SKIP"
"5d3178628afc39f0318638cad19e9ad06ada89926dfb263e93ab35cc8f60e911"
"f04c9baa97f49afe7969826b45e283c60e2d52e28aa3ea7fa93a62dab0408a55"
"8528f61eaca19285c8220c7d12099743d76abf872a30515698644c91a05c55e0"
"3cb963a264b6cf45749627408b5a62c6945e5e426b595bb5e6a388194c2c1990"
"1d3123b9d97a4889696ab72db558041b5cca8e26ff51ae557f7842242a7d4ed1"
)
source=("https://github.com/neovim/neovim.git")
url='https://neovim.io/'
pkgdesc="Vim fork maintained by the community"
maintainer=("Elsie19 <[email protected]>")
Expand All @@ -36,16 +21,29 @@ package() {
make install DESTDIR="${pkgdir}"
install -Dm644 "LICENSE.txt" -t "${pkgdir}/usr/share/licenses/${gives}"
install -Dm644 "README.md" -t "${pkgdir}/usr/share/doc/${gives}"
install -Dm755 "${srcdir}/ex" -t "${pkgdir}/usr/libexec/${gives}"
install -Dm755 "${srcdir}/rview" -t "${pkgdir}/usr/libexec/${gives}"
install -Dm755 "${srcdir}/rvim" -t "${pkgdir}/usr/libexec/${gives}"
install -Dm755 "${srcdir}/view" -t "${pkgdir}/usr/libexec/${gives}"
install -Dm755 "${srcdir}/vimdiff" -t "${pkgdir}/usr/libexec/${gives}"
install -Dm755 /dev/stdin -t "${pkgdir}/usr/libexec/${gives}/ex" << 'EOF'
#!/bin/sh
exec /usr/bin/nvim -e "$@"
EOF
install -Dm755 /dev/stdin -t "${pkgdir}/usr/libexec/${gives}/rview" << 'EOF'
#!/bin/sh
exec /usr/bin/nvim -RZ "$@"
EOF
install -Dm755 /dev/stdin -t "${pkgdir}/usr/libexec/${gives}/rvim" << 'EOF'
#!/bin/sh
exec /usr/bin/nvim -Z "$@"
EOF
install -Dm755 /dev/stdin -t "${pkgdir}/usr/libexec/${gives}/view" << 'EOF'
#!/bin/sh
exec /usr/bin/nvim -R "$@"
EOF
install -Dm755 /dev/stdin -t "${pkgdir}/usr/libexec/${gives}/vimdiff" << 'EOF'
#!/bin/sh
exec /usr/bin/nvim -d "$@"
EOF
}

post_install() {
set -e

update-alternatives --install /usr/bin/editor editor /usr/bin/nvim 30 \
--slave /usr/share/man/man1/editor.1.gz editor.1.gz \
/usr/share/man/man1/nvim.1.gz
Expand All @@ -59,8 +57,6 @@ post_install() {
}

pre_remove() {
set -e

case "$1" in
remove | deconfigure)
update-alternatives --remove editor /usr/bin/nvim
Expand Down
2 changes: 0 additions & 2 deletions packages/neovim-git/rview

This file was deleted.

2 changes: 0 additions & 2 deletions packages/neovim-git/rvim

This file was deleted.

2 changes: 0 additions & 2 deletions packages/neovim-git/view

This file was deleted.

2 changes: 0 additions & 2 deletions packages/neovim-git/vimdiff

This file was deleted.

Loading