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

pkgname="markdown"
pkgver="1.0.1"
pkgrel="1"
pkgdesc="A text-to-HTML conversion tool"
arch=("i686" "x86_64")
url="https://daringfireball.net/projects/markdown/"
license=("BSD")
depends=("perl")
source=("https://daringfireball.net/projects/downloads/Markdown_${pkgver}.zip")
sha256sums=('6520e9b6a58c5555e381b6223d66feddee67f675ed312ec19e9cee1b92bc0137')

build () {
  cd "Markdown_${pkgver}"
  pod2man Markdown.pl > ${pkgname}.1
}

package () {
  cd "Markdown_${pkgver}"
  install -Dm755 Markdown.pl "${pkgdir}/usr/bin/${pkgname}"
  install -Dm644 ${pkgname}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"
  install -Dm644 License.text "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
