--- cccd-0.3beta4.orig/cddbp.c
+++ cccd-0.3beta4/cddbp.c
@@ -54,11 +54,9 @@
 
   /* Greetings! */
 #ifdef DEBUG
-  printf("=> cddb hello %s %s %s %s\n",
-	 getenv("USER"), getenv("HOSTNAME"), clientname, version);
+  printf("=> cddb hello unknown localhost %s %s\n", clientname, version);
 #endif
-  fprintf(socket, "cddb hello %s %s %s %s\n",
-	  getenv("USER"), getenv("HOSTNAME"), clientname, version);
+  fprintf(socket, "cddb hello unknown localhost %s %s\n", clientname, version);
 
   buffer = get_string_piece(socket, '\n');
 #ifdef DEBUG
@@ -74,7 +72,7 @@
 
 
 int cddbp_query(FILE * socket, const char *disk_id, int tracknum,
-		long int offset[tracknum], int duration, int *matches,
+		long int offset[], int duration, int *matches,
 		char ***category_buffer, char ***title_buffer,
 		char ***id_buffer)
 {
@@ -169,7 +167,7 @@
 {
   char *buffer;
   int code;
-/* int i; /* debugging aid */
+/* int i; */ /* debugging aid */
 
 #ifdef DEBUG
   printf("=> cddb read %s %s\n", category, disk_id);
@@ -195,7 +193,7 @@
     buffer = get_string_piece(socket, '\n');
 #ifdef DEBUG
     printf("<= %s", buffer);
-/* for (i=0; buffer[i] != '\0'; i++) printf("%x ",buffer[i]); /* we want hex */
+/* for (i=0; buffer[i] != '\0'; i++) printf("%x ",buffer[i]); */ /* we want hex */
 #endif
     string_append(result_buffer, buffer);
     free(buffer);
@@ -249,7 +247,7 @@
 
 
 int http_query(const char *server, int port, const char *URL,
-	       const char *cd_id, int tracknum, long int offset[tracknum],
+	       const char *cd_id, int tracknum, long int offset[],
 	       int duration, int *matches,
 	       char ***category_buffer, char ***title_buffer,
 	       char ***id_buffer, const char *client, const char *version)
@@ -266,8 +264,8 @@
     strcpy(tmp, "");
   }
 
-  sprintf(tmp, "+%d&hello=%s+%s+%s+%s&proto=1 HTTP/1.0\r\n\r\n", duration,
-	  getenv("USER"), getenv("HOST"), client, version);
+  sprintf(tmp, "+%d&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n",
+          duration, client, version);
   strcat(buffer, tmp);
   free(tmp);
 
@@ -358,16 +356,11 @@
   FILE *sock;
 
 #ifdef DEBUG
-  printf("=> GET /%s?cmd=cddb+read+%s+%s&hello=%s+%s+%s+%s&proto=1 HTTP/1.0\r\n\r\n",
-	 URL, category, disk_id, getenv("USER"), getenv("HOST"), client,
-	 version);
+  printf("=> GET /%s?cmd=cddb+read+%s+%s&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n", URL, category, disk_id, client, version);
 #endif
 
   sock = socket_init(server, port);
-  fprintf(sock,
-   "GET /%s?cmd=cddb+read+%s+%s&hello=%s+%s+%s+%s&proto=1 HTTP/1.0\r\n\r\n",
-	  URL, category, disk_id, getenv("USER"), getenv("HOST"), client,
-	  version);
+  fprintf(sock, "GET /%s?cmd=cddb+read+%s+%s&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n", URL, category, disk_id, client, version);
 
   buffer = get_ascii_file(sock);
 #ifdef DEBUG
@@ -409,13 +402,11 @@
   FILE *sock;
 
 #ifdef DEBUG
-  printf("=> GET /%s?cmd=stat&hello=%s+%s+%s+%s&proto=1 HTTP/1.0\r\n\r\n",
-	 URL, getenv("USER"), getenv("HOST"), client, version);
+  printf("=> GET /%s?cmd=stat&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n", URL, client, version);
 #endif
 
   sock = socket_init(server, port);
-  fprintf(sock, "GET /%s?cmd=stat&hello=%s+%s+%s+%s&proto=1 HTTP/1.0\r\n\r\n",
-	  URL, getenv("USER"), getenv("HOST"), client, version);
+  fprintf(sock, "GET /%s?cmd=stat&hello=unknown+localhost+%s+%s&proto=1 HTTP/1.0\r\n\r\n", URL, client, version);
 
   buffer = get_ascii_file(sock);
 #ifdef DEBUG
--- cccd-0.3beta4.orig/cccd.c
+++ cccd-0.3beta4/cccd.c
@@ -102,7 +102,6 @@
   tooltipcolor.green = 59113;
   tooltipcolor.blue = 35979;
   gdk_color_alloc(colormap, &tooltipcolor);
-  gtk_tooltips_set_colors(tooltip, &tooltipcolor, &window->style->fg[GTK_STATE_NORMAL]);
 
   gtk_window_set_title(GTK_WINDOW(window), "cccd Panel");
   gtk_signal_connect(GTK_OBJECT(window), "destroy",
@@ -273,9 +272,8 @@
   /* area where all text appears */
   disp.drawing_area = gtk_drawing_area_new();
   gtk_drawing_area_size(GTK_DRAWING_AREA(disp.drawing_area), 120, 60);
-  gtk_widget_set_events(disp.drawing_area,
-			gtk_widget_get_events(disp.drawing_area) |
-			GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK);
+  gtk_widget_add_events(disp.drawing_area,
+			GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_STRUCTURE_MASK);
   gtk_signal_connect(GTK_OBJECT(disp.drawing_area), "expose_event",
 		     (GtkSignalFunc) expose_event, NULL);
   gtk_signal_connect(GTK_OBJECT(disp.drawing_area), "configure_event",
--- cccd-0.3beta4.orig/cddb.c
+++ cccd-0.3beta4/cddb.c
@@ -113,7 +113,7 @@
 
 
 enum errors remote_lookup(const char *cd_id, int tracknum,
-			  long int offset[tracknum], int duration,
+			  long int offset[], int duration,
 			  const char *server, short int port,
 			  enum lookup_protocol proto, char **result)
 {
--- cccd-0.3beta4.orig/info.c
+++ cccd-0.3beta4/info.c
@@ -841,7 +841,7 @@
   GtkWidget *window, *box, *clist, *button;
 
   alternate_selected = matches;
-  window = gtk_window_new(GTK_WINDOW_DIALOG);
+  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
   gtk_signal_connect(GTK_OBJECT(window), "destroy",
 		     GTK_SIGNAL_FUNC(alternate_quit), NULL);
   gtk_window_set_title(GTK_WINDOW(window), "Select Category");
--- cccd-0.3beta4.orig/Makefile
+++ cccd-0.3beta4/Makefile
@@ -7,24 +7,31 @@
 CC = gcc
 
 # you may need to change this
-MAILPROG = "/bin/mail -i"
+MAILPROG = "/usr/bin/mail -i"
 
 # If $(TARGET) spits out too many debug messages, remove -DDEBUG from 
 # next line
 
-CFLAGS = -g -Wall `gtk-config --cflags` -DDEBUG
-#LDFLAGS = -lefence `gtk-config --libs` 
-LDFLAGS = `gtk-config --libs` 
+
+
+CFLAGS = -O2 -Wall `pkg-config --cflags gtk+-2.0`
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -g -DDEBUG
+endif
+
+#LDFLAGS = -lefence `pkg-config --libs gtk+-2.0` 
+LDFLAGS = -L/usr/lib `pkg-config --libs gtk+-2.0` 
 
 # production flags (no debugging)
-#CFLAGS = -O2 -Wall `gtk-config --cflags`
-#LDFLAGS = -s `gtk-config --libs` 
+#CFLAGS = -O2 -Wall `pkg-config --cflags gtk+-2.0`
+#LDFLAGS = -s `pkg-config --libs gtk+-2.0` 
 
 prefix=/usr/local
 bindir=$(prefix)/bin
 mandir=$(prefix)/man/man1
 
-CFLAGS += -DMAILPROG="\"/bin/mail -i\""
+CFLAGS += -DMAILPROG="\"/usr/bin/mail -i\""
 
 .SUFFIXES: .c
 
@@ -37,9 +44,9 @@
 
 install: $(TARGET)
 	mkdir -p $(bindir)
-	install -c -s -m 0755 cccd $(bindir)
+	install -c -m 0755 cccd $(bindir)
 	mkdir -p $(mandir)
-	install -c -m 0755 cccd.1 $(mandir)
+	install -c -m 0644 cccd.1 $(mandir)
 	@echo "Please read the README for additional installation hints"
 
 static:	$(OBJECTS)
@@ -49,7 +56,7 @@
 clean:
 	rm -rf core *.o $(TARGET)
 
-# dependancies, gcc `gtk-config --cflags` -MM *.c
+# dependencies, gcc `gtk-config --cflags` -MM *.c
 cccd.o: cccd.c general.h misc.h cd.h options.h cddb.h info.h cccd.h \
  icons.h
 cd.o: cd.c cd.h
--- cccd-0.3beta4.orig/cccd.1
+++ cccd-0.3beta4/cccd.1
@@ -5,17 +5,18 @@
 .SH SYNOPSIS
 .B cccd
 .SH DESCRIPTION
-cccd is a small GTK CD player program with many features:
+cccd is a small GTK+ CD player program with many features:
+
   * Works with SCSI devices
   * CDDB lookups (local and remote) and local storing
   * Uses very little screen space
   * Handles CD Extras (mixed mode CDs)
-
 .SH OPTIONS
-none
+None.
 .SH USAGE
-Upon starting cccd two windows will pop up: a smaller control panel and a 
-status window.
+Upon starting
+.B cccd
+two windows will pop up: a smaller control panel and a status window.
 .SS The Control Panel
 .PP
 Here are the buttons for controlling the CD drive. The main action will take 
@@ -23,8 +24,8 @@
 .B cccd
 to quit. The right most button will cause the Info window (q.v.) to pop up.
 Buttons in the top row (left to right): Previous Track, Play, Next Track, and
-in the bottom row: Pause, Stop and Eject. Their functions should be self-
-explanitory.
+in the bottom row: Pause, Stop and Eject. Their functions should be
+self-explanatory.
 .SS The Status Window
 .PP
 You will see four rows of text here, and a progress bar below that. The top 
@@ -51,19 +52,43 @@
 Save the current CD data, submit it to a remote CDDB database, and Undo any
 changes you have made since the last saving.
 You can realize a playlist of the tracks you want to hear, by clicking on the
-track row. Darker tracks will not be played. (Note: Data tracks will by 
-\'unselected' automatically).
+track row. Darker tracks will not be played. (Note: Data tracks will
+be 'unselected' automatically).
 .SS CDDB
 .PP
 You can enter the relevant data for remote and local cddb databases here,
 and the lookup order.
 If the remote databases lookup protocol is http, you will need to enter the 
-URL in addidion to the hostname, without the leading "http://"
+URL in addition to the hostname, without the leading "http://"
 (e.g. "example.url.com/cddb/database/lookup.cgi".
 The category section is not used, and will be omitted in future versions.
 "Save" will save the info to "~/.cccdrc". I'll leave to your imagination what
 Undo does.
-
-.SH AUTHOR
+.SH FILES
+.TP
+.IP "~/.cccdrc"
+The
 .B cccd
-was originally written by Sven Riedel, modified by Jochen Stein.
+configfile.
+.SH BUGS
+Please report any bugs you find to Jochen A. Stein <jst@nitsfans.org>.
+You can use the form in
+.B "/usr/share/doc/cccd/BUGREPORT"
+for this...
+.SH LICENSE
+.B cccd
+is covered by the GNU General Public License (GPL) version 2 or
+(at your option) any later version.
+.SH AUTHORS
+.B cccd
+was originally written by Sven Riedel <Sven.Riedel@heim8.tu-clausthal.de>,
+modified by Jochen A. Stein <jst@nitsfans.org>.
+.PP
+This manpage was written by Jochen A. Stein <jst@nitsfans.org>.
+.SH "SEE ALSO"
+.BR cdcd (1),
+.BR cdtool (1),
+.BR dcd (1),
+.BR workbone (1),
+.BR workman (1),
+.BR xmcd (1).
--- cccd-0.3beta4.orig/debian/dirs
+++ cccd-0.3beta4/debian/dirs
@@ -0,0 +1 @@
+usr/bin
--- cccd-0.3beta4.orig/debian/copyright
+++ cccd-0.3beta4/debian/copyright
@@ -0,0 +1,29 @@
+This package was debianized by Uwe Hermann <uwe@debian.org> on
+Mon,  7 Jan 2002 12:15:08 +0100.
+
+There's no upstream homepage at the moment, I got the tarball from the
+upstream maintainer by email...
+
+Copyright:
+	Copyright (c) 1998 by Jochen Stein, jst@writeme.com
+	Copyright (c) 1998 by Sven Riedel, Sven.Riedel@heim8.tu-clausthal.de
+
+License:
+
+   This package 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 package 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 package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
--- cccd-0.3beta4.orig/debian/changelog
+++ cccd-0.3beta4/debian/changelog
@@ -0,0 +1,115 @@
+cccd (0.3beta4-6.2.4.201403160702) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Sun, 16 Mar 2014 07:02:18 +0100
+
+cccd (0.3beta4-6.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix event mask for window, thanks to Adam Majer (Closes: #589443)
+
+ -- Ben Hutchings <ben@decadent.org.uk>  Mon, 26 Jul 2010 02:30:34 +0100
+
+cccd (0.3beta4-6.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+    + With permission from maintainer.
+  * Build with Gtk2.
+    + Build-dep libgtk2.0-dev instead of libgtk1.2-dev.
+    + Thanks to Lars Friedrichs for the patch.
+  * Bump debhelper build-dep and compat to 5.
+  * Make clean not ignore errors.
+  * Fix copyright holders in debian/copyright.
+  * Bump Standards Version to 3.8.0.
+    + Menu policy transition.
+
+ -- Barry deFreese <bdefreese@debian.org>  Sun, 18 Jan 2009 12:43:00 -0500
+
+cccd (0.3beta4-6) unstable; urgency=low
+
+  * Fix debian/copyright (Closes: #302936). Actually this was fixed already,
+    I simply forgot to close the respective bug.
+  * Removed emacs cruft from debian/changelog.
+  * Upgraded to debhelper v4.
+
+ -- Uwe Hermann <uwe@debian.org>  Fri,  3 Mar 2006 21:23:21 +0100
+
+cccd (0.3beta4-5) unstable; urgency=low
+
+  * Updated FSF address in debian/copyright (lintian).
+  * Standards-Version: 3.6.2.0 (no changes required).
+
+ -- Uwe Hermann <uwe@debian.org>  Sun, 23 Oct 2005 16:04:44 +0200
+
+cccd (0.3beta4-4) unstable; urgency=low
+
+  * Fixed typos in manpage (Closes: #311242).
+
+ -- Uwe Hermann <uwe@debian.org>  Sun,  5 Jun 2005 14:41:40 +0200
+
+cccd (0.3beta4-3) unstable; urgency=low
+
+  * Applied patch by Andreas Jochens which fixes a FTBFS bug
+    with gcc-3.4, thanks (Closes: #258561).
+  * debian/menu: Added missing quotes.
+  * Standards-Version: 3.6.1.0 (no changes required).
+
+ -- Uwe Hermann <uwe@debian.org>  Sun, 20 Mar 2005 22:49:44 +0100
+
+cccd (0.3beta4-2) unstable; urgency=low
+
+  * Applied patch from eperez@dei.inf.uc3m.es, which fixes cccd so that it
+    doesn't send the user's email address upon cddb requests (Closes: #139307).
+
+ -- Uwe Hermann <uwe@debian.org>  Fri, 22 Mar 2002 14:13:15 +0100
+
+cccd (0.3beta4-1) unstable; urgency=low
+
+  * New maintainer (Closes: #87150).
+  * New upstream release (Closes: #112809).
+  * Repackaged from scratch using debhelper v3.
+  * debian/control:
+     + Removed unnecessary Build-Depends libglib1.2-dev, xlib6g-dev, xlibs-dev.
+     + The debhelper Build-Dependency is versioned (>> 3.0.0) now.
+     + Standards-Version: 3.5.6.0
+        + Added support for DEB_BUILD_OPTIONS.
+     + Some small fixes in the package description.
+  * debian/copyright:
+     + Display the standard GPL header.
+     + Updated the email address of the upstream author.
+     + There's no upstream homepage at the moment.
+  * debian/rules: Removed some obsolete calls, e.g. dh_suidregister...
+  * Fixed two compiler warnings.
+  * Fixed some things in the manpage, added some new stuff.
+
+ -- Uwe Hermann <uwe@debian.org>  Mon,  7 Jan 2002 17:59:07 +0100
+
+cccd (0.3beta3-4) unstable; urgency=low
+
+  * Added Build-Depends (closes: #70217).
+  * Set maintainer to Debian QA Group (relates: #87150).
+  * Indent list in extended description.
+  * Binary now in /usr/bin instead of /usr/X11R6/bin
+
+ -- Peter Palfrader <weasel@debian.org>  Sat, 24 Feb 2001 00:28:52 +0000
+
+cccd (0.3beta3-3) unstable; urgency=low
+
+  * Recompiled with latest libraries.
+  * Upgraded Standards-Version.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Mon, 16 Oct 2000 22:53:45 +0000
+
+cccd (0.3beta3-2) unstable; urgency=low
+
+  * suid root flag removed from binary.
+
+ -- Robert S. Edmonds <edmonds@debian.org>  Mon,  5 Apr 1999 16:17:49 -0400
+
+cccd (0.3beta3-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Robert S. Edmonds <stu@novare.net>  Mon, 22 Mar 1999 20:15:23 -0500
+
--- cccd-0.3beta4.orig/debian/compat
+++ cccd-0.3beta4/debian/compat
@@ -0,0 +1 @@
+5
--- cccd-0.3beta4.orig/debian/rules
+++ cccd-0.3beta4/debian/rules
@@ -0,0 +1,79 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+	dh_testdir
+	[ ! -f Makefile ] || $(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	$(MAKE) clean
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	$(MAKE) install prefix=$(CURDIR)/debian/cccd/usr \
+			mandir=$(CURDIR)/debian/cccd/usr/share/man/man1
+
+
+# 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_installchangelogs CHANGES
+	dh_installdocs
+	# dh_installexamples
+#	dh_install
+	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- cccd-0.3beta4.orig/debian/control
+++ cccd-0.3beta4/debian/control
@@ -0,0 +1,16 @@
+Source: cccd
+Section: sound
+Priority: extra
+Maintainer: Uwe Hermann <uwe@debian.org>
+Build-Depends: debhelper (>= 5), libgtk2.0-dev
+Standards-Version: 3.8.0
+
+Package: cccd
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: A small GTK+ CD player program
+ cccd is a small GTK+ CD player program with many features:
+  * Works with SCSI devices
+  * CDDB lookups (local and remote) and local storing
+  * Uses very little screen space
+  * Handles CD Extras (mixed mode CDs)
--- cccd-0.3beta4.orig/debian/menu
+++ cccd-0.3beta4/debian/menu
@@ -0,0 +1,3 @@
+?package(cccd):needs="X11" section="Applications/Sound" \
+  title="cccd" command="/usr/bin/cccd"
+
--- cccd-0.3beta4.orig/debian/docs
+++ cccd-0.3beta4/debian/docs
@@ -0,0 +1,3 @@
+README
+README.original
+BUGREPORT
