# $Id: PKGBUILD 119743 2014-09-29 05:38:55Z arcanis $
# Maintainer: Evgeniy Alekseev <arcanis at archlinux dot org>
# Contributor: Julien Nicoulaud <julien.nicoulaud at gmail dot com>

pkgname=zsh-syntax-highlighting
pkgver=0.2.1
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
conflicts=("${pkgname}-git")
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/zsh-users/${pkgname}/tarball/${pkgver}")
md5sums=('40f2b7f786b14886cb518c6ee9815dfa')
changelog=ChangeLog

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

  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"
}
