# $Id: PKGBUILD 64653 2012-02-17 13:36:17Z lfleischer $
# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
# Contributor: Geoffroy Carrier <geoffory.carrier@koon.fr>
# Contributor: Benjamin Andresen <bandresen AT gmail DOT com>
# Contributor: Kristaps Esterlins <esterlinsh@gmail.com>
# Contributor: Byron Clark <byron@theclarkfamily.name>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=clive
pkgver=2.3.1.1
pkgrel=2
pkgdesc='Video extraction/download tool for youtube and other websites.'
arch=('any')
url='http://clive.sourceforge.net/'
license=('GPL')
depends=('curl' 'perl-json-xs' 'perl-getopt-argvfile' 'quvi')
backup=('etc/clive/config')
source=("http://downloads.sourceforge.net/project/clive/${pkgver:0:3}/clive-${pkgver}.tar.gz")
md5sums=('52c7f5b45c331184bc5eaa7ee261070b')

build() {
  cd "${pkgname}-${pkgver}"

  perl Makefile.PL INSTALL_BASE="${pkgdir}/usr" INSTALLDIRS=vendor \
    INSTALLVENDORLIB="${pkgdir}/usr/lib/perl5/vendor_perl" \
    INSTALLVENDORMAN1DIR="${pkgdir}/usr/share/man/man1"
  make
}

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

  make install

  install -Dm0644 examples/cliverc "${pkgdir}/etc/clive/config"
}
