# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>

pkgname=ctags
_commit=3fdf28bcd3aac31ee226f588f7d2ce32659d2637  # master
pkgver=r20190522+g3fdf28bc
pkgrel=1
epoch=1
pkgdesc='Generates an index file of language objects found in source files'
url='https://ctags.io/'
arch=('x86_64')
license=('GPL')
depends=('libxml2' 'jansson' 'libyaml' 'libseccomp')
makedepends=('git' 'python-docutils')
provides=('universal-ctags')
source=("git+https://github.com/universal-ctags/ctags#commit=$_commit")
sha512sums=('SKIP')

pkgver() {
  git -C ctags show --pretty='r%cd+g%h' --date='format:%Y%m%d' --no-patch
}

prepare() {
  cd ctags
  ./autogen.sh
}

build() {
  cd ctags
  ./configure \
    --prefix=/usr \
    --sysconfdir=/etc \
    --localstatedir=/var \
    --libexecdir=/usr/lib
  make
}

check() {
  make -C ctags check
}

package() {
  make -C ctags DESTDIR="${pkgdir}" install
}

# vim:set sw=2 et:
