# $Id: PKGBUILD 101945 2013-12-02 18:51:00Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>

pkgname=wgetpaste
pkgver=2.23
pkgrel=1
pkgdesc="A script that automates pasting to a number of pastebin services"
url="http://wgetpaste.zlin.dk/"
arch=('any')
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=('d6f4546d5bd78e0765e07a7bc91dab169e108c414a9cbc4c88b8dee20a3955f5'
            '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
}
