# Maintainer: Alexey Pavlov <Alexpux@gmail.com>

pkgname=tree
pkgver=1.7.0
pkgrel=1
pkgdesc="A directory listing program displaying a depth indented list of files"
arch=('i686' 'x86_64')
url="http://mama.indstate.edu/users/ice/tree/"
license=('GPL')
depends=('msys2-runtime')
source=(http://mama.indstate.edu/users/ice/${pkgname}/src/${pkgname}-${pkgver}.tgz
        'Makefile-Uncomment-for-Cygwin.patch')
md5sums=('abe3e03e469c542d8e157cdd93f4d8a6'
         'acbd9b216fce291b89b47a5effefd4ff')

prepare() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -p1 -i ${srcdir}/Makefile-Uncomment-for-Cygwin.patch
}

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make prefix="${pkgdir}/usr" MANDIR="${pkgdir}/usr/share/man/man1" install
}
