summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c0b9774d54fb4f84585265416a1d520bd872b0d5 (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
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer:         Alexander Blinne "Sunday" <alexander at blinne dot net>
# Original Submitter: Wessel Dirksen "p-we" <wdirksen at gmail dot com>

pkgname=tbs-dvb-drivers
pkgver=v150728_4.1.2_2_ARCH
pkgrel=1
pkgdesc="TBS proprietary DVB drivers + firmware"
url="http://www.tbsdtv.com"
arch=('i686' 'x86_64')
license=('GPL')
makedepends=('linux-headers' 'wget' 'moreutils' 'coreutils')
optdepends=('linuxtv-dvb-apps: handy DVB tools' 'v4l-utils: hardware support for some cards')
conflicts=('ffdecsawrapper' 'tbs-linux-drivers' 'tbs-dvb-drivers')
provides=('tbs-dvb-drivers')
install='tbs-dvb-drivers.install'

_tbsver=v150728

source=("http://www.tbsdtv.com/download/document/common/tbs-linux-drivers_$_tbsver.zip"
        'tbs-dvb-drivers.install') 

sha256sums=('79ec6a61fd0a6444f8c9dc237ee3c168cf28a8b2517cc38b92d4075478806a9f'
            '3fdfa6f14af91b3301f0f29c2a2386a7f84504688c766e714287ad8d450e2a57')

pkgver() {

        _kernel=`uname -r | sed -r 's/-/_/g'`
        echo "$_tbsver"_"$_kernel"
        
}

prepare() {
 
        cd $srcdir
        tar xjf linux-tbs-drivers.tar.bz2
        chmod -R 777 $srcdir/linux-tbs-drivers
}
 
build() {
        cd $srcdir/linux-tbs-drivers
        make distclean
 
        if [ `uname -m` == "x86_64" ]; then
            ./v4l/tbs-x86_64.sh  
        else
            ./v4l/tbs-x86_r3.sh
        fi
            
 
        if [ -z "$_kernel" ]
        then
                _kernel=`uname -r`
        fi
       
        make
}
 
package() {
 
        mkdir -p $pkgdir/usr/lib/modules/`uname -r`/updates/tbs
        mkdir -p $pkgdir/usr/lib/firmware
 
        install -m0644 $srcdir/*dvb*.fw  $pkgdir/usr/lib/firmware
        find "$srcdir/linux-tbs-drivers" -name '*.ko' -exec cp {} $pkgdir/usr/lib/modules/`uname -r`/updates/tbs \;
 
        echo ""
        msg "Compressing modules, this will take awhile..."
        echo ""
        find "$pkgdir" -name '*.ko' -print0 | xargs -0 -P`nproc` -n10 gzip -9
 
        chmod -R go-w $pkgdir/usr/lib/modules/`uname -r`/updates
}