updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / vdr-plugin-sc-hg / PKGBUILD
blob50297092d3f84a8268f6bd18a9f383f0fc362bc3
1 # Contributor Yarema aka Knedlyk <yupadmin@gmail.com>
2 pkgname=vdr-plugin-sc-hg
3 pkgver=574
4 pkgrel=2
5 arch=(i686 x86_64)
6 pkgdesc="A sc plugin for archvdr project (http://sourceforge.net/apps/trac/archvdr/wiki/ArchVDR)"
7 url="http://85.17.209.13:6100/"
8 license="GPL"
9 conflicts=('vdr-sc')
10 depends=('vdr>=1.7.0' 'mercurial')
11 source=('01_Makefile-MAXCAID.dpatch' 'commands.vdr-sc.conf' 'plugin.sc.conf' 'reload-softcam.key' 'vdr-plugin-sc.groups')
12 backup=()
13 md5sums=('ab77234b0286182ff910dbb5e09c24cf'
14          '1f190101eb8ec7d46a6d9d3282f33317'
15          '0a1e85a99005696b3bd6507320ef4cad'
16          '57edddf2161a255cc2acea521d3d3b6f'
17          'c0d6e9f7c568c50bd13522dba67d1aa8')
18                                     
19 _hgroot=http://85.17.209.13:6100/
20 _hgname=sc
21 _hgrevision=560
24 build() {
26     cd $srcdir
27     mkdir -p ${pkgdir}/usr/lib/vdr/plugins/
28     mkdir -p ${pkgdir}/etc/vdr/plugins/
29     mkdir -p ${pkgdir}/usr/share/vdr/groups.d/
30     mkdir -p ${pkgdir}/usr/lib/vdr-plugin-sc/
31     mkdir -p ${pkgdir}/usr/share/vdr/command-hooks/
33     msg "Connecting to Mercurial server...."
34     if [ -d ${srcdir}/${_hgname} ]; then
35         cd ${_hgname}
36         hg pull -u
37         msg "The local files are updated."
38     else
39         hg clone ${_hgroot}${_hgname} ${_hgname}  || return 1
40         cd ${_hgname}
41 #       hg update ${_hgrevision} || return 1
42     fi
43     
44     rm -rf ${srcdir}/${_hgname}-build
45     cp -r ${srcdir}/${_hgname} ${srcdir}/${_hgname}-build
46     cd ${srcdir}/${_hgname}-build
47     
48     msg "Mercurial clone done or server timeout"
49     msg "Starting make..."
52 #    cd $srcdir/${_hgname}
53 # setting MAXCAID, not needed anymore (??)    
54     patch -p2 < ${startdir}/01_Makefile-MAXCAID.dpatch || exit 1
56 # changing optimization option O3->O2
57     sed -e  's/-O3/-O2/' -i  $srcdir/${_hgname}-build/Makefile
59                                                 
61 #changing ECM message size for long messages
62 #    sed -e  's/#define CWS_NETMSGSIZE 272/#define CWS_NETMSGSIZE 540/' -i  $srcdir/$_hgname/systems/cardclient/newcamd.c
64 if [ "$CARCH" = "i686" ]; then
65     make VDRDIR=/usr INCLUDES=-I/usr/include/vdr  LIBDIR=. \
66     PLUGINLIBDIR=${pkgdir}/usr/lib/vdr/plugins \
67     LOCALEDIR=${startdir}/pkg/usr/share/locale all || return 1
68 else
69     sed -i $srcdir/${_hgname}-build/Makefile -e "s:CPUOPT     ?= pentium:CPUOPT     ?= x86-64:"
70     sed -i $srcdir/${_hgname}-build/Makefile -e "s:PARALLEL   ?= PARALLEL_32_INT:PARALLEL   ?= PARALLEL_128_SSE:"
71 #    sed -i $srcdir/${_hgname}-build/FFdecsa/Makefile -e "s:-march=pentium:-march=x86-64:"
72     make CXXFLAGS="-march=x86-64 -O2 -g -fPIC -Wall -Woverloaded-virtual" VDRDIR=/usr  \
73     INCLUDES=-I/usr/include/vdr  LIBDIR=.  PLUGINLIBDIR=${pkgdir}/usr/lib/vdr/plugins \
74     LOCALEDIR=${startdir}/pkg/usr/share/locale all || return 1
77     install -D libvdr-sc.so.* ${pkgdir}/usr/lib/vdr/plugins/
78     install -D systems/*/libsc-*.so.*   ${pkgdir}/usr/lib/vdr/plugins/
79     install -D ../plugin.sc.conf        ${pkgdir}/etc/vdr/plugins/
80     install -D ../plugin.sc.conf        ${pkgdir}/etc/vdr/plugins/
81     install -D ../vdr-plugin-sc.groups  ${pkgdir}/usr/share/vdr/groups.d/
82     install -D ../reload-softcam.key    ${pkgdir}/usr/lib/vdr-plugin-sc/
83     install -D ../commands.vdr-sc.conf  ${pkgdir}/usr/share/vdr/command-hooks/
84 #    install -D $startdir/pkg/usr/src/VDR/locale