# $Id: PKGBUILD 144742 2015-10-22 22:21:16Z arcanis $
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Julien Nicoulaud <julien.nicoulaud at gmail dot com>

pkgname=zsh-syntax-highlighting
pkgver=0.3.0
pkgrel=1
pkgdesc="Fish shell like syntax highlighting for Zsh"
arch=('any')
url="https://github.com/zsh-users/zsh-syntax-highlighting"
license=('BSD')
depends=('zsh>=4.3.9')
install="${pkgname}.install"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/zsh-users/${pkgname}/tarball/${pkgver}")
md5sums=('73182f2db724455933edd624d920f4e8')
changelog=ChangeLog

package() {
  install -dm755 "${pkgdir}/usr/share/zsh/plugins/"
  cp -r "zsh-users-${pkgname}-"* "${pkgdir}/usr/share/zsh/plugins/${pkgname}"

  # docs
  install -dm755 "${pkgdir}/usr/share/doc"
  ln -s "/usr/share/zsh/plugins/${pkgname}" \
        "${pkgdir}/usr/share/doc/${pkgname}"
  install -dm755 "${pkgdir}/usr/share/licenses/${pkgname}"
  ln -s "/usr/share/zsh/plugins/${pkgname}/COPYING.md" \
        "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
