1 # Contributor: Juha-Matti "Suolx" Heikkala <jheikkal at gmail dot com>
6 pkgdesc="OPEN-SASC-NG is SoftCAM creating virtual DVB interface"
7 url="http://85.17.209.13:6100"
10 depends=('linux-headers')
11 makedepends=('mercurial')
14 backup=('etc/camdir/cardclient.conf' 'etc/conf.d/sasc-ng')
16 source=('cardclient.conf' 'sasc-ng.rc' 'sasc-ng.conf' \
17 'open-sasc-ng.lr' '2.6.38.patch')
19 md5sums=('81a4c25c1367f6e559b4495a0d6eb89a'
20 '2e3a957978e7698f132254257a60533d'
21 'def6a1da6e75757f1faa1d94686afc1b'
22 '99be6670bc66d12640c9d82cc9bde3b5'
23 'a405b8ebe1b034656de0c935948f4425')
25 install='sasc-ng.install'
27 _hgroot=http://85.17.209.13:6100/
36 msg "Connecting to Mercurial server...."
37 if [ -d $_hgrepo ]; then
40 msg "The local files are updated."
42 hg clone -r $pkgver $_hgroot/$_hgrepo $_hgrepo
45 msg "Mercurial clone done or server timeout"
46 msg "Starting make..."
48 rm -rf "$srcdir/$_hgrepo-build"
49 cp -r "$srcdir/$_hgrepo" "$srcdir/$_hgrepo-build"
50 cd "$srcdir/$_hgrepo-build"
52 msg "Applying patches..."
54 patch -p1 < ${srcdir}/2.6.38.patch
57 msg "Starting make..."
59 cd "$srcdir/$_hgrepo-build"
61 chmod a+x $srcdir/$_hgrepo-build/contrib/sasc-ng/configure
62 chmod a+x $srcdir/$_hgrepo-build/contrib/sasc-ng/makelinks.sh
63 chmod a+x $srcdir/$_hgrepo-build/contrib/sasc-ng/dvbloopback/module/config_dvb.pl
64 cd ${srcdir}/$_hgrepo-build/contrib/sasc-ng
66 make module || return 1
69 mkdir -p $startdir/pkg/usr/sbin
70 mkdir -p $startdir/pkg/lib/modules/`uname -r`/extra
71 mkdir -p $startdir/pkg/etc/{rc.d,conf.d}
72 mkdir -p $startdir/pkg/etc/camdir
73 mkdir -p $startdir/pkg/etc/logrotate.d/
74 install -m0755 sasc-ng $startdir/pkg/usr/sbin/
75 install -m0644 dvbloopback.ko $startdir/pkg/lib/modules/`uname -r`/extra
76 install -m0755 ${srcdir}/sasc-ng.rc $startdir/pkg/etc/rc.d/sasc-ng
77 install -m0644 ${srcdir}/sasc-ng.conf $startdir/pkg/etc/conf.d/sasc-ng
78 install -m0644 ${srcdir}/cardclient.conf $startdir/pkg/etc/camdir/cardclient.conf
79 install -m0644 ${srcdir}/open-sasc-ng.lr $startdir/pkg/etc/logrotate.d/open-sasc-ng.lr