# $Id: PKGBUILD 120315 2014-10-07 06:35:28Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=wgetpaste
pkgver=2.25
pkgrel=1
pkgdesc="A script that automates pasting to a number of pastebin services"
arch=('any')
url="http://wgetpaste.zlin.dk/"
license=('custom')
depends=('wget')
optdepends=('xclip: interface to Xclipboard')
source=(http://wgetpaste.zlin.dk/$pkgname-$pkgver.tar.bz2
        http://wgetpaste.zlin.dk/$pkgname.example)
sha256sums=('6a7e078e6607f4fe819fc52857a601630ec0f7d2ee855d3b1cd7e75a904c40f4'
            'cbc0437f7e04d95ffd224011ee2a056a84dfd7143e314e6962688295f68def4d')

package() {
  cd "${srcdir}"/${pkgname}-${pkgver}

  install -D -m755 ${pkgname} "${pkgdir}"/usr/bin/${pkgname}
  install -D -m644 _${pkgname} "${pkgdir}"/usr/share/zsh/site-functions/_${pkgname}
  install -D -m644 "${srcdir}"/${pkgname}.example ${pkgdir}/usr/share/${pkgname}/${pkgname}.example

# license
  sed -n '2,5p' wgetpaste > LICENSE
  install -D -m644 LICENSE "${pkgdir}"/usr/share/licenses/$pkgname/LICENSE
}
