# Contributor: breakdown <breakdown(at)archlinux(dot)us>
pkgname=plowshare
pkgver=0.9.3
pkgrel=1
pkgdesc="Command-line downloader and uploader for Rapidshare, Megaupload, Mediafire and other file sharing websites"
arch=('i686' 'x86_64')
url="http://code.google.com/p/plowshare/"
license=('GPL')
depends=('perl' 'recode' 'curl' 'imagemagick' 'tesseract' 'spidermonkey' 'gocr')
optdepends=('aview: to show the megaupload captcha in ASCII style')
source=(http://plowshare.googlecode.com/files/$pkgname-$pkgver.tgz)
md5sums=('79a9857a13e0102b14d5ff4c7971d6ce')
build() {
cd "$srcdir/$pkgname-$pkgver"
msg "Installing documentation"
install -d "$pkgdir/usr/share/doc/$pkgname"
install -m 644 CHANGELOG COPYING README "$pkgdir/usr/share/doc/$pkgname"
install -d "$pkgdir/usr/share/man/man1/"
install -m 644 ./docs/* "$pkgdir/usr/share/man/man1/"
cd src/
msg "Installing common libraries"
install -d "$pkgdir/usr/share/$pkgname"
install -m 755 *.sh *.pl "$pkgdir/usr/share/$pkgname"
msg "Installing modules"
install -d "$pkgdir/usr/share/$pkgname/"{modules,tesseract}
install -m 644 modules/*.sh "$pkgdir/usr/share/$pkgname/modules"
install -m 644 tesseract/* "$pkgdir/usr/share/$pkgname/tesseract"
msg "Creating symbolic links"
install -d "$pkgdir/usr/bin"
ln -s /usr/share/$pkgname/download.sh "$pkgdir/usr/bin/plowdown"
ln -s /usr/share/$pkgname/upload.sh "$pkgdir/usr/bin/plowup"
ln -s /usr/share/$pkgname/delete.sh "$pkgdir/usr/bin/plowdel"
ln -s /usr/share/$pkgname/list.sh "$pkgdir/usr/bin/plowlist"
}
# vim:set ts=2 sw=2 et: