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

pkgname=tree
pkgver=2.1.3
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/"
msys2_references=(
  "anitya: 5006"
)
license=('GPL')
makedepends=('make' 'gcc')
source=("https://gitlab.com/OldManProgrammer/unix-tree/-/archive/${pkgver}/unix-tree-${pkgver}.tar.gz"
        'Makefile-Uncomment-for-Cygwin.patch')
sha256sums=('f554a1b62233b96fa8eaa2d85e91bc62cad80ee441fd591380f16cdfbe3e8868'
            'd5d68fc848613eff0ce3193dd28ef7fe04ecb5261cd4e528613462c6e56f4c3a')

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

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

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