# Contributor: Michael Hanson <hansonorders@verizon.net>
pkgname=scte65scan
pkgver=0.2.1
pkgrel=1
pkgdesc="A reader and parser of SCTE-65 in-band SI data with HDHomerun support."
arch=('i686')
url="http://scte65scan.sourceforge.net/"
license=('GPL')
source=(http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname-$pkgver.tgz http://download.silicondust.com/hdhomerun/libhdhomerun_20090830.tgz)
md5sums=('1ab2d5f1895931c9c1192ee0dcc46f11'
         '9c51200782c159703f3b32de24ae2608')

build() {
  cd "$srcdir/$pkgname-$pkgver"
  tar zxf "$srcdir"/libhdhomerun_20090830.tgz
  make -f Makefile.hdhr || return 1
  mkdir -p "$pkgdir"/usr/bin || return 1
  mkdir -p "$pkgdir"/usr/share/doc/"$pkgname" || return 1
  cp "$srcdir"/"$pkgname"-"$pkgver"/scte65scan "$pkgdir"/usr/bin/ || return 1
  cp "$srcdir"/"$pkgname"-"$pkgver"/Changelog "$pkgdir"/usr/share/doc/"$pkgname" || return 1
  cp "$srcdir"/"$pkgname"-"$pkgver"/README "$pkgdir"/usr/share/doc/"$pkgname" || return 1
  cp "$srcdir"/"$pkgname"-"$pkgver"/us-Cable-Standard-center-frequencies-QAM256 "$pkgdir"/usr/share/doc/"$pkgname" || return 1
}