--- v4l-dvb-0~2009-05-21.hg11824.orig/debian/get-orig-source.sh +++ v4l-dvb-0~2009-05-21.hg11824/debian/get-orig-source.sh @@ -0,0 +1,19 @@ +echo Downloading latest from hg repository... + +DEB_SOURCE_PACKAGE=$1 +VERSION_DATE=0~`/bin/date --utc +%0Y-%0m-%0d` + +hg clone http://linuxtv.org/hg/v4l-dvb + +cd v4l-dvb +HG_REV=`hg identify -n` +HG_SHA=`hg identify -i` +cd .. + +VERSION_FULL=$VERSION_DATE.hg$HG_REV + +tar --exclude=.hg -czf "../${DEB_SOURCE_PACKAGE}_${VERSION_FULL}.orig.tar.gz" v4l-dvb + +dch -v "$VERSION_FULL-1" "New Upstream Snapshot (hg revision $HG_SHA)" + +rm -rf v4l-dvb --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/compat +++ v4l-dvb-0~2009-05-21.hg11824/debian/compat @@ -0,0 +1 @@ +5 --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/copyright +++ v4l-dvb-0~2009-05-21.hg11824/debian/copyright @@ -0,0 +1,98 @@ +Upstream Homepage: + http://linuxtv.org/hg/v4l-dvb + +Upstream Author: + Various other authors + +Debian Maintainers: + +Copyright: + (C) 1994 - 2009 Various other authors + +License (GPL v2 or later): + 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 of the License, 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301, USA. + + The complete text of the GNU General Public License can be found + in /usr/share/common-licenses/GPL-2 on most Debian systems. + +License (LGPL v2.1 or later): + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, + USA. + + On Debian systems, a copy of the GNU Lesser General Public License can + be found in the /usr/share/common-licenses/LGPL-2.1 file. + +License (MIT/X11 - BSD-like): + Permission is hereby granted, free of charge, to any person + obtaining a copy of this software and associated + documentation files (the "Software"), to deal in the + Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, + sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall + be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS + BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + +License (BSD): + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + - Neither the name of the author nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/v4l-dvb-headers.install +++ v4l-dvb-0~2009-05-21.hg11824/debian/v4l-dvb-headers.install @@ -0,0 +1 @@ +linux/include/* usr/include/v4l-dvb/ --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/changelog +++ v4l-dvb-0~2009-05-21.hg11824/debian/changelog @@ -0,0 +1,7 @@ +v4l-dvb (0~2009-05-21.hg11824-1) UNRELEASED; urgency=low + + * Add patch 01_dvb-cwidx-v4l-dvb + * Add patch 02_ir-permission-666 + * New Upstream Snapshot (hg revision 315bc4b65b4f) + + -- micky979 Thu, 21 May 2009 12:19:32 +0200 --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/control +++ v4l-dvb-0~2009-05-21.hg11824/debian/control @@ -0,0 +1,23 @@ +Source: v4l-dvb +Section: misc +Priority: extra +Maintainer: micky979 +Build-Depends: debhelper (>= 5), cdbs, dpatch, bzip2 +Standards-Version: 3.8.0 +Homepage: http://linuxtv.org/hg/v4l-dvb + +Package: v4l-dvb-headers +Architecture: all +Depends: module-assistant, ${shlibs:Depends}, ${misc:Depends} +Description: Header files for the v4l-dvb DVB driver modules + Includes the header files for the v4l-dvb DVB driver modules + which differ from the standard headers provided for the kernel. + +Package: v4l-dvb-source +Architecture: all +Depends: module-assistant, ${shlibs:Depends}, ${misc:Depends} +Description: v4l-dvb DVB driver modules sources + The sources for the v4l-dvb DVB driver modules, which + are a development snapshot of improved DVB drivers coming as + out-of-tree modules which replace the standard kernel modules. + Sooner or later these drivers will get merged into the kernel. --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/rules +++ v4l-dvb-0~2009-05-21.hg11824/debian/rules @@ -0,0 +1,21 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/rules/dpatch.mk + +DEB_INSTALL_DIRS_v4l-dvb-source = usr/src/ + +tempdir = debian/tmp/modules/v4l-dvb + +install/v4l-dvb-source:: + mkdir -p $(tempdir)/debian + tar -c --exclude "debian" . | tar -x -C $(tempdir) + install -m 644 $(addprefix debian/, changelog compat control copyright modules-source/*) $(tempdir)/debian + chmod a+x $(tempdir)/debian/rules + tar -c -j -f debian/v4l-dvb-source/usr/src/v4l-dvb.tar.bz2 -C debian/tmp modules + +binary-install/v4l-dvb-headers:: + find debian/v4l-dvb-headers/ -name *.h -exec v4l/scripts/headers_convert.pl {} \; + +get-orig-source:: + /bin/sh debian/get-orig-source.sh $(DEB_SOURCE_PACKAGE) --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/docs +++ v4l-dvb-0~2009-05-21.hg11824/debian/docs @@ -0,0 +1,2 @@ +README +README.patches --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/patches/02_ir-permission-666.dpatch +++ v4l-dvb-0~2009-05-21.hg11824/debian/patches/02_ir-permission-666.dpatch @@ -0,0 +1,20 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_ir-permission-666.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ + +diff -Nru v4l-dvb/linux/drivers/media/dvb/ttpci/av7110_ir.c v4l-dvb-ir-permission-666/linux/drivers/media/dvb/ttpci/av7110_ir.c +--- v4l-dvb/linux/drivers/media/dvb/ttpci/av7110_ir.c 2009-05-21 12:57:43.000000000 +0200 ++++ v4l-dvb-ir-permission-666/linux/drivers/media/dvb/ttpci/av7110_ir.c 2009-05-21 18:10:23.000000000 +0200 +@@ -372,7 +372,7 @@ + input_dev->timer.data = (unsigned long) &av7110->ir; + + if (av_cnt == 1) { +- e = create_proc_entry("av7110_ir", S_IFREG | S_IRUGO | S_IWUSR, NULL); ++ e = create_proc_entry("av7110_ir", S_IFREG | S_IRUGO | S_IWUGO, NULL); + if (e) { + e->write_proc = av7110_ir_write_proc; + e->size = 4 + 256 * sizeof(u16); --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/patches/00list +++ v4l-dvb-0~2009-05-21.hg11824/debian/patches/00list @@ -0,0 +1 @@ +02_ir-permission-666 --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/patches/01_dvb-cwidx-v4l-dvb.dpatch +++ v4l-dvb-0~2009-05-21.hg11824/debian/patches/01_dvb-cwidx-v4l-dvb.dpatch @@ -0,0 +1,101 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_dvb-cwidx-v4l-dvb.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ + +diff -Nru v4l-dvb/linux/drivers/media/dvb/ttpci/av7110_ca.c v4l-dvb-concurrent-recording/linux/drivers/media/dvb/ttpci/av7110_ca.c +--- v4l-dvb/linux/drivers/media/dvb/ttpci/av7110_ca.c 2009-05-21 11:17:50.000000000 +0200 ++++ v4l-dvb-concurrent-recording/linux/drivers/media/dvb/ttpci/av7110_ca.c 2009-05-21 11:21:39.000000000 +0200 +@@ -34,6 +34,9 @@ + #include + #include + #include ++#ifndef LINUX_VERSION_CODE ++#include ++#endif + + #include "av7110.h" + #include "av7110_hw.h" +@@ -287,10 +290,31 @@ + } + + case CA_GET_MSG: +- break; ++ { ++ ca_pid_t *arg = (ca_pid_t*) parg; ++ u16 buf[4], res[2]; ++ buf[0]=0x0745; ++ buf[1]=2; ++ buf[2]=arg->pid >> 16; ++ buf[3]=arg->pid & 0xFFFF; ++ av7110_fw_request(av7110,buf,sizeof(buf),res,2); ++ arg->index=(res[0]<<16) + res[1]; ++ break; ++ } + + case CA_SEND_MSG: +- break; ++ { ++ ca_pid_t *arg = (ca_pid_t*) parg; ++ u16 buf[6], res[2]; ++ buf[0]=0x0746; ++ buf[1]=4; ++ buf[2]=arg->pid >> 16; ++ buf[3]=arg->pid & 0xFFFF; ++ buf[4]=arg->index >> 16; ++ buf[5]=arg->index & 0xFFFF; ++ av7110_fw_request(av7110,buf,sizeof(buf),res,2); ++ break; ++ } + + case CA_GET_DESCR_INFO: + { +@@ -319,6 +343,45 @@ + break; + } + ++ case CA_SET_PID: ++ { ++ int handle; ++ ca_pid_t *pid = (ca_pid_t*) parg; ++ ++ if (pid->pid >= 0x1fff) ++ return -EINVAL; ++ if (pid->index < 0 || pid->index >= 16) ++ return -EINVAL; ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) ++ if (down_interruptible (&av7110->demux.mutex)) ++#else ++ if (mutex_lock_interruptible (&av7110->demux.mutex)) ++#endif ++ return -ERESTARTSYS; ++ ++ for(handle=0; handle<32; handle++) { ++ struct dvb_demux_filter *dvbdmxfilter=av7110->handle2filter[handle]; ++ if(dvbdmxfilter) { ++ struct dvb_demux_feed *feed=dvbdmxfilter->feed; ++ if(feed && feed->state==DMX_STATE_GO && feed->pid==pid->pid) { ++ /* we map the new cmd to CacheError as it's not ++ implemented anyways, i.e. free. */ ++ av7110_fw_cmd(av7110, COMTYPE_PIDFILTER, CacheError, 1, ++ (handle<<8)|pid->index); /* hw handle / cw index*/ ++ break; ++ } ++ } ++ } ++ ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) ++ up(&av7110->demux.mutex); ++#else ++ mutex_unlock(&av7110->demux.mutex); ++#endif ++ break; ++ } ++ + default: + return -EINVAL; + } --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/modules-source/v4l-dvb-modules-_KVERS_.postrm.in.modules.in +++ v4l-dvb-0~2009-05-21.hg11824/debian/modules-source/v4l-dvb-modules-_KVERS_.postrm.in.modules.in @@ -0,0 +1,10 @@ + +if [ remove = "$1" ]; then + PKGNAME="v4l-dvb-modules-_KVERS_" + echo "Uninstalling diversions..." + for file in $DIVERT_LIST ; do + dpkg-divert --package $PKGNAME --remove --rename --divert $file.v4l-dvb $file >/dev/null + done +fi + +#DEBHELPER# --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/modules-source/v4l-dvb-modules-_KVERS_.preinst.in.modules.in +++ v4l-dvb-0~2009-05-21.hg11824/debian/modules-source/v4l-dvb-modules-_KVERS_.preinst.in.modules.in @@ -0,0 +1,12 @@ + +if [ install = "$1" -o upgrade = "$1" ]; then + PKGNAME="v4l-dvb-modules-_KVERS_" + echo "Installing diversions..." + for file in $DIVERT_LIST ; do + if [ -e $file ] ; then + dpkg-divert --package $PKGNAME --add --rename --divert $file.v4l-dvb $file >/dev/null + fi + done +fi + +#DEBHELPER# --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/modules-source/control.modules.in +++ v4l-dvb-0~2009-05-21.hg11824/debian/modules-source/control.modules.in @@ -0,0 +1,13 @@ +Source: v4l-dvb +Section: misc +Priority: optional +Maintainer: Peter Siering +Build-Depends: debhelper (>= 5.0.37), bzip2 +Standards-Version: 3.8.0 + +Package: v4l-dvb-modules-_KVERS_ +Architecture: any +Depends: linux-image-_KVERS_ +Provides: v4l-dvb-modules +Description: TODO + TODO --- v4l-dvb-0~2009-05-21.hg11824.orig/debian/modules-source/rules +++ v4l-dvb-0~2009-05-21.hg11824/debian/modules-source/rules @@ -0,0 +1,43 @@ +#!/usr/bin/make -f + +# module-assistant stuff +PACKAGE = v4l-dvb-modules +MA_DIR ?= /usr/share/modass +-include $(MA_DIR)/include/generic.make +-include $(MA_DIR)/include/common-rules.make + +kdist_clean: prep-deb-files + dh_clean + $(MAKE) clean + +kdist_config: prep-deb-files + +binary-modules: kdist_config + dh_testdir + dh_testroot + dh_clean -k +# build and install the module + $(MAKE) VER=$(KVERS) release + $(MAKE) all + $(MAKE) VER=$(KVERS) DESTDIR=$(CURDIR)/debian/tmp/ install + $(MAKE) FW_DIR=$(CURDIR)/debian/tmp/lib/firmware/ firmware_install + echo "#!/bin/sh" >debian/script-header + echo "set -e" >>debian/script-header + echo "DIVERT_LIST=\`cat << EOF" >>debian/script-header + find $(CURDIR)/debian/tmp/lib/modules/$(KVERS)/kernel -type f | sed "s:^$(CURDIR)/debian/tmp/lib: /lib:" >>debian/script-header + find $(CURDIR)/debian/tmp/lib/firmware -type f | sed "s:^$(CURDIR)/debian/tmp/lib: /lib:" >>debian/script-header + echo "EOF\`" >>debian/script-header + cat debian/script-header debian/v4l-dvb-modules-$(KVERS).preinst.in >debian/v4l-dvb-modules-$(KVERS).preinst + cat debian/script-header debian/v4l-dvb-modules-$(KVERS).postrm.in >debian/v4l-dvb-modules-$(KVERS).postrm + dh_install debian/tmp/lib/modules/$(KVERS)/kernel + dh_install debian/tmp/lib/firmware + dh_installdocs + dh_installchangelogs + dh_compress + dh_fixperms + dh_installmodules + dh_installdeb + dh_gencontrol -- -v$(VERSION) + dh_md5sums + dh_builddeb --destdir=$(DEB_DESTDIR) +