summaryrefslogtreecommitdiffstats
path: root/abs/core/ceton_infinitv/PKGBUILD
blob: 113e3ebbc639876071db8bce51c2e8fd4277104c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Maintainer: Cecil Watson<knoppmyth@gmail.com>

pkgname=ceton_infinitv
#_kernver=`uname -r`
_kernver=4.9.31-1-ARCH
_extramods="extramodules-4.9-ARCH"
pkgver=2013.0326.2226
pkgrel=21
usb_pkgver=0.1.0
pci_pkgver=`echo $pkgver | tr . _`
pkgdesc="Drivers for Ceton InfiniTV4 - pci/usb "
arch=('i686' 'x86_64')
license=('GPL2')
url="http://cetoncorp.com/infinitv_support/linux_drivers"
depends=('linux>=4.9' 'linux<4.10' 'libgusb' 'libnl1' 'ctntad')
makedepends=(linux-headers)
install=ceton.install
source=("http://cetoncorp.com/downloads/ceton_infinitv_linux_driver_$pci_pkgver.tar.gz"
        "98-ctn91xx.rules"
        "http://cetoncorp.com/downloads/infinitv-usbd-$usb_pkgver.tar.gz"
        "ceton_usb_init.sh" "ifctn.sh"
        "ceton_usb_udev.rules" "kernel-4.7+.patch"
        "http://cetoncorp.com/downloads/reset_network.py"
        "no-date-time-warn.patch")

build() {
  cd $srcdir/ceton_infinitv_linux_driver
  patch -p1 -i $srcdir/no-date-time-warn.patch
  patch -p1 -i $srcdir/kernel-4.7+.patch
  make KERNEL_VERSION=$_kernver

  cd $srcdir/infinitv-usbd-$usb_pkgver
  LDFLAGS="/usr/lib/libgthread-2.0.so" ./configure --prefix=/usr
  make
}

package() {
  cd $srcdir/infinitv-usbd-$usb_pkgver
  make DESTDIR=${pkgdir} install

  install -Dm644 ${srcdir}/ceton_infinitv_linux_driver/ctn91xx.ko ${pkgdir}/usr/lib/modules/$_extramods/ctn91xx.ko
  gzip -9 ${pkgdir}/usr/lib/modules/$_extramods/ctn91xx.ko
  install -Dm644 ${srcdir}/98-ctn91xx.rules ${pkgdir}/etc/udev/rules.d/98-ctn91xx.rules
  #usb support
  cp ${srcdir}/ceton_usb_udev.rules ${pkgdir}/etc/udev/rules.d/

  mkdir -p ${pkgdir}/usr/LH/bin
  install -Dm755 ${srcdir}/ceton_usb_init.sh ${pkgdir}/usr/LH/bin/
  install -Dm755 ${srcdir}/ifctn.sh ${pkgdir}/usr/LH/bin/
  install -m755 ${srcdir}/reset_network.py ${pkgdir}/usr/bin/infinitv_reset_network.py
}
md5sums=('de329d7c9477a22fa8cb18f3a74b2ff5'
         '554f2c1bcc5d7169659f0ad3d8a513a5'
         'b5db78e2b9cccd65d6ea4c88dd028ace'
         '9f95a08bdd8c2a9e8d62e7daf52a90f6'
         '3fc4c4981d2dab54b297f17564b7729f'
         '8da7dd477d7d47f03e85be4d6476e183'
         '7c7a55b940c54d919271a92afa8fb489'
         'e48d82ff70b05a74aaace9cdcb6875db'
         'c90f09bb099d403dceeef5b09af32526')