# Maintainer: Konstantin Podsvirov <konstantin@podsvirov.pro>

pkgname=editorconfig-vim
pkgver=1.2.1
pkgrel=1
pkgdesc="EditorConfig plugin for Vim - editorconfig.org"
arch=('any')
url="https://github.com/editorconfig/editorconfig-vim"
license=("spdx:BSD-2-Clause AND PSF-2.0")
groups=("vim-plugins")
depends=("vim")
install=vimdoc.install
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/editorconfig/editorconfig-vim/archive/v${pkgver}.tar.gz")
sha256sums=('51396d125677e372ec86fcd4802a5a22aaca35bde4202aeddf8ef962cc41c943')
msys2_references=(
  'anitya: 138124'
  'gentoo: app-vim/editorconfig-vim'
)

package() {
  mkdir -p ${pkgdir}/usr/share/vim/vimfiles/{plugin,doc,autoload}
  cd "${srcdir}/${pkgname}-${pkgver}"
  cp -r plugin/* ${pkgdir}/usr/share/vim/vimfiles/plugin/
  cp doc/editorconfig.txt ${pkgdir}/usr/share/vim/vimfiles/doc/
  cp -r autoload/* ${pkgdir}/usr/share/vim/vimfiles/autoload/
  mkdir -p ${pkgdir}/usr/share/licenses/editorconfig-vim
  cp LICENSE ${pkgdir}/usr/share/licenses/editorconfig-vim
}
