Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] linuxtv-dvb-apps patch queue



Here's the latest diff over cvs, I did just complete a new rpm package
based on a cvs snapshot:

Patch1: %name-no-ttusb.patch                     <-- not sent attached
Patch2: %name-installtest.patch
Patch3: %name-scanmaketypo.patch
Patch4: %name-showconfigs.patch
Patch5: %name-make-defs.patch
Patch6: %name-install-dvbnet-scripts.patch


I'll now look into the oops (rebooting a few times),
cheers,
-- guido                                  http://google.de/search?q=guidod
GCS/E/S/P C++/++++$ ULHS L++w- N++@ s+:a d(+-) r+@>+++ y++ 5++X- (geekcode)
Index: test/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/test/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- test/Makefile	14 Feb 2004 22:04:51 -0000	1.3
+++ test/Makefile	15 Feb 2004 07:08:02 -0000
@@ -38,3 +38,8 @@
 
 install:
 
+install-test:
+	test "$(libdir)/" != "/"
+	mkdir -p $(DESTDIR)$(libdir)/dvb/test
+	cp $(TARGETS) $(DESTDIR)$(libdir)/dvb/test/
+
--- util/scan/Makefile.orig	2004-02-15 18:06:03.000000000 +0100
+++ util/scan/Makefile	2004-02-15 18:06:13.000000000 +0100
@@ -25,7 +25,7 @@
 install-bin:
 	test "$(bindir)/" != "/"
 	mkdir -p $(DESTDIR)$(bindir)/
-	for i in $(TARGETS) ; do cp $$i $(DESTDIR)$(bindir)/ ; done
+	for i in $(TARGET) ; do cp $$i $(DESTDIR)$(bindir)/ ; done
 install-data:
 	test "$(datadir)/" != "/"
 	mkdir -p $(DESTDIR)$(datadir)/dvb
Index: util/scan/scan.c
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/scan/scan.c,v
retrieving revision 1.7
diff -u -r1.7 scan.c
--- util/scan/scan.c	15 Feb 2004 00:46:10 -0000	1.7
+++ util/scan/scan.c	15 Feb 2004 07:39:40 -0000
@@ -22,6 +22,7 @@
 #include <errno.h>
 #include <signal.h>
 #include <assert.h>
+#include <glob.h>
 
 #include <linux/dvb/frontend.h>
 #include <linux/dvb/dmx.h>
@@ -1714,6 +1715,29 @@
 	info("Done.\n");
 }
 
+static void show_existing_tuning_data_files(void)
+{
+#ifndef DATADIR
+#define DATADIR "/usr/local/share"
+#endif
+	static const char* prefixlist[] = { DATADIR "/dvb", "/etc/dvb", 
+					    DATADIR "/doc/packages/dvb", 0 };
+	int i;
+	const char **prefix;
+	fprintf(stderr, "initial tuning data files:\n");
+	for (prefix = prefixlist; *prefix; prefix++) {
+		glob_t globbuf = {0};
+		char* globspec = malloc (strlen(*prefix)+9);
+		strcpy (globspec, *prefix); strcat (globspec, "/dvb-?/*");
+		if (! glob (globspec, 0, 0, &globbuf)) {
+			for (i=0; i < globbuf.gl_pathc; i++) 
+				fprintf(stderr, " file: %s\n", globbuf.gl_pathv[i]);
+		}
+		free (globspec);
+		globfree (&globbuf);
+	}
+}
+
 static void handle_sigint(int sig)
 {
 	error("interrupted by SIGINT, dumping partial result...\n");
@@ -1750,17 +1774,21 @@
 	"	-u      UK DVB-T Freeview channel numbering for VDR\n";
 
 void
-bad_usage(char *pname, int prlnb)
+bad_usage(char *pname, int problem)
 {
-int i;
-struct lnb_types_st *lnbp;
-char **cp;
+	int i;
+	struct lnb_types_st *lnbp;
+	char **cp;
 
-	if (!prlnb) {
+	switch (problem) {
+	default:
+	case 0:
 		fprintf (stderr, usage, pname);
-	} else {
+		break;
+	case 1:
 		i = 0;
-		fprintf(stderr, "-l <lnb-type> or -l low[,high[,switch]] in Mhz\nwhere <lnb-type> is:\n");
+		fprintf(stderr, "-l <lnb-type> or -l low[,high[,switch]] in Mhz\n"
+			"where <lnb-type> is:\n");
 		while(NULL != (lnbp = lnb_enum(i))) {
 			fprintf (stderr, "%s\n", lnbp->name);
 			for (cp = lnbp->desc; *cp ; cp++) {
@@ -1768,6 +1796,10 @@
 			}
 			i++;
 		}
+		break;
+	case 2:
+		show_existing_tuning_data_files();
+		fprintf (stderr, usage, pname);
 	}
 }
 
@@ -1780,6 +1812,11 @@
 	int fe_open_mode;
 	const char *initial = NULL;
 
+	if (argc <= 1) {
+	    bad_usage(argv[0], 2);
+	    return -1;
+	}
+
 	/* start with default lnb type */
 	lnb_type = *lnb_enum(0);
 	while ((opt = getopt(argc, argv, "5cnpa:f:d:s:o:x:e:t:i:l:vqu")) != -1) {
Index: test/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/test/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- test/Makefile	14 Feb 2004 22:04:51 -0000	1.3
+++ test/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,8 +1,8 @@
 # Makefile for Linux DVB API Version 3 test programs
 
 CC = gcc
-CFLAGS = -g -O2 -W -Wall
-CPPFLAGS = -I../include
+CFLAGS = -g -O2 -W -Wall $(ARCH)
+CPPFLAGS = -I../include $(DEFS)
 
 TARGETS = \
 	diseqc		\
Index: util/av7110_loadkeys/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/av7110_loadkeys/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/av7110_loadkeys/Makefile	15 Feb 2004 00:31:08 -0000	1.3
+++ util/av7110_loadkeys/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,5 +1,7 @@
 CC = gcc
-CFLAGS = -g -Wall -O2
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = $(DEFS)
+DEFS = '-DDATADIR="$(datadir)"'
 bindir  = /usr/local/bin
 datadir = /usr/local/share
 
Index: util/dvbdate/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbdate/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/dvbdate/Makefile	14 Feb 2004 22:04:52 -0000	1.3
+++ util/dvbdate/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,7 +1,7 @@
 
 CC      = gcc
-CFLAGS  = -g -O2 -Wall
-CPPFLAGS= -MD -I../../include
+CFLAGS  = -g -O2 -Wall $(ARCH)
+CPPFLAGS= -MD -I../../include $(DEFS)
 LFLAGS  =
 
 OBJS    = dvbdate.o
Index: util/dvbnet/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbnet/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/dvbnet/Makefile	14 Feb 2004 22:04:52 -0000	1.3
+++ util/dvbnet/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,8 +1,9 @@
 
 CC      = gcc
-CFLAGS  = -g -O2 -Wall
-CPPFLAGS= -MD -I. -I../../include
+CFLAGS  = -g -O2 -Wall $(ARCH)
+CPPFLAGS= -MD -I. -I../../include $(DEFS)
 LFLAGS  =
+DEFS = '-DSYSCONFDIR="$(sysconfdir)"'
 bindir = /usr/local/bin
 sysconfdir = /usr/local/etc
 
Index: util/dvbtraffic/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbtraffic/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- util/dvbtraffic/Makefile	14 Feb 2004 22:04:52 -0000	1.4
+++ util/dvbtraffic/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,5 +1,5 @@
-CFLAGS   = -g -O2 -Wall
-CPPFLAGS = -MD -I../../include
+CFLAGS   = -g -O2 -Wall $(ARCH)
+CPPFLAGS = -MD -I../../include $(DEFS)
 bindir = /usr/local/bin
 
 dvbtraffic: dvbtraffic.c
Index: util/lib/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/lib/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/lib/Makefile	14 Feb 2004 22:04:52 -0000	1.3
+++ util/lib/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,7 +1,7 @@
 
 CC = gcc
-CFLAGS = -g -Wall -O2
-CPPFLAGS = -MD -I../../include -I.
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I. $(DEFS)
 bindir = /usr/local/bin
 
 OBJS = lnb.o
Index: util/scan/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/scan/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- util/scan/Makefile	15 Feb 2004 00:31:08 -0000	1.5
+++ util/scan/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,8 +1,9 @@
 
 CC = gcc
-CFLAGS = -g -Wall -O2
-CPPFLAGS = -MD -I../../include -I../lib
+CFLAGS = -g -Wall -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I../lib $(DEFS)
 LFLAGS = -g -Wall
+DEFS = '-DDATADIR="$(datadir)"'
 bindir = /usr/local/bin
 datadir = /usr/local/share
 
Index: util/szap/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/szap/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- util/szap/Makefile	15 Feb 2004 00:31:08 -0000	1.4
+++ util/szap/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,8 +1,9 @@
 CC = gcc
-CFLAGS = -Wall -g -O2
-CPPFLAGS = -MD -I../../include -I../lib
+CFLAGS = -Wall -g -O2 $(ARCH)
+CPPFLAGS = -MD -I../../include -I../lib $(DEFS)
 LFLAGS = -Wall -g -O2
 RM = rm -f
+DEFS = '-DDATADIR="$(datadir)"'
 bindir = /usr/local/bin
 datadir = /usr/local/share
 
Index: util/ttusb_dec_reset/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/ttusb_dec_reset/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- util/ttusb_dec_reset/Makefile	14 Feb 2004 22:04:52 -0000	1.2
+++ util/ttusb_dec_reset/Makefile	15 Feb 2004 16:46:10 -0000
@@ -1,6 +1,7 @@
 CC	= gcc
 RM	= rm -f
-CFLAGS	= -g -Wall -O2
+CFLAGS	= -g -Wall -O2 $(ARCH)
+CPPFLAGS = $(DEFS)
 LFLAGS	= -g -Wall
 LDFLAGS = -lusb
 bindir  = /usr/local/bin
Index: util/dvbnet/Makefile
===================================================================
RCS file: /cvs/linuxtv/dvb-apps/util/dvbnet/Makefile,v
retrieving revision 1.3
diff -u -r1.3 Makefile
--- util/dvbnet/Makefile	14 Feb 2004 22:04:52 -0000	1.3
+++ util/dvbnet/Makefile	15 Feb 2004 17:43:04 -0000
@@ -4,7 +4,7 @@
 CPPFLAGS= -MD -I. -I../../include
 LFLAGS  =
 bindir = /usr/local/bin
-sysconfdir = /usr/local/etc
+libdir = /usr/local/etc
 
 OBJS    = dvbnet.o
 TARGET  = dvbnet
@@ -21,18 +21,18 @@
 	printf '#define VERSION_INFO "%s (Build %s)"\n' \
 		"`cat $@.in`" "`date +'%a %b %d %X %Y'`" > $@
 
-install: install-bin
+install: install-bin install-scripts
 install-bin: all
 	test "$(bindir)/" != "/"
 	mkdir -p $(DESTDIR)$(bindir)/
 	install -m 755 $(TARGET) $(DESTDIR)$(bindir)/
 NETSTART_SCRIPTS = net_start.pl net_start.sh
-install-etc: 
-	test "$(sysconfdir)/" != "/"
-	mkdir -p $(DESTDIR)$(sysconfdir)/dvb/
+install-scripts: 
+	test "$(libdir)/" != "/"
+	mkdir -p $(DESTDIR)$(libdir)/dvb/
 	for i in $(NETSTART_SCRIPTS) ; do cat $$i | sed -e \
-	's|[.]/dvbnet |$(bindir)/dvbnet|' > $(DESTDIR)/$(sysconfdir)/dvb/$$i \
-	; chmod +x $(DESTDIR)/$(sysconfdir)/dvb/$$i ; done
+	's|[.]/dvbnet |$(bindir)/dvbnet|' > $(DESTDIR)/$(libdir)/dvb/$$i \
+	; chmod +x $(DESTDIR)/$(libdir)/dvb/$$i ; done
 
 clean:
 	rm -f $(TARGET) $(OBJS) version.h core* *~ *.d

Home | Main Index | Thread Index