# Maintainer: Jo�o Guerra <joca.bt@gmail.com>

pkgname="ctags"
pkgver="6.2.0"
pkgrel=1
pkgdesc="Generate tag files for source code"
arch=("i686" "x86_64")
url="https://ctags.io/"
msys2_references=(
  "cpe: cpe:/a:exuberant_ctags_project:exuberant_ctags"
)
license=("GPL")
depends=('libiconv')
makedepends=('autotools' 'gcc' 'git' 'libiconv-devel')
source=("git+https://github.com/universal-ctags/ctags.git#tag=v$pkgver")
sha256sums=('c61d40cecaa5cfb27abd0fd4361af7ed6c79be422c5eeb6572735e18307f1238')

build () {
  cd "${pkgname}"
  ./autogen.sh
  ./configure --prefix=/usr \
              --enable-etags \
              --enable-macro-patterns \
              --with-readlib
  make
}

package () {
  cd "${pkgname}"
  make prefix="${pkgdir}/usr" install
  install -Dm0644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
