--- dvbtune-0.5.orig/debian/TODO +++ dvbtune-0.5/debian/TODO @@ -0,0 +1,4 @@ +- Ensure it works with devfs-only systems + +- Add the usual --help, --version options + --- dvbtune-0.5.orig/debian/postinst +++ dvbtune-0.5/debian/postinst @@ -0,0 +1,13 @@ +#!/bin/sh + +set -e + +# +# Rely on makedev to Do The Right Thing and not stomp on devfsd, udeb +# +if [ -e /sbin/MAKEDEV ] +then + ( cd /dev && /sbin/MAKEDEV dvb ) +fi + +#DEBHELPER# --- dvbtune-0.5.orig/debian/control +++ dvbtune-0.5/debian/control @@ -0,0 +1,15 @@ +Source: dvbtune +Section: utils +Priority: optional +Maintainer: Alastair McKinstry +Build-Depends: debhelper (>> 3.0.0), libxml2-dev, dvb-dev (>> 1.0.0), docbook-to-man, dbs +Standards-Version: 3.6.2 + +Package: dvbtune +Architecture: any +Depends: ${shlibs:Depends}, makedev (>= 2.3.1) | udev | devfsd +Description: Simple tuning application for DVB cards + DVBtune is a simple application to allow the tuning of DVB cards + supported by the Linux DVB driver. + . + It is still very experimental, especially the XML output. --- dvbtune-0.5.orig/debian/changelog +++ dvbtune-0.5/debian/changelog @@ -0,0 +1,67 @@ +dvbtune (0.5-5) unstable; urgency=low + + * Ensure /sbin/MAKEDEV is run in /dev. Closes: #330373 + * Move to Standards-Version: 3.6.2. No changes required. + + -- Alastair McKinstry Tue, 27 Sep 2005 21:12:33 +0100 + +dvbtune (0.5-4) unstable; urgency=low + + * Fix makedev version to >= 2.3.1. Closes: #247794. + + -- Alastair McKinstry Sat, 15 May 2004 22:13:57 +0100 + +dvbtune (0.5-3) unstable; urgency=low + + * Requires makedev >s=> 2.3.1-69. Closes: #246636. + + -- Alastair McKinstry Sun, 2 May 2004 20:00:08 +0100 + +dvbtune (0.5-2) unstable; urgency=low + + * postinst: Create dvb device nodes on install if necessary. Recommend + makedev | udev | devfsd to ensure presence. Closes: #242567. + + -- Alastair McKinstry Tue, 13 Apr 2004 22:03:02 +0100 + +dvbtune (0.5-1) unstable; urgency=low + + * New upstream release. + + -- Alastair McKinstry Sun, 15 Feb 2004 08:44:08 +0000 + +dvbtune (0.3+cvs20030922-2) unstable; urgency=low + + * Added Build-Depends: dbs. Closes: #213114. + + -- Alastair McKinstry Sun, 28 Sep 2003 19:07:52 +0100 + +dvbtune (0.3+cvs20030922-1) unstable; urgency=low + + * New upstream version; build using dbs. CVS snapshot used to move to + dvb-dev >= 1.0. + * Move to Standards-Version: 3.6.1. No changes required. + + -- Alastair McKinstry Thu, 25 Sep 2003 20:38:40 +0000 + +dvbtune (0.3-3) unstable; urgency=low + + * Change maintainer email to mckinstry@debian.org. + * Move to Standards-Version: 3.6.0. No changes required. + + -- Alastair McKinstry Wed, 30 Jul 2003 13:03:58 +0100 + +dvbtune (0.3-2) unstable; urgency=low + + * Add Build-depends on docbook-to-man, included header file + string.h. Closes: #155470. + * Programs now implement --version, --help. + + -- Alastair McKinstry Wed, 7 Aug 2002 12:32:42 +0200 + +dvbtune (0.3-1) unstable; urgency=low + + * Initial Release. Closes: #152083. + + -- Alastair McKinstry Thu, 4 July 2002 11:07:32 +0100 + --- dvbtune-0.5.orig/debian/copyright +++ dvbtune-0.5/debian/copyright @@ -0,0 +1,18 @@ +This package was debianized by Alastair McKinstry on +Thu, 9 May 2002 10:50:42 +0100. + +It was downloaded from http://www.linuxstb.org + +Upstream Author: + +Dave Chapman + +Contributors: + +Hilmar Linder +John Williams + +Copyright: + +It may be redistributed under the terms of the GNU GPL, Version 2 +found on Debian systems in the file /usr/share/common-licenses/GPL . --- dvbtune-0.5.orig/debian/dirs +++ dvbtune-0.5/debian/dirs @@ -0,0 +1 @@ +usr/bin --- dvbtune-0.5.orig/debian/dvbtune.sgml +++ dvbtune-0.5/debian/dvbtune.sgml @@ -0,0 +1,324 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Alastair"> + McKinstry"> + + May 9, 2002"> + + 1"> + mckinstry@computer.org"> + + DVBTUNE"> + + + Debian"> + GNU"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2002 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + command-line tuning application for DVB cards + + + + &dhpackage; + -f frequency + -p h|v + -s symbol_rate + -v vpid + -a apid + -t tpid + + + + &dhpackage; -f frequency + + + + + DESCRIPTION + + + &dhpackage; is a simple tuning application for DVB cards + supported by the Linux DVB driver (www.linuxtv.org). + + + + This is still very experimental - especially the XML output. + The latest version can be found at www.linuxstb.org. + You can contact the author at dave@dchapman.com. + + + + + OPTIONS + + + The following options are understood by dvbtune: + + + + + + -c [0-3] + Use DVB device [0-3] + + + + -f freq + + Absolute Frequency (DVB-S in Hz or DVB-T in Hz), + or L-band Frequency (DVB-S in Hz or DVB-T in Hz). + + + + + -p [H|V] + Polarity (DVB-S only) + + + + -t [0|1] + 0 = 22 kHz off, 1 = 22 kHz on + + + + -I [0|1|2] + + 0 = Spectrum Inversion off + 1 = Spectrum Inversion on, + 2 = auto (Default) + + + + + -S N + + Symbol rate (DVB-S only),e.g. 27500 + + + + + -D [0-4] + + DiSEqc ("Digital Satellite Equipment Control") command (0=none) + + + + + -V vpid + + Set video PID (Full cards only) + + + + + -A apid + + Set audio PID (full cards only) + + + + + -T ttpid + + Set teletext PID (full cards only) + + + + + -pnr N + + Tune to Program Number (aka service) N + + + + + -i + + Dump SI information as XML + + + + + -x + + Attempt to auto-find other transponders (experimental) + + + + + -m + + Monitor the reception quality + + + + + -n dpid + + Add network interface and receive MPE on PID dpid + + + + + --help + + Print help message + + + + + --version + + Print version string + + + + + + + + + + EXAMPLES + + + For simple tuning, you can just use + + dvbtune -f 12188000 -p h -s 27500 -v 163 -a 104 -t 32 + + to tune to a satellite transponder and set the video, audio and teletext PIDs. + + dvbtune can also support DVB-T reception (currently for the UK only). + In this case, you just need to specify the frequency: + + dvbtune -f 48183300 + + To get the DVB SI information for a multiplex, you can use the + option. The output of dvbtune needs some addition lines before it is + a valid XML file. + + +To get the DVB SI information for a multiplex, you can use the "-i" +option. The output of dvbtune needs some addition lines before it is +a valid XML file. e.g. use a script containing + +echo '<?xml version="1.0"?>' > test.xml ; +echo '<satellite>' >> test.xml ; +dvbtune -f freq -s srate -p pol -i >> test.xml ; +echo '</satellite>' >> test.xml + +to dump the SI for a satellite transponder. + +This was done to allow you to write scripts to scan multiple +transponders and write the output to the same XML file. See the +"scripts" subdirectory for examples. + + + + + + NOTES + + dvbtune depends on the appropriate device nodes in /dev being + present. These are either provided automatically by devfsd or udev, or must + be made using /sbin/MAKEDEV dvb. The Debian package automatically + runs MAKEDEV if necessary on install. + + + + + SEE ALSO + + xml2vdr (1), szap (1). + + + + AUTHOR + + + &dhpackage; was written by Dave Chapman + dave@dchapman.org. + + + + Hilmar Linder added the Switch -n that adds a network interface and switch -m that + monitors the reception quality. Changed the tuning code. Added command + line parameters for spectral inversion. Changed code to allow L-Band + frequencies with -f switch. + + + + John Williams Added -D diseqc support, and made the 22kHz tone automatic again. + + + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the Free + Software Foundation; with no Invariant Sections, no Front-Cover + Texts and no Back-Cover Texts. + + +
+ + + + --- dvbtune-0.5.orig/debian/rules +++ dvbtune-0.5/debian/rules @@ -0,0 +1,82 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This is the debhelper compatibility version to use. +export DH_COMPAT=3 + +package=dvbtune +#VERSION=$(shell LC_ALL=C dpkg-parsechangelog | grep ^Version: | sed 's/^Version: *//') +VERSION=0.5 + +# The DBS rules +include /usr/share/dbs/dbs-build.mk +# convenient way to set architecture specification strings +# the ifeq condition is here to allow them to be overridden +# from the command line +ifeq (,$(DEB_BUILD_GNU_TYPE)) + include /usr/share/dbs/dpkg-arch.mk +endif + +BUILD_DIR=$(SOURCE_DIR)/dvbtune-${VERSION} + +ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) + CFLAGS += -g +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + +build: ${STAMP_DIR}/build-stamp +${STAMP_DIR}/build-stamp: $(patched) + dh_testdir + $(MAKE) -C $(BUILD_DIR) VERSION=$(VERSION) + $(MAKE) -C $(BUILD_DIR) VERSION=$(VERSION) xml2vdr + rm -rf $(BUILD_DIR)/scripts/CVS + /usr/bin/docbook-to-man debian/dvbtune.sgml > $(BUILD_TREE)/dvbtune.1 + /usr/bin/docbook-to-man debian/xml2vdr.sgml > $(BUILD_TREE)/xml2vdr.1 + touch ${STAMP_DIR}/build-stamp + +clean: + dh_testdir + dh_testroot + rm -rf ${STAMP_DIR} ${SOURCE_DIR} + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/dvbtune. + $(MAKE) -C $(BUILD_DIR) install DESTDIR=$(CURDIR)/debian/dvbtune + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot + dh_installdocs + dh_installexamples $(BUILD_DIR)/scripts/* + dh_installman $(BUILD_TREE)/dvbtune.1 $(BUILD_TREE)/xml2vdr.1 + cp debian/ChangeLog.upstream $(BUILD_TREE)/ChangeLog + dh_installchangelogs $(BUILD_TREE)/ChangeLog + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- dvbtune-0.5.orig/debian/watch +++ dvbtune-0.5/debian/watch @@ -0,0 +1,5 @@ +# Example watch control file for uscan +# Rename this file to "watch" and then you can run the "uscan" command +# to check for upstream updates and more. +# Site Directory Pattern Version Script +linuxstb.org /dvbtune dvbtune-(.*).tar.gz debian uupdate --- dvbtune-0.5.orig/debian/patches/10_options.patch +++ dvbtune-0.5/debian/patches/10_options.patch @@ -0,0 +1,705 @@ +diff -ruN dvbtune-0.5-old/dvbtune.c dvbtune-0.5/dvbtune.c +--- dvbtune-0.5-old/dvbtune.c 2004-02-11 15:59:19.000000000 +0000 ++++ dvbtune-0.5/dvbtune.c 2004-02-15 08:42:10.000000000 +0000 +@@ -45,6 +45,19 @@ + #include + #include + #include ++#include ++ ++#ifdef I18N ++#include ++#include ++#define _(X) gettext(X) ++#else /* Null Ops */ ++#define LC_ALL 1 ++#define textdomain(X) do {} while (0) ++#define _(X) (X) ++#define setlocale(X,Y) do {} while (0) ++#endif ++ + + // DVB includes: + #ifdef NEWSTRUCT +@@ -64,6 +77,7 @@ + #include + #endif + ++ + #include "tune.h" + + #define SECA_CA_SYSTEM 0x0100 +@@ -283,7 +297,7 @@ + pesFilterParamsREC.flags = DMX_IMMEDIATE_START; + if (ioctl(fd, DMX_SET_PES_FILTER, + &pesFilterParamsREC) < 0) +- perror("set_recpid"); ++ perror(_("set_recpid")); + } + + void set_sipid(ushort ttpid) +@@ -306,7 +320,7 @@ + pesFilterParamsSI.flags = DMX_IMMEDIATE_START; + if (ioctl(fd_demuxsi, DMX_SET_PES_FILTER, + &pesFilterParamsSI) < 0) +- perror("set_sipid"); ++ perror(_("set_sipid")); + } + + void set_ttpid(ushort ttpid) +@@ -329,7 +343,7 @@ + pesFilterParamsTT.flags = DMX_IMMEDIATE_START; + if (ioctl(fd_demuxtt, DMX_SET_PES_FILTER, + &pesFilterParamsTT) < 0) +- perror("set_ttpid"); ++ perror(_("set_ttpid")); + } + + void set_vpid(ushort vpid) +@@ -351,7 +365,7 @@ + pesFilterParamsV.flags = DMX_IMMEDIATE_START; + if (ioctl(fd_demuxv, DMX_SET_PES_FILTER, + &pesFilterParamsV) < 0) +- perror("set_vpid"); ++ perror(_("set_vpid")); + } + + void set_apid(ushort apid) +@@ -372,7 +386,7 @@ + pesFilterParamsA.flags = DMX_IMMEDIATE_START; + if (ioctl(fd_demuxa, DMX_SET_PES_FILTER, + &pesFilterParamsA) < 0) +- perror("set_apid"); ++ perror(_("set_apid")); + } + + void set_dpid(ushort dpid) +@@ -390,7 +404,7 @@ + sctFilterParams.timeout = 0; + sctFilterParams.flags = DMX_IMMEDIATE_START; + if (ioctl(fd_demuxd, DMX_SET_FILTER, &sctFilterParams) < 0) +- perror("set_dpid"); ++ perror(_("set_dpid")); + } + + +@@ -412,8 +426,8 @@ + pesFilterParams.flags = DMX_IMMEDIATE_START; + + if (ioctl(fd, DMX_SET_PES_FILTER, &pesFilterParams) < 0) { +- fprintf(stderr,"FILTER %i: ",pid); +- perror("DMX SET PES FILTER"); ++ fprintf(stderr,_("FILTER %i: "),pid); ++ perror(_("DMX SET PES FILTER")); + } + } + +@@ -702,7 +716,7 @@ + int info_len,network_id; + + if((fd_nit = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- perror("fd_nit DEVICE: "); ++ perror(_("fd_nit DEVICE: ")); + return -1; + } + +@@ -714,7 +728,7 @@ + sctFilterParams.filter.mask[0]=0xff; + + if (ioctl(fd_nit,DMX_SET_FILTER,&sctFilterParams) < 0) { +- perror("NIT - DMX_SET_FILTER:"); ++ perror(_("NIT - DMX_SET_FILTER:")); + close(fd_nit); + return -1; + } +@@ -722,7 +736,7 @@ + ufd.fd=fd_nit; + ufd.events=POLLPRI; + if (poll(&ufd,1,10000) < 0 ) { +- fprintf(stderr,"TIMEOUT on read from fd_nit\n"); ++ fprintf(stderr,_("TIMEOUT on read from fd_nit\n")); + close(fd_nit); + return -1; + } +@@ -756,10 +770,10 @@ + // printf("\n"); + // printf("\n"); + } else { +- fprintf(stderr,"Under-read bytes for NIT - wanted %d, got %d\n",seclen,n); ++ fprintf(stderr,_("Under-read bytes for NIT - wanted %d, got %d\n"),seclen,n); + } + } else { +- fprintf(stderr,"Nothing to read from fd_nit\n"); ++ fprintf(stderr,_("Nothing to read from fd_nit\n")); + } + close(fd_nit); + return(0); +@@ -780,7 +794,7 @@ + if (pid==0) { return; } + + if((fd_pmt = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- perror("fd_pmt DEVICE: "); ++ perror(_("fd_pmt DEVICE: ")); + return; + } + +@@ -792,7 +806,7 @@ + sctFilterParams.filter.mask[0]=0xff; + + if (ioctl(fd_pmt,DMX_SET_FILTER,&sctFilterParams) < 0) { +- perror("PMT - DMX_SET_FILTER:"); ++ perror(_("PMT - DMX_SET_FILTER:")); + close(fd_pmt); + return; + } +@@ -800,7 +814,7 @@ + ufd.fd=fd_pmt; + ufd.events=POLLPRI; + if (poll(&ufd,1,10000) < 0) { +- fprintf(stderr,"TIMEOUT reading from fd_pmt\n"); ++ fprintf(stderr,_("TIMEOUT reading from fd_pmt\n")); + close(fd_pmt); + return; + } +@@ -847,10 +861,10 @@ + // printf("\n"); + // printf("\n"); + } else { +- printf("Under-read bytes for PMT - wanted %d, got %d\n",seclen,n); ++ printf(_("Under-read bytes for PMT - wanted %d, got %d\n"),seclen,n); + } + } else { +- fprintf(stderr,"Nothing to read from fd_pmt\n"); ++ fprintf(stderr,_("Nothing to read from fd_pmt\n")); + } + + close(fd_pmt); +@@ -867,7 +881,7 @@ + pat_t pat; + + if((fd_pat = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- perror("fd_pat DEVICE: "); ++ perror(_("fd_pat DEVICE: ")); + return; + } + +@@ -879,7 +893,7 @@ + sctFilterParams.filter.mask[0]=0xff; + + if (ioctl(fd_pat,DMX_SET_FILTER,&sctFilterParams) < 0) { +- perror("PAT - DMX_SET_FILTER:"); ++ perror(_("PAT - DMX_SET_FILTER:")); + close(fd_pat); + return; + } +@@ -887,7 +901,7 @@ + ufd.fd=fd_pat; + ufd.events=POLLPRI; + if (poll(&ufd,1,10000) < 0) { +- fprintf(stderr,"TIMEOUT reading from fd_pat\n"); ++ fprintf(stderr,_("TIMEOUT reading from fd_pat\n")); + close(fd_pat); + return; + } +@@ -916,7 +930,7 @@ + printf("Under-read bytes for PAT - wanted %d, got %d\n",seclen,n); + } + } else { +- fprintf(stderr,"Nothing to read from fd_pat\n"); ++ fprintf(stderr,_("Nothing to read from fd_pat\n")); + } + close(fd_pat); + } +@@ -932,7 +946,7 @@ + struct pollfd ufd; + + if((fd_sdt = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- perror("fd_sdt DEVICE: "); ++ perror(_("fd_sdt DEVICE: ")); + return; + } + +@@ -944,7 +958,7 @@ + sctFilterParams.filter.mask[0]=0xff; + + if (ioctl(fd_sdt,DMX_SET_FILTER,&sctFilterParams) < 0) { +- perror("SDT - DMX_SET_FILTER:"); ++ perror(_("SDT - DMX_SET_FILTER:")); + close(fd_sdt); + return; + } +@@ -956,7 +970,7 @@ + ufd.fd=fd_sdt; + ufd.events=POLLPRI; + if (poll(&ufd,1,2000) < 0 ) { +- fprintf(stderr,"TIMEOUT on read from fd_sdt\n"); ++ fprintf(stderr,_("TIMEOUT on read from fd_sdt\n")); + close(fd_sdt); + return; + } +@@ -999,7 +1013,7 @@ + printf("Under-read bytes for SDT - wanted %d, got %d\n",seclen,n); + } + } else { +- fprintf(stderr,"Nothing to read from fd_sdt\n"); ++ fprintf(stderr,_("Nothing to read from fd_sdt\n")); + } + } + // printf("\n"); +@@ -1012,7 +1026,7 @@ + int ans; + + if ( (ans = ioctl(fd,FE_READ_BER, ber) < 0)){ +- perror("FE READ_BER: "); ++ perror(_("FE READ_BER: ")); + return -1; + } + return 0; +@@ -1024,7 +1038,7 @@ + int ans; + + if ( (ans = ioctl(fd,FE_READ_SIGNAL_STRENGTH, strength) < 0)){ +- perror("FE READ SIGNAL STRENGTH: "); ++ perror(_("FE READ SIGNAL STRENGTH: ")); + return -1; + } + return 0; +@@ -1035,7 +1049,7 @@ + int ans; + + if ( (ans = ioctl(fd,FE_READ_SNR, snr) < 0)){ +- perror("FE READ_SNR: "); ++ perror(_("FE READ_SNR: ")); + return -1; + } + return 0; +@@ -1047,7 +1061,7 @@ + int ans; + + if ( (ans = ioctl(fd,FE_READ_AFC, snr) < 0)){ +- perror("FE READ_AFC: "); ++ perror(_("FE READ_AFC: ")); + return -1; + } + return 0; +@@ -1060,12 +1074,72 @@ + int ans; + + if ( (ans = ioctl(fd,FE_READ_UNCORRECTED_BLOCKS, ucb) < 0)){ +- perror("FE READ UNCORRECTED BLOCKS: "); ++ perror(_("FE READ UNCORRECTED BLOCKS: ")); + return -1; + } + return 0; + } + ++void usage (int was_error) ++{ ++ FILE *fp = was_error ? stderr : stdout ; ++ fprintf(fp,_("Usage: dvbtune [OPTIONS]\n\n")); ++ fprintf(fp,_("Standard options:\n\n")); ++ fprintf(fp,_("-f freq absolute Frequency (DVB-S in Hz or DVB-T in Hz)\n")); ++ fprintf(fp,_(" or L-band Frequency (DVB-S in Hz or DVB-T in Hz)\n")); ++ fprintf(fp,_("-p [H,V] Polarity (DVB-S only)\n")); ++ fprintf(fp,_("-s N Symbol rate (DVB-S or DVB-C)\n")); ++ fprintf(fp,_("-v vpid Decode video PID (full cards only)\n")); ++ fprintf(fp,_("-a apid Decode audio PID (full cards only)\n")); ++ fprintf(fp,_("-t ttpid Decode teletext PID (full cards only)\n")); ++ fprintf(fp,_("-pnr N Tune to Program Number (aka service) N\n\n")); ++ fprintf(fp,_("-i Dump SI information as XML\n")); ++ ++ fprintf(fp,_("\nAdvanced tuning options:\n\n")); ++ fprintf(fp,_("-c [0-3] Use DVB card #[0-3]\n")); ++ fprintf(fp,_("-tone [0|1] 0=22kHz off, 1=22kHz on\n")); ++ fprintf(fp,_("-I [0|1|2] 0=Spectrum Inversion off, 1=Spectrum Inversion on, 2=auto\n")); ++ fprintf(fp,_("-D [0-4] DiSEqC command (0=none)\n\n")); ++ fprintf(fp,_("-qam X DVB-T modulation - 16%s, 32%s, 64%s, 128%s or 256%s\n"), ++ (CONSTELLATION_DEFAULT==QAM_16 ? _(" (default)") : ""), ++ (CONSTELLATION_DEFAULT==QAM_32 ? _(" (default)") : ""), ++ (CONSTELLATION_DEFAULT==QAM_64 ? _(" (default)") : ""), ++ (CONSTELLATION_DEFAULT==QAM_128 ? _(" (default)") : ""), ++ (CONSTELLATION_DEFAULT==QAM_256 ? _(" (default)") : "")); ++ fprintf(fp,_("-gi N DVB-T guard interval 1_N (N=32%s, 16%s, 8%s or 4%s)\n"), ++ (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_32 ? _(" (default)") : ""), ++ (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_16 ? _(" (default)") : ""), ++ (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_8 ? _(" (default)") : ""), ++ (GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_4 ? _(" (default)") : "")); ++ fprintf(fp,_("-cr N DVB-T code rate. N=AUTO%s, 1_2%s, 2_3%s, 3_4%s, 5_6%s, 7_8%s\n"), ++ (HP_CODERATE_DEFAULT==FEC_AUTO ? _(" (default)") : ""), ++ (HP_CODERATE_DEFAULT==FEC_1_2 ? _(" (default)") : ""), ++ (HP_CODERATE_DEFAULT==FEC_2_3 ? _(" (default)") : ""), ++ (HP_CODERATE_DEFAULT==FEC_3_4 ? _(" (default)") : ""), ++ (HP_CODERATE_DEFAULT==FEC_5_6 ? _(" (default)") : ""), ++ (HP_CODERATE_DEFAULT==FEC_7_8 ? _(" (default)") : "")); ++ fprintf(fp,_("-bw N DVB-T bandwidth (Mhz) - N=6%s, 7%s or 8%s\n"), ++ (BANDWIDTH_DEFAULT==BANDWIDTH_6_MHZ ? _(" (default)") : ""), ++ (BANDWIDTH_DEFAULT==BANDWIDTH_7_MHZ ? _(" (default)") : ""), ++ (BANDWIDTH_DEFAULT==BANDWIDTH_8_MHZ ? _(" (default)") : "")); ++ fprintf(fp,_("-tm N DVB-T transmission mode - N=2%s or 8%s\n"), ++ (TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_2K ? _(" (default)") : ""), ++ (TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_8K ? _(" (default)") : "")); ++ ++ fprintf(fp,_("-x Attempt to auto-find other transponders (experimental - DVB-S only)\n")); ++ fprintf(fp,_("-m Monitor the reception quality\n")); ++ fprintf(fp,_("-n dpid Add network interface and receive MPE on PID dpid\n")); ++ fprintf(fp,"\n"); ++ ++ exit (was_error); ++} ++ ++void version (void) ++{ ++ printf (_("dvbtune %s\n"), VERSION); ++ exit (0); ++} ++ + int main(int argc, char **argv) + { + int fd_frontend=0; +@@ -1093,34 +1167,7 @@ + int i; + + if (argc==1) { +- fprintf(stderr,"Usage: dvbtune [OPTIONS]\n\n"); +- fprintf(stderr,"Standard options:\n\n"); +- fprintf(stderr,"-f freq absolute Frequency (DVB-S in Hz or DVB-T in Hz)\n"); +- fprintf(stderr," or L-band Frequency (DVB-S in Hz or DVB-T in Hz)\n"); +- fprintf(stderr,"-p [H,V] Polarity (DVB-S only)\n"); +- fprintf(stderr,"-s N Symbol rate (DVB-S or DVB-C)\n"); +- fprintf(stderr,"-v vpid Decode video PID (full cards only)\n"); +- fprintf(stderr,"-a apid Decode audio PID (full cards only)\n"); +- fprintf(stderr,"-t ttpid Decode teletext PID (full cards only)\n"); +- fprintf(stderr,"-pnr N Tune to Program Number (aka service) N\n\n"); +- fprintf(stderr,"-i Dump SI information as XML\n"); +- +- fprintf(stderr,"\nAdvanced tuning options:\n\n"); +- fprintf(stderr,"-c [0-3] Use DVB card #[0-3]\n"); +- fprintf(stderr,"-tone [0|1] 0=22kHz off, 1=22kHz on\n"); +- fprintf(stderr,"-I [0|1|2] 0=Spectrum Inversion off, 1=Spectrum Inversion on, 2=auto\n"); +- fprintf(stderr,"-D [0-4] DiSEqC command (0=none)\n\n"); +- fprintf(stderr,"-qam X DVB-T modulation - 16%s, 32%s, 64%s, 128%s or 256%s\n",(CONSTELLATION_DEFAULT==QAM_16 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_32 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_64 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_128 ? " (default)" : ""),(CONSTELLATION_DEFAULT==QAM_256 ? " (default)" : "")); +- fprintf(stderr,"-gi N DVB-T guard interval 1_N (N=32%s, 16%s, 8%s or 4%s)\n",(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_32 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_16 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_8 ? " (default)" : ""),(GUARD_INTERVAL_DEFAULT==GUARD_INTERVAL_1_4 ? " (default)" : "")); +- fprintf(stderr,"-cr N DVB-T code rate. N=AUTO%s, 1_2%s, 2_3%s, 3_4%s, 5_6%s, 7_8%s\n",(HP_CODERATE_DEFAULT==FEC_AUTO ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_1_2 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_2_3 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_3_4 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_5_6 ? " (default)" : ""),(HP_CODERATE_DEFAULT==FEC_7_8 ? " (default)" : "")); +- fprintf(stderr,"-bw N DVB-T bandwidth (Mhz) - N=6%s, 7%s or 8%s\n",(BANDWIDTH_DEFAULT==BANDWIDTH_6_MHZ ? " (default)" : ""),(BANDWIDTH_DEFAULT==BANDWIDTH_7_MHZ ? " (default)" : ""),(BANDWIDTH_DEFAULT==BANDWIDTH_8_MHZ ? " (default)" : "")); +- fprintf(stderr,"-tm N DVB-T transmission mode - N=2%s or 8%s\n",(TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_2K ? " (default)" : ""),(TRANSMISSION_MODE_DEFAULT==TRANSMISSION_MODE_8K ? " (default)" : "")); +- +- fprintf(stderr,"-x Attempt to auto-find other transponders (experimental - DVB-S only)\n"); +- fprintf(stderr,"-m Monitor the reception quality\n"); +- fprintf(stderr,"-n dpid Add network interface and receive MPE on PID dpid\n"); +- fprintf(stderr,"\n"); +- return(-1); ++ usage(1); /* and exit */ + } else { + count=0; + for (i=1;i 3)) { +- fprintf(stderr,"card must be between 0 and 3\n"); ++ fprintf(stderr,_("card must be between 0 and 3\n")); + exit(-1); + } + } else if (strcmp(argv[i],"-x")==0) { // +@@ -1181,7 +1228,7 @@ + case 128: modulation=QAM_128; break; + case 256: modulation=QAM_256; break; + default: +- fprintf(stderr,"Invalid QAM rate: %s\n",argv[i]); ++ fprintf(stderr,_("Invalid QAM rate: %s\n"),argv[i]); + exit(0); + } + } else if (strcmp(argv[i],"-gi")==0) { +@@ -1192,8 +1239,8 @@ + case 8: guardInterval=GUARD_INTERVAL_1_8; break; + case 4: guardInterval=GUARD_INTERVAL_1_4; break; + default: +- fprintf(stderr,"Invalid Guard Interval: %s\n",argv[i]); +- exit(0); ++ fprintf(stderr,_("Invalid Guard Interval: %s\n"),argv[i]); ++ exit(1); + } + } else if (strcmp(argv[i],"-tm")==0) { + i++; +@@ -1201,8 +1248,8 @@ + case 8: TransmissionMode=TRANSMISSION_MODE_8K; break; + case 2: TransmissionMode=TRANSMISSION_MODE_2K; break; + default: +- fprintf(stderr,"Invalid Transmission Mode: %s\n",argv[i]); +- exit(0); ++ fprintf(stderr,_("Invalid Transmission Mode: %s\n"),argv[i]); ++ exit(1); + } + } else if (strcmp(argv[i],"-bw")==0) { + i++; +@@ -1211,8 +1258,8 @@ + case 7: bandWidth=BANDWIDTH_7_MHZ; break; + case 6: bandWidth=BANDWIDTH_6_MHZ; break; + default: +- fprintf(stderr,"Invalid DVB-T bandwidth: %s\n",argv[i]); +- exit(0); ++ fprintf(stderr,_("Invalid DVB-T bandwidth: %s\n"),argv[i]); ++ exit(1); + } + } else if (strcmp(argv[i],"-cr")==0) { + i++; +@@ -1229,14 +1276,14 @@ + } else if (!strcmp(argv[i],"7_8")) { + HP_CodeRate=FEC_7_8; + } else { +- fprintf(stderr,"Invalid Code Rate: %s\n",argv[i]); +- exit(0); ++ fprintf(stderr,_("Invalid Code Rate: %s\n"),argv[i]); ++ exit(1); + } + } else if (strcmp(argv[i],"-D")==0) { + i++; + diseqc=atoi(argv[i]); + if (diseqc > 4) { +- fprintf(stderr,"DiSEqC must be between 0 and 4\n"); ++ fprintf(stderr,_("DiSEqC must be between 0 and 4\n")); + exit(-1); + } + } else if (strcmp(argv[i],"-tone")==0) { +@@ -1253,6 +1300,11 @@ + specInv = INVERSION_ON; + else + specInv = INVERSION_AUTO; ++ } else if ((strcmp(argv[i],"--help") == 0) || ++ (strcmp(argv[i],"-h") == 0)) { ++ usage (0); ++ } else if (strcmp(argv[i],"--version") == 0) { ++ version (); + } + } + } +@@ -1265,14 +1317,14 @@ + #endif + + if((fd_dvr = open(dvrdev[card],O_RDONLY|O_NONBLOCK)) < 0){ +- fprintf(stderr,"FD %d: ",i); +- perror("fd_dvr DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %d: "),i); ++ perror(_("fd_dvr DEMUX DEVICE: ")); + return -1; + } + + if((fd_frontend = open(frontenddev[card],O_RDWR)) < 0){ +- fprintf(stderr,"frontend: %d",i); +- perror("FRONTEND DEVICE: "); ++ fprintf(stderr,_("frontend: %d"),i); ++ perror(_("FRONTEND DEVICE: ")); + return -1; + } + +@@ -1280,45 +1332,45 @@ + /* Only open sec for DVB-S tuning */ + if (freq<100000000) { + if((fd_sec = open(secdev[card],O_RDWR)) < 0) { +- fprintf(stderr,"FD %i: ",i); +- perror("SEC DEVICE (warning) "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("SEC DEVICE (warning) ")); + } + } + #endif + + if((fd_demuxrec = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + + if((fd_demuxv = open(demuxdev[card],O_RDWR)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + + if((fd_demuxa = open(demuxdev[card],O_RDWR)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + + if((fd_demuxtt = open(demuxdev[card],O_RDWR)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + + if((fd_demuxd = open(demuxdev[card],O_RDWR)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + + if((fd_demuxsi = open(demuxdev[card],O_RDWR|O_NONBLOCK)) < 0){ +- fprintf(stderr,"FD %i: ",i); +- perror("DEMUX DEVICE: "); ++ fprintf(stderr,_("FD %i: "),i); ++ perror(_("DEMUX DEVICE: ")); + return -1; + } + +@@ -1339,7 +1391,7 @@ + scan_nit(0x41); /* Get initial list of transponders */ + while ((t=get_unscanned(transponders))!=NULL) { + free_pat_list(); +- fprintf(stderr,"Scanning %d%c %d\n",t->freq,t->pol,t->srate); ++ fprintf(stderr,_("Scanning %d%c %d\n"),t->freq,t->pol,t->srate); + tune_it(fd_frontend,fd_sec,t->freq,t->srate,t->pol,tone,specInv,0,modulation,HP_CodeRate,TransmissionMode,guardInterval,bandWidth); + printf("\n",t->id,t->onid,t->freq,t->srate,t->pos,t->we_flag,t->pol,t->mod); + t->scanned=1; +@@ -1373,7 +1425,7 @@ + set_vpid(vpid); + set_apid(apid); + set_ttpid(ttpid); +- fprintf(stderr,"A/V/TT Filters set\n"); ++ fprintf(stderr,_("A/V/TT Filters set\n")); + } + + if (dpid > 0) { +@@ -1392,7 +1444,7 @@ + #endif + //printf("Trying to open %s\n",devnamen); + if((fdn = open(devnamen,O_RDWR|O_NONBLOCK)) < 0) { +- fprintf(stderr, "Failed to open DVB NET DEVICE"); ++ fprintf(stderr, _("Failed to open DVB NET DEVICE")); + close(fd_frontend); + if (fd_sec) close(fd_sec); + } else { +@@ -1400,7 +1452,7 @@ + ioctl( fdn,NET_ADD_IF,&netif); + + close (fdn); +- printf("Successfully opened network device, please configure the dvb interface\n"); ++ printf(_("Successfully opened network device, please configure the dvb interface\n")); + } + } + +@@ -1409,8 +1461,8 @@ + fe_status_t festatus; + + if((fd_frontend = open(frontenddev[card],O_RDONLY)) < 0){ +- fprintf(stderr,"frontend: %d",i); +- perror("FRONTEND DEVICE: "); ++ fprintf(stderr,_("frontend: %d"),i); ++ perror(_("FRONTEND DEVICE: ")); + return -1; + } + +@@ -1422,7 +1474,7 @@ + FEReadSNR(fd_frontend, &snr); + FEReadUncorrectedBlocks(fd_frontend, &uncorr); + ioctl(fd_frontend,FE_READ_STATUS,&festatus); +- fprintf(stderr,"Signal=%d, Verror=%d, SNR=%ddB, BlockErrors=%d, (", strength, ber, snr, uncorr); ++ fprintf(stderr,_("Signal=%d, Verror=%d, SNR=%ddB, BlockErrors=%d, ("), strength, ber, snr, uncorr); + #ifndef NEWSTRUCT + if (festatus & FE_HAS_POWER) fprintf(stderr,"P|"); + if (festatus & FE_SPECTRUM_INV) fprintf(stderr,"I|"); +diff -ruN dvbtune-0.5-old/Makefile dvbtune-0.5/Makefile +--- dvbtune-0.5-old/Makefile 2002-10-12 12:59:31.000000000 +0100 ++++ dvbtune-0.5/Makefile 2004-02-15 08:37:04.000000000 +0000 +@@ -1,5 +1,5 @@ + INCS=-I /usr/include/libxml2 +-CFLAGS= -Wall $(INCS) ++CFLAGS= -Wall $(INCS) -DVERSION=\"$(VERSION)\" + CC=gcc + all: dvbtune + +@@ -37,3 +37,8 @@ + + clean: + rm -f *.o *~ dvbtune xml2vdr ++ ++install: xml2vdr dvbtune ++ mkdir -p $(DESTDIR)/usr/bin ++ cp dvbtune $(DESTDIR)/usr/bin/dvbtune ++ cp xml2vdr $(DESTDIR)/usr/bin/xml2vdr +diff -ruN dvbtune-0.5-old/xml2vdr.c dvbtune-0.5/xml2vdr.c +--- dvbtune-0.5-old/xml2vdr.c 2003-10-09 19:09:08.000000000 +0100 ++++ dvbtune-0.5/xml2vdr.c 2004-02-15 08:37:04.000000000 +0000 +@@ -27,6 +27,18 @@ + #include + #include + ++#ifdef I18N ++#include ++#include ++#define _(X) gettext(X) ++#else /* Null Ops */ ++#define LC_ALL 1 ++#define textdomain(X) do {} while (0) ++#define _(X) (X) ++#define setlocale(X,Y) do {} while (0) ++#endif ++ ++ + /* This structure isn't used - it could be used to check the validity of the + file. */ + typedef enum { +@@ -326,23 +338,49 @@ + 0 /* fatalError */ + }; + ++void usage (int was_error) ++{ ++ FILE *f = was_error ? stderr : stdout; ++ ++ fprintf (f, _("Usage: xml2vdr [-fta] filename.xmlsat \n")); ++ exit (was_error); ++} ++ ++void version (void) ++{ ++ printf (_("xml2vdr (dvbstream) %s\n"), VERSION); ++ exit (0); ++} ++ + int main(int argc, char **argv) { + xmlParserCtxtPtr ctxt; + xmlsatParseState state; + +- if (argc<2) { +- printf("Usage: %s [-fta] filename.xmlsat\n",argv[0]); ++ setlocale (LC_ALL, NULL); ++ textdomain ("dvbstream"); ++ ++ if ((argc<2) || (argc>3)) { ++ usage(1); /* and exit */ ++ printf(_("Usage: %s [-fta] filename.xmlsat\n"),argv[0]); + } else { + if (argc==2) { ++ if (strcmp(argv[1],"--version")==0) { ++ version(); /* and exit */ ++ } ++ if (strcmp(argv[1],"--help")==0) { ++ usage(0); /* and exit */ ++ } + ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[1]); + } else if (argc==3) { + if (strcmp(argv[1],"-fta")==0) { + fta=1; +- } ++ } else ++ usage(1); + ctxt = (xmlParserCtxtPtr)xmlCreateFileParserCtxt(argv[2]); + } + if (ctxt == NULL) { +- fprintf(stderr,"ERROR: can not open file\n"); ++ fprintf(stderr,_("ERROR: can not open file %s\n"), argv[2]); ++ exit(2); + } + + ctxt->sax = &xmlsatSAXParser; --- dvbtune-0.5.orig/debian/xml2vdr.sgml +++ dvbtune-0.5/debian/xml2vdr.sgml @@ -0,0 +1,157 @@ + manpage.1'. You may view + the manual page with: `docbook-to-man manpage.sgml | nroff -man | + less'. A typical entry in a Makefile or Makefile.am is: + +manpage.1: manpage.sgml + docbook-to-man $< > $@ + + + The docbook-to-man binary is found in the docbook-to-man package. + Please remember that if you create the nroff version in one of the + debian/rules file targets (such as build), you will need to include + docbook-to-man in your Build-Depends control field. + + --> + + + Alastair"> + McKinstry"> + + July 17, 2002"> + + 1"> + mckinstry@computer.org"> + + XML2VDR"> + + + Debian"> + GNU"> +]> + + + +
+ &dhemail; +
+ + &dhfirstname; + &dhsurname; + + + 2002 + &dhusername; + + &dhdate; +
+ + &dhucpackage; + + &dhsection; + + + &dhpackage; + + Convert XML DVB-SI files to a VDR channel list + + + + &dhpackage; filename.xmlstat + + + + + DESCRIPTION + + + &dhpackage; is a simple utility to convert XML DVB-SI files + into a channel list for VDR. + + + You can get DVB-SI output for a satellite by using dvbtune: + + dvbtune -i + + will generate the appropriate XML output to standard output. + + + + + + + + + + OPTIONS + + + The following options are understood by xml2vdr: + + + + + + --help + + Print help message + + + + + --version + + Print version string + + + + + + + SEE ALSO + + dvbtune(1), vdr(1), szap(1). + + + + AUTHOR + + + &dhpackage; was written by Dave Chapman + dave@dchapman.org. + + + + + This manual page was written by &dhusername; &dhemail; for + the &debian; system (but may be used by others). Permission is + granted to copy, distribute and/or modify this document under + the terms of the GNU Free Documentation + License, Version 1.1 or any later version published by the Free + Software Foundation; with no Invariant Sections, no Front-Cover + Texts and no Back-Cover Texts. + + +
+ + + + --- dvbtune-0.5.orig/debian/ChangeLog.upstream +++ dvbtune-0.5/debian/ChangeLog.upstream @@ -0,0 +1,21 @@ +2002-03-17 Dave Chapman + + * Release 0.3 + This version of dvbtune fixes the DVB-T support which was broken in version 0.2, + plus also includes other fixes and Diseqc support. + +2002-01-25 Dave Chapman + + * Release 0.2 + This version of dvbtune was contributed by Hilmar Linder and includes support + for setting up IP over dvb. + +2001-11-24 Dave Chapman + + * Release 0.1 + dvbtune supports dvb-S and dvb-T cards and allows command-line tuning. + A major feature is the ability to dump the DVB Service Information to an XML file. + A utility is included to convert these XML files into VDR's channels.conf format. + + +