From 6ad59b561eae56c99586bae4c75a9a91f573e242 Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Thu, 9 Feb 2012 09:17:25 +0100 Subject: [PATCH] linux-drivers: vtuner driver (access DVB devices over the network) tools/mkpkg: add script to get and pack vtuner driver sources --- packages/linux-drivers/vtuner-driver/build | 29 +++++++++++ packages/linux-drivers/vtuner-driver/install | 28 ++++++++++ packages/linux-drivers/vtuner-driver/meta | 36 +++++++++++++ .../linux-drivers/vtuner-driver/need_unpack | 32 ++++++++++++ projects/ATV/options | 2 +- projects/Fusion/options | 2 +- projects/Generic/options | 2 +- projects/Generic_OSS/options | 2 +- projects/ION/options | 2 +- projects/Intel/options | 2 +- projects/Ultra/options | 2 +- tools/mkpkg/mkpkg_vtuner-driver | 52 +++++++++++++++++++ 12 files changed, 184 insertions(+), 7 deletions(-) create mode 100755 packages/linux-drivers/vtuner-driver/build create mode 100755 packages/linux-drivers/vtuner-driver/install create mode 100644 packages/linux-drivers/vtuner-driver/meta create mode 100755 packages/linux-drivers/vtuner-driver/need_unpack create mode 100755 tools/mkpkg/mkpkg_vtuner-driver diff --git a/packages/linux-drivers/vtuner-driver/build b/packages/linux-drivers/vtuner-driver/build new file mode 100755 index 0000000000..299803999a --- /dev/null +++ b/packages/linux-drivers/vtuner-driver/build @@ -0,0 +1,29 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +cd $PKG_BUILD + +make KDIR=$(kernel_path) CC=$CC +fix_module_depends vtunerc.ko "dvb_core" + diff --git a/packages/linux-drivers/vtuner-driver/install b/packages/linux-drivers/vtuner-driver/install new file mode 100755 index 0000000000..e7b26ee05b --- /dev/null +++ b/packages/linux-drivers/vtuner-driver/install @@ -0,0 +1,28 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +VER=`ls $BUILD/linux*/modules/lib/modules` + +mkdir -p $INSTALL/lib/modules/$VER/vtuner/ + cp $PKG_BUILD/*.ko $INSTALL/lib/modules/$VER/vtuner/ diff --git a/packages/linux-drivers/vtuner-driver/meta b/packages/linux-drivers/vtuner-driver/meta new file mode 100644 index 0000000000..c681fba654 --- /dev/null +++ b/packages/linux-drivers/vtuner-driver/meta @@ -0,0 +1,36 @@ +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME="vtuner-driver" +PKG_VERSION="9" +PKG_REV="1" +PKG_ARCH="any" +PKG_LICENSE="GPL" +PKG_SITE="http://code.google.com/p/vtuner/" +PKG_URL="http://dl.dropbox.com/u/8224157/OpenELEC-Ultra/addons/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_DEPENDS="" +PKG_BUILD_DEPENDS="toolchain linux" +PKG_PRIORITY="optional" +PKG_SECTION="driver/dvb" +PKG_SHORTDESC="vtuner: access DVB devices over the network." +PKG_LONGDESC="vtuner: access DVB devices over the network." +PKG_IS_ADDON="no" +PKG_AUTORECONF="no" + diff --git a/packages/linux-drivers/vtuner-driver/need_unpack b/packages/linux-drivers/vtuner-driver/need_unpack new file mode 100755 index 0000000000..5d6df529ff --- /dev/null +++ b/packages/linux-drivers/vtuner-driver/need_unpack @@ -0,0 +1,32 @@ +#!/bin/sh + +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +. config/options $1 + +STAMP=$STAMPS/$1/unpack + +test $PKG_DIR/config/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PROJECT_DIR/$PROJECT/linux/linux.$TARGET_ARCH.conf -nt $STAMP -o \ + $PKG_DIR/url -nt $STAMP -o \ + $PKG_DIR/meta -nt $STAMP && rm -f $STAMP + +exit 0 diff --git a/projects/ATV/options b/projects/ATV/options index 6883166fe2..36567f5739 100755 --- a/projects/ATV/options +++ b/projects/ATV/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx bcm_sta" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/Fusion/options b/projects/Fusion/options index f110fc279d..b06c45c4b6 100755 --- a/projects/Fusion/options +++ b/projects/Fusion/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/Generic/options b/projects/Generic/options index 48b29b1c74..173be2ffbe 100755 --- a/projects/Generic/options +++ b/projects/Generic/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/Generic_OSS/options b/projects/Generic_OSS/options index d74a2be677..101a051d12 100755 --- a/projects/Generic_OSS/options +++ b/projects/Generic_OSS/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/ION/options b/projects/ION/options index 965f0c4f39..e76a8da5a4 100755 --- a/projects/ION/options +++ b/projects/ION/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/Intel/options b/projects/Intel/options index c99d5ae6b1..1e67c5427b 100755 --- a/projects/Intel/options +++ b/projects/Intel/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/projects/Ultra/options b/projects/Ultra/options index 05284de01a..5e843cb426 100755 --- a/projects/Ultra/options +++ b/projects/Ultra/options @@ -160,7 +160,7 @@ # e.g. ADDITIONAL_DRIVERS="asix-ax887xx AF9035" ADDITIONAL_DRIVERS="asix-ax887xx" if [ "$PVR" = yes ]; then - ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver" + ADDITIONAL_DRIVERS="$ADDITIONAL_DRIVERS AF9035 A867 aver_h826d RTL2832 hdhomerun-driver vtuner-driver" fi # build with network support (yes / no) diff --git a/tools/mkpkg/mkpkg_vtuner-driver b/tools/mkpkg/mkpkg_vtuner-driver new file mode 100755 index 0000000000..c20a57d65b --- /dev/null +++ b/tools/mkpkg/mkpkg_vtuner-driver @@ -0,0 +1,52 @@ +#!/bin/sh +################################################################################ +# This file is part of OpenELEC - http://www.openelec.tv +# Copyright (C) 2009-2011 Stephan Raue (stephan@openelec.tv) +# +# This Program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This Program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with OpenELEC.tv; see the file COPYING. If not, write to +# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. +# http://www.gnu.org/copyleft/gpl.html +################################################################################ + +PKG_NAME=vtuner-driver +HG_URL=https://code.google.com/p/ +HG_NAME=vtuner.linux-driver +HG_REV=latest + +echo "getting sources..." + if [ ! -d $PKG_NAME.hg ]; then + hg clone ${HG_URL}${HG_NAME} $PKG_NAME.hg + fi + + cd $PKG_NAME.hg + if [ $HG_REV = latest ]; then + hg update + HG_REV=$(hg identify -n) + else + hg update $HG_REV + fi + cd .. + +echo "copying sources..." + rm -rf $PKG_NAME-$HG_REV + cp -R $PKG_NAME.hg $PKG_NAME-$HG_REV + +echo "cleaning sources..." + rm -rf $PKG_NAME-$HG_REV/.hg + +echo "packing sources..." + tar cvJf $PKG_NAME-$HG_REV.tar.xz $PKG_NAME-$HG_REV + +echo "remove temporary sourcedir..." +# rm -rf $PKG_NAME-$HG_REV