--- osdclock-0.5.orig/debian/install +++ osdclock-0.5/debian/install @@ -0,0 +1 @@ +osd_clock /usr/bin --- osdclock-0.5.orig/debian/rules +++ osdclock-0.5/debian/rules @@ -0,0 +1,56 @@ +#!/usr/bin/make -f + +include /usr/share/dpatch/dpatch.make + +CFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif + +ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), arm)) + CFLAGS += -fsigned-char +endif + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) clean + + dh_clean + +build: build-stamp +build-stamp: patch + dh_testdir + + $(MAKE) DCFLAGS="$(CFLAGS)" + + touch build-stamp + +install: + +binary: binary-arch + +binary-arch: build + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_install + dh_installman + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + +.PHONY: clean build install binary binary-arch binary-indep --- osdclock-0.5.orig/debian/compat +++ osdclock-0.5/debian/compat @@ -0,0 +1 @@ +7 --- osdclock-0.5.orig/debian/control +++ osdclock-0.5/debian/control @@ -0,0 +1,15 @@ +Source: osdclock +Section: utils +Priority: optional +Maintainer: Alexandre De Dommelin +Build-Depends: debhelper (>= 7), dpatch, libx11-dev, libxinerama-dev, libxosd-dev, libxt-dev +Standards-Version: 3.8.1 + +Package: osdclock +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Clock using the XOSD library + A clock which uses the X On-Screen Display library to display itself. + . + It supports a strftime(3)-style format parameter and can be configured to show + up only at specific intervals. --- osdclock-0.5.orig/debian/changelog +++ osdclock-0.5/debian/changelog @@ -0,0 +1,173 @@ +osdclock (0.5-23) unstable; urgency=low + + * New package maintainer (closes: #483810). + * Standards-Version updated to 3.8.1 + + -- Alexandre De Dommelin Sat, 13 Jun 2009 15:53:05 +0200 + +osdclock (0.5-22) unstable; urgency=low + + * Orphaning package. + + -- Daniel Baumann Fri, 20 Jun 2008 09:52:00 +0200 + +osdclock (0.5-21) unstable; urgency=low + + * Updated to debhelper 7. + * Rewriting copyright file in machine-interpretable format. + * Reordering rules file. + + -- Daniel Baumann Sat, 31 May 2008 11:36:00 +0200 + +osdclock (0.5-20) unstable; urgency=low + + * Bumped to new policy. + * Don't hide make errors in clean target of rules. + + -- Daniel Baumann Sun, 23 Dec 2007 16:54:00 +0100 + +osdclock (0.5-19) unstable; urgency=low + + * Adjusted manpage section. + + -- Daniel Baumann Tue, 15 May 2007 15:05:00 +0200 + +osdclock (0.5-18) unstable; urgency=low + + * New maintainer (Closes: #416960, #416983). + * Redone debian directory based on current debhelper templates. + + -- Daniel Baumann Sun, 1 Apr 2007 09:10:00 +0200 + +osdclock (0.5-17) unstable; urgency=low + + * Orphan package + + -- Julien Lemoine Sat, 31 Mar 2007 20:19:51 +0200 + +osdclock (0.5-16) unstable; urgency=low + + * Converted Debian changelog in utf-8 + (it was containing an iso-8859-1 character) + (Closes: #375148) + + -- Julien Lemoine Tue, 22 Aug 2006 11:33:50 +0200 + +osdclock (0.5-15) unstable; urgency=low + + * Applied patch from Justin B Rye to fix problem + with man page filename (Closes: #37514) + + -- Julien Lemoine Wed, 28 Jun 2006 21:53:30 +0200 + +osdclock (0.5-14) unstable; urgency=low + + * Applied patch from Nicolas Salles to add + locale definition in osdclock (Closes: #352739) + + -- Julien Lemoine Mon, 5 Jun 2006 11:56:10 +0200 + +osdclock (0.5-13) unstable; urgency=low + + * Fixed build failuer (added missing build depends) + (Closes: #347212) + + -- Julien Lemoine Mon, 9 Jan 2006 15:06:57 +0100 + +osdclock (0.5-12) unstable; urgency=low + + * Fix x.org transition bug (xlibs-dev removal) + (Closes: #346903) + + -- Julien Lemoine Mon, 9 Jan 2006 09:31:05 +0100 + +osdclock (0.5-11) unstable; urgency=low + + * Applied patch from Stephan Windmüller + Introduces two new options : + -r locate clock at right side (default: left) + -w Seconds to wait before first display (default: 0) + (Closes: 273866) + + -- Julien Lemoine Wed, 29 Sep 2004 20:42:24 +0200 + +osdclock (0.5-10) unstable; urgency=low + + * Fix default-font for non-ISO8859-1 locales. (closes: #212705) + Thanks to Philipp Matthias Hahn + + -- Julien Lemoine Tue, 30 Sep 2003 13:54:04 +0200 + +osdclock (0.5-9) unstable; urgency=low + + * Fixed typos (Closes: #211231) + * Updated to debian policy 3.6.1 + + -- Julien Lemoine Tue, 16 Sep 2003 19:23:01 +0200 + +osdclock (0.5-8) unstable; urgency=low + + * Rebuild using the new xosd package (2.2.2-2) to fix link errors on S390 + + -- Julien Lemoine Wed, 2 Jul 2003 12:32:25 +0200 + +osdclock (0.5-7) unstable; urgency=low + + * Added -lXinerama to fix undefined references on s390 + * Added build depends on xlibx-dev + * Updated to debian policy 3.5.10 + + -- Julien Lemoine Fri, 6 Jun 2003 17:10:28 +0200 + +osdclock (0.5-6) unstable; urgency=low + + * Fixed typo in man page (Closes: #194704) + * Build against latest libxosd + * Updated to debian policy 3.5.9 + + -- Julien Lemoine Tue, 27 May 2003 02:27:27 +0200 + +osdclock (0.5-5) unstable; urgency=low + + * Added missing options in man and --help (Closes: #183602) + + -- Julien Lemoine Thu, 6 Mar 2003 12:45:43 +0100 + +osdclock (0.5-4) unstable; urgency=low + + * New Maintainer + * Fixed char signedness on arm (Closes: #161809) + * Fixed typo in description (Closes: #140934) + * Build against latest libxosd (closes: #160804, #181294, #160845) + * Applyed patch from Matthew Astley + (Closes: #160281) + * Updated Standards-Version to 3.5.8 + + -- Julien Lemoine Tue, 4 Mar 2003 14:44:10 +0100 + +osdclock (0.5-3.1) unstable; urgency=low + + * Non-maintainer upload + * Build against latest libxosd (closes: #160804) + * Build-depends on libxosd 1.0.3-1 or more + * Fix xosd_init invocation to specify number of lines = 2. + + -- Junichi Uekawa Sat, 14 Sep 2002 14:16:13 +0900 + +osdclock (0.5-3) unstable; urgency=low + + * Recompile against the right X libraries. Closes: #95629 + + -- Martijn van de Streek Thu, 14 Jun 2001 13:51:39 +0200 + +osdclock (0.5-2) unstable; urgency=low + + * Fix override disparity + + -- Martijn van de Streek Sun, 22 Apr 2001 13:11:57 +0200 + +osdclock (0.5-1) unstable; urgency=low + + * Initial package + + -- Martijn van de Streek Wed, 28 Mar 2001 10:30:53 +0200 --- osdclock-0.5.orig/debian/manpages +++ osdclock-0.5/debian/manpages @@ -0,0 +1 @@ +osd_clock.1 --- osdclock-0.5.orig/debian/copyright +++ osdclock-0.5/debian/copyright @@ -0,0 +1,42 @@ +Author: Jon Beckham +Download: http://www.ignavus.net/software.html + +Files: * +Copyright: (C) Jon Beckham +License: GPL-2+ + 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 Street, 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-2 file. + +Files: debian/* +Copyright: (C) 2007-2008 Daniel Baumann +License: GPL-2+ + 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 Street, 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-2 file. --- osdclock-0.5.orig/debian/patches/01-conglomeration.dpatch +++ osdclock-0.5/debian/patches/01-conglomeration.dpatch @@ -0,0 +1,217 @@ +#!/bin/sh /usr/share/dpatch/dpatch-run +## 01-conglomeration.dpatch +## +## DP: Needs to be broken out (FIXME). + +@DPATCH@ + +diff -Naur osd_clock-0.5.orig/Makefile osd_clock-0.5/Makefile +--- osd_clock-0.5.orig/Makefile 2001-03-27 16:38:52.000000000 +0000 ++++ osd_clock-0.5/Makefile 2007-04-01 07:09:14.000000000 +0000 +@@ -13,10 +13,10 @@ + INSTALL=/usr/bin/install -c + INSTALL_DATA=$(INSTALL) -m 644 + +-CFLAGS=-O2 -Wall -pipe -I. -DXOSD_VERSION=\"$(VERSION)\" -I/usr/X11R6/include ++CFLAGS=$(DCFLAGS) -pipe -I. -DXOSD_VERSION=\"$(VERSION)\" -I/usr/X11R6/include + LDFLAGS=-L. -L/usr/X11R6/lib -lX11 -lXext -lpthread -lXt + +-XOSDLIBS=-lxosd ++XOSDLIBS=-lxosd -lXinerama + + SOURCES=NEWS AUTHORS ChangeLog README COPYING Makefile \ + osd_clock.c osd_clock.1 +diff -Naur osd_clock-0.5.orig/osd_clock.1 osd_clock-0.5/osd_clock.1 +--- osd_clock-0.5.orig/osd_clock.1 2001-03-27 19:22:41.000000000 +0000 ++++ osd_clock-0.5/osd_clock.1 2007-04-01 07:09:14.000000000 +0000 +@@ -1,9 +1,9 @@ + .\" Emacs, -*- nroff -*- please +-.TH OSDClock 1osd_clock "March 2001" "X OSD Clock" ++.TH OSDClock 1 "March 2001" "X OSD Clock" + .SH NAME + osd_clock - X on-screen clock displayer + .SH SYNOPSIS +-.B osd_cat ++.B osd_clock + [\fIOPTION\fR]... [\fI+FORMAT\fR] + .SH DESCRIPTION + .PP +@@ -26,15 +26,28 @@ + \fB\-i\fR \fIINTERVAL\fR + This specifies the interval between displays. Default is 1 (display every second). + .TP ++\fB\-H\fR \fIINTEGER\fR ++The "chimes per hour" count overrides \fB\-i\fR. Default is 0 (no effect). ++ ++The time will be displayed this many times each hour (notwithstanding signals interrupting sleep, and leap seconds). The first display of the hour will be on the hour exactly. Use \fB-H 4\fR for a display at 0, 15, 30 and 45 minutes past. ++.TP + \fB\-s\fR \fISHADOW\fR + This option sets the shadow depth. Default 2. + .TP ++\fB\-t ++locate clock at top left (default: bottom left). ++.TP ++\fB\-b ++locate clock at bottom left (default). ++.TP + \fB\-o\fR \fIOFFSET\fR +-This option specifies the offset from the top or bottom of screen the text is displayed. The default is \fI0\fR. Useful to move above or below panels or epplets. ++This option specifies the offset from the top or bottom of screen the text is displayed. The default is \fI0\fR. Useful to move above or below panels or applets. + .TP + \fB\-h\fR, \fB\-\-help\fR + display this help and exit + .PP ++.SH BUGS ++The per-hour mode may fire up to one second late, or worse if the system is busy. + .SH AUTHOR + Jon Beckham + .br +diff -Naur osd_clock-0.5.orig/osd_clock.c osd_clock-0.5/osd_clock.c +--- osd_clock-0.5.orig/osd_clock.c 2001-04-07 22:50:01.000000000 +0000 ++++ osd_clock-0.5/osd_clock.c 2007-04-01 07:24:10.000000000 +0000 +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + static struct option long_options[] = { + {"font", 1, NULL, 'f'}, +@@ -33,6 +34,7 @@ + {"delay", 1, NULL, 'd'}, + {"format", 1, NULL, 'F'}, + {"interval", 1, NULL, 'i'}, ++ {"perhour", 1, NULL, 'H'}, + {"shadow", 1, NULL, 's'}, + {"top", 0, NULL, 't'}, + {"bottom", 0, NULL, 'b'}, +@@ -40,9 +42,20 @@ + {"help", 0, NULL, 'h'}, + {NULL, 0, NULL, 0} + }; ++ ++int secondspast (void) // seconds past the current hour ++{ ++ time_t now = time(NULL); ++ struct tm* now_parts = localtime(&now); ++ ++ return now_parts->tm_min * 60 + now_parts->tm_sec; ++ // 0 <= x <= 3600, maximum only happens with a leap second ++} ++ + + int main (int argc, char *argv[]) + { ++ setlocale(LC_ALL, ""); + char c; + + static const char *format; +@@ -51,14 +64,17 @@ + xosd *osd; + xosd_pos pos = XOSD_bottom; + +- char *font = "fixed"; ++ char *font = osd_default_font; + char *color = "red"; ++ char *align = "left"; + int delay = 3; + int offset = 0; + int shadow = 2; + int interval = 1; +- +- while ((c = getopt_long(argc ,argv,"f:c:d:F:i:s:o:tbh", ++ int perhour = 0; // feature off by default ++ int wait = 0; ++ ++ while ((c = getopt_long(argc ,argv,"f:c:d:F:i:H:s:o:w:tbhr", + long_options, NULL)) != -1) + { + switch(c) +@@ -75,9 +91,15 @@ + case 'd': + delay = atoi(optarg); + break; ++ case 'w': ++ wait = atoi(optarg); ++ break; + case 'i': + interval = atoi(optarg); + break; ++ case 'H': ++ perhour = atoi(optarg); ++ break; + case 's': + shadow = atoi(optarg); + break; +@@ -90,32 +112,45 @@ + case 'b': + pos = XOSD_bottom; + break; ++ case 'r': ++ align = "right"; ++ break; + case 'h': + printf("USAGE: %s [-flag args]\n" +- "\t-f\tfully qualified font. default: fixed\n" ++ "\t-f\tfully qualified font. default: %s\n" + "\t-c\tcolor. default: red\n" + "\t-s\tdrop shadow offset. default: 2\n" +- "\t-t\tlocate clock at top left (default: bottom left)\n" +- "\t-b\tlocate clock at bottom left (default)\n" ++ "\t-t\tlocate clock at top of screen (default: bottom)\n" ++ "\t-b\tlocate clock at bottom of screen(default)\n" ++ "\t-r\tlocate clock at right side (default: left)\n" + "\t-o\toffset value to raise or lower around panels. def: 0\n" + "\t-F\tSpecify time/date format (in strftime(3) style)\n" + "\t-d\tDelay (time the clock stays on screen when it's updated)\n" + "\t\tin seconds\n" ++ "\t-w\tSeconds to wait before first display (default: 0)\n" + "\t-i\tInterval (time between updates) in seconds\n" ++ "\t-H\tInteger (displayed this many times each hour)\n" + "\t-h\tthis help message\n", +- argv[0]); ++ argv[0], osd_default_font); + return EXIT_SUCCESS; + break; + } + } ++ ++ sleep(wait); + +- osd = xosd_init (font, color, delay, pos, offset, shadow); ++ osd = xosd_init (font, color, delay, pos, offset, shadow, 2); + if (!osd) + { + fprintf (stderr, "Error initializing osd\n"); + return EXIT_FAILURE; + } + ++ if(align == "right") ++ { ++ xosd_set_align(osd, XOSD_right); ++ } ++ + /* If no format is specified, we revert to ctime-ish display */ + if(!format) format = "%a %b %e %H:%M:%S %G"; + +@@ -127,10 +162,19 @@ + strftime(output, 255, format, localtime(&curr_time)); + + xosd_display (osd, 1, XOSD_string, output); ++ ++ if (perhour) ++ { ++ int secs = secondspast(); ++ int gapseconds = 3600 / perhour; // ick, constant ++ int nextshow = (secs / gapseconds) + 1; ++ ++ interval = nextshow * gapseconds - secs; ++ } + sleep(interval); + } + +- xosd_uninit (osd); ++ xosd_destroy (osd); + + return EXIT_SUCCESS; + } --- osdclock-0.5.orig/debian/patches/00list +++ osdclock-0.5/debian/patches/00list @@ -0,0 +1 @@ +01-conglomeration.dpatch