diff options
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 40 | ||||
-rw-r--r-- | nvim.patch | 12 |
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2c5c04e399c6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = pacnews-neovim-git + pkgdesc = Find .pacnew files and merge them with a neovim diff - updated git tag + pkgver = v1.0.r0.gd78c8ac + pkgrel = 1 + url = https://github.com/pbrisbin/dotfiles/blob/v1.0/tag-scripts/local/bin/pacnews + arch = any + license = unknown + makedepends = git + provides = pacnews-git + conflicts = pacnews-git + source = git+https://github.com/pbrisbin/dotfiles.git#tag=v1.0 + source = nvim.patch + md5sums = SKIP + md5sums = c8532d9984cbcb2dc97d2a07bb7a23de + +pkgname = pacnews-neovim-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e754b70d0e62 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Ramana Kumar <firstname at member.fsf.org> +# Contributor: Jesus Alvarez <jeezusjr@gmail.com> +pkgname=pacnews-neovim-git +pkgver=v1.0.r0.gd78c8ac +pkgrel=1 +pkgdesc="Find .pacnew files and merge them with a neovim diff - updated git tag" +arch=(any) +url="https://github.com/pbrisbin/dotfiles/blob/v1.0/tag-scripts/local/bin/pacnews" +license=('unknown') +makedepends=('git') +provides=('pacnews-git') +conflicts=('pacnews-git') +source=( + "git+https://github.com/pbrisbin/dotfiles.git#tag=v1.0" + # Patches + nvim.patch +) +md5sums=('SKIP' + 'c8532d9984cbcb2dc97d2a07bb7a23de') + +pkgver() { + cd "${srcdir}/dotfiles" + + git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g' +} + +prepare() { + cd "${srcdir}/dotfiles" + + patch -Np1 -i "$srcdir/nvim.patch" +} + +package() { + cd "${srcdir}/dotfiles/tag-scripts/local/bin" + + mkdir -p "${pkgdir}/usr/bin" + install ${pkgname%-neovim-git} "${pkgdir}/usr/bin/" +} + +# vim:set ts=2 sw=2 et: diff --git a/nvim.patch b/nvim.patch new file mode 100644 index 000000000000..c5e7384db1ce --- /dev/null +++ b/nvim.patch @@ -0,0 +1,12 @@ +diff --unified --recursive --text package.orig/dotfiles/tag-scripts/local/bin/pacnews package.new/dotfiles/tag-scripts/local/bin/pacnews +--- dotfiles/tag-scripts/local/bin/pacnews 2020-08-25 15:06:16.716219465 +0200 ++++ dotfiles/tag-scripts/local/bin/pacnews 2020-08-25 15:07:26.552883421 +0200 +@@ -17,7 +17,7 @@ + for file; do + current="${file/.pacnew/}" + +- ${DIFFTOOL:-vimdiff} "$current" "$file" ++ ${DIFFTOOL:-nvim -d} "$current" "$file" + + rm -iv "$file" # -i gets us prompting for free + [[ -f "$file" ]] && mv -iv "$file" "$current" |