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

pkgname=screenfetch
_pkgname=screenFetch
pkgver=3.9.1
pkgrel=1
pkgdesc="Bash screenshot information tool"
arch=('any')
url="https://github.com/KittyKatt/screenFetch"
license=('GPL')
depends=('bash')
optdepends=('curl: screenshot uploading')
#optdepends=('scrot: screenshot taking'
#            'curl: screenshot uploading')
source=(${_pkgname}-${pkgver}.tar.gz::https://github.com/KittyKatt/${_pkgname}/archive/v${pkgver}.tar.gz)
sha256sums=('aa97dcd2a8576ae18de6c16c19744aae1573a3da7541af4b98a91930a30a3178')

prepare() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
}

build() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  ./update-manpage.sh
}

package() {
  cd "${srcdir}/${_pkgname}-${pkgver}"
  install -Dm755 screenfetch-dev "${pkgdir}/usr/bin/screenfetch"
  install -Dm644 screenfetch.1 "${pkgdir}/usr/share/man/man1/screenfetch.1"
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  install -Dm644 CHANGELOG "${pkgdir}/usr/share/doc/${pkgname}/CHANGELOG"
  install -Dm644 README.mkdn "${pkgdir}/usr/share/doc/${pkgname}/README.mkdn"
  install -Dm644 TODO "${pkgdir}/usr/share/doc/${pkgname}/TODO"
}
