summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD177
1 files changed, 80 insertions, 97 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a53b9dffbcd3..479d5c990385 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,111 +1,94 @@
-# Maintainer: iamawacko <iamawacko@protonmail.com>
-# Contributor: Francesco La Camera <fm@lacamera.org>
-pkgname=neovim-nightly
-pkgver=0.10.0.dev.20230525
-pkgrel=3
-pkgdesc='hyperextensible Vim-based text editor'
-arch=('i686' 'x86_64' 'armv7h' 'armv6h' 'aarch64' 'pentium4')
-url='https://github.com/neovim/neovim/releases/tag/nightly'
+# Maintainer: A Farzat <a@farzat.xyz>
+# Contributor: éclairevoyant
+# Contributor: Sven-Hendrik Haase <svenstaro@archlinux.org>
+# Contributor: Caleb Maclennan <caleb@alerque.com>
+# Contributor: Florian Walch <florian+aur@fwalch.com>
+# Contributor: Florian Hahn <flo@fhahn.com>
+
+_pkgname=neovim
+pkgname="$_pkgname-nightly"
+pkgver=0.10.0.r2250.g6bba4beced
+pkgrel=1
+pkgdesc='Fork of Vim aiming to improve user experience, plugins, and GUIs'
+arch=(i686 x86_64 armv7h armv6h aarch64)
+url='https://neovim.io'
backup=('etc/xdg/nvim/sysinit.vim')
license=('custom:neovim')
-depends=('libluv' 'libtermkey' 'libuv' 'libvterm' 'luajit' 'msgpack-c' 'tree-sitter' 'unibilium' 'lua51-lpeg' 'lua51-mpack')
-makedepends=('cmake' 'gperf' 'ninja' 'patchelf')
-optdepends=('python2-neovim: Python 2 provider'
- 'python-pynvim: Python 3 provider'
- 'ruby-neovim: Ruby provider'
- 'xclip: X11 clipboard integration'
- 'xsel: X11 clipboard integration'
- 'wl-clipboard: wayland clipboard integration')
-
-# get latest version
-_neovim_version() {
- if [ -e "$srcdir/neovim-nightly/CMakeLists.txt" ] ; then
- _regex_vmaj='^set\(NVIM_VERSION_MAJOR ([0-9]+)\)$'
- _regex_vmin='^set\(NVIM_VERSION_MINOR ([0-9]+)\)$'
- _regex_vpat='^set\(NVIM_VERSION_PATCH ([0-9]+)\)$'
-
- _neovim_version_major=$(
- grep -E "$_regex_vmaj" "$srcdir/neovim-nightly/CMakeLists.txt" \
- | sed -E "s@$_regex_vmaj@\1@"
- )
- _neovim_version_minor=$(
- grep -E "$_regex_vmin" "$srcdir/neovim-nightly/CMakeLists.txt" \
- | sed -E "s@$_regex_vmin@\1@"
- )
- _neovim_version_patch=$(
- grep -E "$_regex_vpat" "$srcdir/neovim-nightly/CMakeLists.txt" \
- | sed -E "s@$_regex_vpat@\1@"
- )
- else
- _neovim_version_major=0
- _neovim_version_minor=10
- _neovim_version_patch=0
- fi
-
- printf "%s.%s.%s" \
- "$_neovim_version_major" \
- "$_neovim_version_minor" \
- "$_neovim_version_patch"
-}
-
-_pkgver() {
- _response=$(
- curl 'https://api.github.com/repos/neovim/neovim/releases?per_page=1&page=1' -s \
- | grep -E -A 6 '^\s+"tag_name": "nightly".*$'
- )
-
- _regex_date='^\s+"created_at": "([0-9]+-[0-9]+-[0-9]+)T.*".*$'
- _date=$(
- echo "$_response" \
- | grep -E "$_regex_date" \
- | sed -E "s@$_regex_date@\1@; s@-@@g"
- )
-
- _regex_commit='^\s+"target_commitish": "([^"]+)".*$'
- _commit=$(
- echo "$_response" \
- | grep -E "$_regex_commit" \
- | sed -E "s@$_regex_commit@\1@"
- )
-
- _neovim_version=$(_neovim_version)
-
- printf '%s.dev.%s.g%s' \
- "$_neovim_version" \
- "$_date" \
- "${_commit:0:7}"
-}
-_pkgver=$(_pkgver)
-source=("$pkgname-$_pkgver::https://github.com/neovim/neovim/archive/refs/tags/nightly.tar.gz")
-provides=("neovim=$_pkgver" 'vim-plugin-runtime')
-conflicts=('neovim')
-sha256sums=('SKIP')
+depends=(
+ 'libluv'
+ 'libtermkey'
+ 'libuv'
+ 'libvterm>0.1.4'
+ 'luajit'
+ 'msgpack-c'
+ 'tree-sitter-git'
+ 'unibilium'
+ 'lua51-lpeg'
+)
+makedepends=('cmake' 'git' 'ninja' 'unzip')
+optdepends=(
+ 'python-pynvim: for Python plugin support (see :help python)'
+ 'xclip: for clipboard support on X11 (or xsel) (see :help clipboard)'
+ 'xsel: for clipboard support on X11 (or xclip) (see :help clipboard)'
+ 'wl-clipboard: for clipboard support on wayland (see :help clipboard)'
+)
+provides=("$_pkgname=${pkgver/\.r*/}" 'vim-plugin-runtime')
+conflicts=("$_pkgname")
+source=(
+ "git+https://github.com/neovim/$_pkgname.git#tag=nightly"
+ nvimdoc{,.hook}
+)
+sha512sums=('SKIP'
+ '22662462c823de243599cdd3483e46ade4ab59b219e907468d34c18e584fe7477548e357ee2ce56bb098cf54b770b108a3511703dd486f0774a65c84af78f6aa'
+ '3c6ee1e4646d09c164a2212f9e4d2f53158ff32911b0972e060a395a8d4685334574a7ede995a81680dcc0750cd3327a78beb7904a4bb326b2399d79a8b12d5e')
+b2sums=('SKIP'
+ 'd31cf81659e238fada8092755eb9be16f77c00a466107eb5770c6c9c32e043c91e6efada7ddb51663716a0e38ffa6e3d0093b3e6833aa961d845c7451a95491e'
+ '26588b9da6459393076723bdfb8d2b16fed882070f2326bf7c35cd272dee9c18df603afb1ae2254cd0a59eff68189caf04828ef165d5de42c7a4222267604101')
pkgver() {
- printf "$_pkgver"
+ cd "$_pkgname"
+ local nvim_version nvim_version_git
+ nvim_version="$(sed -nE '/NVIM_VERSION_/ s/.* +([0-9]+)\).*/\1/p' ./CMakeLists.txt | sed ':b;N;$!bb;s/\n/\./g')"
+ nvim_version_git="$(git describe --first-parent --always | sed -E 's/^v[0-9]+.[0-9]+.[0-9]+-//; s/^([0-9]+)-([a-z0-9]+)/\1\.\2/')"
+ printf "%s.r%s\n" "$nvim_version" "$nvim_version_git"
}
build() {
- cmake -Sneovim-nightly -Bbuild \
- -DCMAKE_BUILD_TYPE=RelWithDebInfo \
- -DCMAKE_INSTALL_PREFIX=/usr
- cmake --build build
+ cd "$_pkgname"
+ cmake \
+ -Bbuild \
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DUSE_BUNDLED=OFF \
+ -W no-dev
+ cmake --build build --verbose
}
check() {
- cd "$srcdir/build"
- ./bin/nvim --headless -u NONE -i NONE -c ':quit'
+ cd "$_pkgname"
+ ./build/bin/nvim --version
+ ./build/bin/nvim --headless -u NONE -i NONE +q
}
package() {
- cd "$srcdir/build"
- DESTDIR="$pkgdir" cmake --build . --target install
- cd "$srcdir/neovim-nightly"
- install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
- install -Dm644 runtime/nvim.desktop "$pkgdir/usr/share/applications/nvim.desktop"
- install -Dm644 runtime/nvim.png "$pkgdir/usr/share/pixmaps/nvim.png"
- mkdir -p "$pkgdir/etc/xdg/nvim"
- mkdir -p "$pkgdir/usr/share/nvim"
- echo "source /usr/share/nvim/archlinux.vim" >> "$pkgdir"/etc/xdg/nvim/sysinit.vim
- echo "set runtimepath+=/usr/share/vim/vimfiles" > "$pkgdir"/usr/share/nvim/archlinux.vim
+ install -Dm644 -t "$pkgdir/usr/share/libalpm/hooks/" nvimdoc.hook
+ install -Dt "$pkgdir/usr/share/libalpm/scripts/" nvimdoc
+
+ cd "$_pkgname"
+ DESTDIR="$pkgdir" cmake --install build
+
+ install -Dm644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
+ install -Dm644 runtime/nvim.desktop -t "${pkgdir}/usr/share/applications/"
+ install -Dm644 runtime/nvim.appdata.xml -t "${pkgdir}/usr/share/metainfo/"
+ install -Dm644 runtime/nvim.png -t "${pkgdir}/usr/share/pixmaps/"
+
+ # Make Arch Vim packages work
+ mkdir -p "${pkgdir}"/etc/xdg/nvim
+ echo "\" This line makes pacman-installed global Arch Linux vim packages work." > "${pkgdir}"/etc/xdg/nvim/sysinit.vim
+ echo "source /usr/share/nvim/archlinux.vim" >> "${pkgdir}"/etc/xdg/nvim/sysinit.vim
+
+ mkdir -p "${pkgdir}"/usr/share/vim
+ echo "set runtimepath+=/usr/share/vim/vimfiles" > "${pkgdir}"/usr/share/nvim/archlinux.vim
}
+
+# vim:set sw=2 sts=2 et: