# $Id: PKGBUILD 131623 2015-04-18 14:54:37Z jlichtblau $
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>

pkgname=wgetpaste
pkgver=2.26
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=('9265cd0718c815cce19a12c4745f74b288cafce404a26d64daf85ddcbadc8f86'
            'cbc0437f7e04d95ffd224011ee2a056a84dfd7143e314e6962688295f68def4d')

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

  install -Dm755 ${pkgname} "${pkgdir}"/usr/bin/${pkgname}
  install -Dm644 _${pkgname} "${pkgdir}"/usr/share/zsh/site-functions/_${pkgname}
  install -Dm644 "${srcdir}"/${pkgname}.example ${pkgdir}/usr/share/${pkgname}/${pkgname}.example

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