--- leave-1.12.orig/leave.c +++ leave-1.12/leave.c @@ -51,6 +51,7 @@ #include #include #include +#include #define SECOND 1 #define MINUTE (SECOND * 60) @@ -84,7 +85,8 @@ errx(1, "Cannot set stdout to unbuffered."); if (argc < 2) { - (void)puts("When do you have to leave? "); + (void) printf ("When do you have to leave? "); + (void) fflush (stdout); cp = fgets(buf, sizeof(buf), stdin); if (cp == NULL || *cp == '\n') exit(0); @@ -182,6 +184,7 @@ static void usage(void) { - (void)fprintf(stderr, "Usage: %s [[+]hhmm]\n", getprogname()); + extern char *program_invocation_short_name; + (void)fprintf(stderr, "Usage: %s [[+]hhmm]\n", program_invocation_short_name); exit(1); } --- leave-1.12.orig/debian/changelog~ +++ leave-1.12/debian/changelog~ @@ -0,0 +1,88 @@ +leave (1.12-2) unstable; urgency=low + + * Exited with 0 instead of 1 for binary-indep, just for people who obsess + with pointless details, closes: #395734. + + -- Josip Rodin Sat, 28 Oct 2006 00:10:22 +0200 + +leave (1.12-1) unstable; urgency=low + + * New upstream version. + * Added an unportable glibc-only variable to get the program name, + because the unportable NetBSD-only variable didn't work. + + -- Josip Rodin Fri, 15 Aug 2003 21:10:23 +0200 + +leave (1.10-1) unstable; urgency=low + + * New upstream version, closes: #143720. + Abolished our patches for handling 24-hour time formats, and used + the upstream's. The behaviour is unchanged, AFAICT. + * Updated for Policy 3.5.6. debian/rules in shell, + removed the use of both debhelper and pmake -> no Build-Depends :) + + -- Josip Rodin Mon, 26 Aug 2002 14:40:30 +0200 + +leave (1.8-2) unstable; urgency=low + + * Fixed those long standing bugs in the handling of 24h-clock + arguments, by making leave not convert times to 12h clock, but check + whether the time is between 1 and 12, and then interpret it according + to a 12-hour clock. Let's hope it all works. + Thanks to Sergio Gelato , who provided + the patch both for the code and for the manual page. + (closes #25150 #26000 #31250 #31872) + * Updated for Policy 3.x. Removed the full text of the BSD license from + the copyright file and referenced the /usr/share/common-licenses/BSD + file. + + -- Josip Rodin Mon, 18 Oct 1999 23:13:16 +0200 + +leave (1.8-1) unstable; urgency=low + + * New maintainer, new upstream source (with exactly two (2) new lines + of code), new debian/* files. + + -- Josip Rodin Wed, 19 May 1999 18:13:22 +0200 + +leave (1.6-2) unstable; urgency=low + + * debian/control (Maintainer): new address. + * debian/copyright: ditto. + * debian/control (Standards-Version): updated to 2.5.0.0. + * debian/rules: replace $(package) with a string literal and other minor + clean ups. + + -- James Troup Tue, 10 Nov 1998 15:46:23 +0000 + +leave (1.6-1) unstable; urgency=low + + * New upstream version. + * debian/rules: Use BSD make not GNU make to build. + * debian/rules: Build with -g. + * debian/rules: Call dpkg-gencontrol with -isp. + * debian/rules: remove leave.cat1 on clean. + * debian/rules: no more {,} usage. + * debian/rules: chmod go=rX not g-ws. + * debian/control: Standards-Version 2.3.0.1. + * debian/control: section is really utils not misc. + * debian/copyright: removed over-keen "famous" from description. + + -- James Troup Mon, 8 Dec 1997 21:03:01 +0000 + +leave (1.4-3) unstable; urgency=low + + * Rebuilt libc6. + + -- James Troup Wed, 25 Jan 1997 18:30:06 +0000 + +leave (1.4-2) unstable; urgency=low + + * New Maintainer. + * Updated package to standards version 2.1.1.2. + + -- James Troup Wed, 22 Jan 1997 00:30:17 +0000 + +Local variables: +mode: debian-changelog +End: --- leave-1.12.orig/debian/control +++ leave-1.12/debian/control @@ -0,0 +1,14 @@ +Source: leave +Section: utils +Priority: optional +Maintainer: Josip Rodin +Standards-Version: 3.6.0 + +Package: leave +Architecture: any +Depends: ${shlibs:Depends} +Description: Reminds you when you have to leave + Leave waits until the specified time, then reminds you that you have + to leave. You are reminded 5 minutes and 1 minute before the actual + time, at the time, and every minute thereafter. When you log off, + leave exits just before it would have printed the next message. --- leave-1.12.orig/debian/rules +++ leave-1.12/debian/rules @@ -0,0 +1,41 @@ +#!/usr/bin/make -f + +tmp=$(shell pwd)/debian/leave + +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + optflag=-O2 +endif + +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + stripflag=-s +endif + +leave: leave.c + cc -g $(optflag) -Wall -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= leave.c -o leave +# used to have 'pmake CFLAGS="..." leave' here, but why? + +build: leave + +clean: + test -f leave.c || { echo not in the right dir\!; exit 1; } + test `id -u` -eq 0 || { echo "don't have (pseudo-)root!"; exit 1; } + rm -f build-stamp leave leave.o leave.cat1 debian/files debian/substvars + rm -rf $(tmp) + +binary-arch binary: build + test `id -u` -eq 0 || { echo "don't have (pseudo-)root!"; exit 1; } + rm -rf $(tmp) + install -d -m 755 $(tmp)/usr/bin $(tmp)/usr/share/man/man1 \ + $(tmp)/DEBIAN $(tmp)/usr/share/doc/leave + install $(stripflag) -m 755 leave $(tmp)/usr/bin + gzip -c9 leave.1 > $(tmp)/usr/share/man/man1/leave.1.gz + gzip -c9 debian/changelog > $(tmp)/usr/share/doc/leave/changelog.Debian.gz + install -m 644 debian/copyright $(tmp)/usr/share/doc/leave + dpkg-shlibdeps $(tmp)/usr/bin/leave + dpkg-gencontrol -isp -P$(tmp) + chown -R root.root $(tmp) + chmod -R g-ws $(tmp) + dpkg --build $(tmp) .. + +binary-indep: +# do nothing, successfully! --- leave-1.12.orig/debian/copyright +++ leave-1.12/debian/copyright @@ -0,0 +1,12 @@ +The Debian "leave" package was put together by James Troup. +Current maintainer is Josip Rodin . + +Original (NetBSD) sources can be obtained from: + ftp://ftp.netbsd.org/pub/NetBSD-current/src/usr.bin/leave/ + http://cvsweb.netbsd.org/bsdweb.cgi/basesrc/usr.bin/leave/ + +Copyright (c) 1980, 1988, 1993 + The Regents of the University of California. All rights reserved. + +Licensed under the standard BSD license. On Debian systems, full text of +that can be found in the file /usr/share/common-licenses/BSD. --- leave-1.12.orig/debian/changelog +++ leave-1.12/debian/changelog @@ -0,0 +1,97 @@ +leave (1.12-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Convert debian/rules to a Makefile (Closes: #640874) + + -- Sébastien Villemot Thu, 11 Oct 2012 21:23:51 +0200 + +leave (1.12-2) unstable; urgency=low + + * Replaced puts() with printf()+fflush() in order to avoid a newline after + the question, as noted by Toni Mueller, closes: #211164. + * Exited with 0 instead of 1 for binary-indep, how ever pointless that + may seem to any casual observer, closes: #395734. + + -- Josip Rodin Sat, 28 Oct 2006 00:10:22 +0200 + +leave (1.12-1) unstable; urgency=low + + * New upstream version. + * Added an unportable glibc-only variable to get the program name, + because the unportable NetBSD-only variable didn't work. + + -- Josip Rodin Fri, 15 Aug 2003 21:10:23 +0200 + +leave (1.10-1) unstable; urgency=low + + * New upstream version, closes: #143720. + Abolished our patches for handling 24-hour time formats, and used + the upstream's. The behaviour is unchanged, AFAICT. + * Updated for Policy 3.5.6. debian/rules in shell, + removed the use of both debhelper and pmake -> no Build-Depends :) + + -- Josip Rodin Mon, 26 Aug 2002 14:40:30 +0200 + +leave (1.8-2) unstable; urgency=low + + * Fixed those long standing bugs in the handling of 24h-clock + arguments, by making leave not convert times to 12h clock, but check + whether the time is between 1 and 12, and then interpret it according + to a 12-hour clock. Let's hope it all works. + Thanks to Sergio Gelato , who provided + the patch both for the code and for the manual page. + (closes #25150 #26000 #31250 #31872) + * Updated for Policy 3.x. Removed the full text of the BSD license from + the copyright file and referenced the /usr/share/common-licenses/BSD + file. + + -- Josip Rodin Mon, 18 Oct 1999 23:13:16 +0200 + +leave (1.8-1) unstable; urgency=low + + * New maintainer, new upstream source (with exactly two (2) new lines + of code), new debian/* files. + + -- Josip Rodin Wed, 19 May 1999 18:13:22 +0200 + +leave (1.6-2) unstable; urgency=low + + * debian/control (Maintainer): new address. + * debian/copyright: ditto. + * debian/control (Standards-Version): updated to 2.5.0.0. + * debian/rules: replace $(package) with a string literal and other minor + clean ups. + + -- James Troup Tue, 10 Nov 1998 15:46:23 +0000 + +leave (1.6-1) unstable; urgency=low + + * New upstream version. + * debian/rules: Use BSD make not GNU make to build. + * debian/rules: Build with -g. + * debian/rules: Call dpkg-gencontrol with -isp. + * debian/rules: remove leave.cat1 on clean. + * debian/rules: no more {,} usage. + * debian/rules: chmod go=rX not g-ws. + * debian/control: Standards-Version 2.3.0.1. + * debian/control: section is really utils not misc. + * debian/copyright: removed over-keen "famous" from description. + + -- James Troup Mon, 8 Dec 1997 21:03:01 +0000 + +leave (1.4-3) unstable; urgency=low + + * Rebuilt libc6. + + -- James Troup Wed, 25 Jan 1997 18:30:06 +0000 + +leave (1.4-2) unstable; urgency=low + + * New Maintainer. + * Updated package to standards version 2.1.1.2. + + -- James Troup Wed, 22 Jan 1997 00:30:17 +0000 + +Local variables: +mode: debian-changelog +End: