--- scrot-0.8.orig/debian/compat +++ scrot-0.8/debian/compat @@ -0,0 +1 @@ +7 --- scrot-0.8.orig/debian/copyright +++ scrot-0.8/debian/copyright @@ -0,0 +1,62 @@ +This package was debianized by Laurence J. Lane on +Mon, 30 Oct 2000 20:19:08 -0500. + +It was downloaded from: + + http://linuxbrit.co.uk/downloads/ + +Upstream Author: Tom Gilbert + +Copyright: + +Copyright (C) 1999,2000 Tom Gilbert. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies of the Software and its documentation and acknowledgment shall be +given in the documentation and software packages that this Software was +used. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +------------------------------------------------------------------------------- +src/getopt.c, src/getopt1.c: + +GNU LIBRARY GENERAL PUBLIC LICENSE +Version 2, June 1991 +Copyright (C) 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +On Debian systems, the complete text of the GNU General Public License +can be found in /usr/share/common-licenses/LGPL-2 file. + +------------------------------------------------------------------------------- +src/main.c, src/options.c, src/imlib.c: + +Copyright (c) The Regents of the University of California. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. --- scrot-0.8.orig/debian/watch +++ scrot-0.8/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ +http://linuxbrit.co.uk/downloads/ (?:.*/)?scrot-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian uupdate --- scrot-0.8.orig/debian/rules +++ scrot-0.8/debian/rules @@ -0,0 +1,86 @@ +#!/usr/bin/make -f +#export DH_VERBOSE=1 + + +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE)) +CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) +else +CROSS= --build $(DEB_BUILD_GNU_TYPE) +endif + + + +configure: configure-stamp +configure-stamp: patch + + dh_testdir +ifneq "$(wildcard /usr/share/misc/config.sub)" "" + cp -f /usr/share/misc/config.sub config.sub +endif +ifneq "$(wildcard /usr/share/misc/config.guess)" "" + cp -f /usr/share/misc/config.guess config.guess +endif + ./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" + + +build: build-stamp +build-stamp: configure-stamp + dh_testdir + + $(MAKE) + + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + [ ! -f Makefile ] || $(MAKE) distclean + rm -f config.sub config.guess + + dh_clean + +patch: patch-stamp +patch-stamp: + dpatch apply-all + touch build-stamp + +unpatch: + dpatch deapply-all + rm -rf patch-stamp debian/patched + +install: build + dh_testdir + dh_testroot + dh_clean + dh_installdirs + + $(MAKE) DESTDIR=$(CURDIR)/debian/scrot install + rm -rf $(CURDIR)/debian/scrot/usr/doc + + +binary-indep: build install + +binary-arch: build install + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_install + dh_installman + 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 --- scrot-0.8.orig/debian/README.source +++ scrot-0.8/debian/README.source @@ -0,0 +1,38 @@ +This package uses dpatch to manage all modifications to the upstream +source. Changes are stored in the source package as diffs in +debian/patches and applied during the build. + +To get the fully patched source after unpacking the source package, cd +to the root level of the source package and run: + + debian/rules patch + +Removing a patch is as simple as removing its entry from the +debian/patches/00list file, and please also remove the patch file +itself. + +Creating a new patch is done with "dpatch-edit-patch patch XX_patchname" +where you should replace XX with a new number and patchname with a +descriptive shortname of the patch. You can then simply edit all the +files your patch wants to edit, and then simply "exit 0" from the shell +to actually create the patch file. + +To tweak an already existing patch, call "dpatch-edit-patch XX_patchname" +and replace XX_patchname with the actual filename from debian/patches +you want to use. + +To clean up afterwards again, "debian/rules unpatch" will do the +work for you - or you can of course choose to call +"fakeroot debian/rules clean" all together. + + +--- + +this documentation is part of dpatch package, and may be used by +packages using dpatch to comply with policy on README.source. This +documentation is meant to be useful to users who are not proficient in +dpatch in doing work with dpatch-based packages. Please send any +improvements to the BTS of dpatch package. + +original text by Gerfried Fuchs, edited by Junichi Uekawa +10 Aug 2008. --- scrot-0.8.orig/debian/control +++ scrot-0.8/debian/control @@ -0,0 +1,17 @@ +Source: scrot +Section: graphics +Priority: optional +Maintainer: William Vera +Standards-Version: 3.8.3 +Build-Depends: libimlib2-dev, giblib-dev, debhelper (>=7.0.17), autotools-dev, dpatch, libtool +Homepage: http://freshmeat.net/projects/scrot + +Package: scrot +Architecture: any +Depends: ${shlibs:Depends} +Description: command line screen capture utility + scrot (SCReen shOT) is a simple commandline screen capture + utility that uses imlib2 to grab and save images. Multiple + image formats are supported through imlib2's dynamic saver + modules. + --- scrot-0.8.orig/debian/changelog +++ scrot-0.8/debian/changelog @@ -0,0 +1,122 @@ +scrot (0.8-11) unstable; urgency=low + + * Changed the Homepage field on control file (Closes: #547486). + * Updated Standards Version to 3.8.1. + * Added a patch to improve spacing in manual page (Closes: #549123). + * Added a README.source (dpatch). + * Added a patch to prevent arbitrary long file names (Closes: #354662). + + -- William Vera Sun, 25 Oct 2009 19:48:21 -0600 + +scrot (0.8-10) unstable; urgency=low + + * Added a patch to automatically choose focused window (Closes: #245266). + * New patch to add this function at he manpage. + + -- William Vera Tue, 19 May 2009 09:27:27 -0500 + +scrot (0.8-9) unstable; urgency=low + + * Changed the description on manpage (Closes: #469914). + * Updated the Standards-Version to 3.8.1. + * Fixed deprecated dh_clean -k in debian/rules file. + + -- William Vera Wed, 13 May 2009 06:48:15 -0500 + +scrot (0.8-8) unstable; urgency=low + + * New maintainer (Closes: #492502). + * Updated Standards Version to 3.8.0 + * Added autotool-dev as Build-Depend. + * Added watch file. + * Added a patch to fix a minor error on manpage. + * Set auto update libtool at debian/rules. + * Deleted CDBS from control file. + * Added a patch to fix options.c. + + -- William Vera Fri, 15 Aug 2008 00:26:13 -0500 + +scrot (0.8-7) unstable; urgency=low + + * removed build dependency on xlibs-dev + + -- Laurence J. Lane Mon, 9 Jan 2006 00:10:21 -0500 + +scrot (0.8-6) unstable; urgency=low + + * corrected typos. Reported by Martin Pool. Thanks. Closes: #233835 + * removed "(s)" from debian/copyright, lintian warning + + -- Laurence J. Lane Fri, 20 Feb 2004 13:12:04 -0500 + +scrot (0.8-5) unstable; urgency=low + + * removed -lfreetype and other extra linker flags + * update to Standards-Version: 3.6.1.0 + + -- Laurence J. Lane Tue, 28 Oct 2003 20:26:39 -0500 + +scrot (0.8-4) unstable; urgency=low + + * src/Makefile*: replace @IMLIB2LIBS@ and @GIBLIBS@ with -lgiblib + + -- Laurence J. Lane Tue, 28 Oct 2003 19:31:37 -0500 + +scrot (0.8-3) unstable; urgency=low + + * src/Makefile.in: strip -ttf from scrot_LDADD, temp hack for mips* + + -- Laurence J. Lane Mon, 20 Oct 2003 23:13:50 -0400 + +scrot (0.8-2) unstable; urgency=low + + * shooting rubberbands at arm, mips and mipsel build failures + + -- Laurence J. Lane Sun, 19 Oct 2003 14:00:48 -0400 + +scrot (0.8-1) unstable; urgency=low + + * New upstream release + * converted to CDBS + + -- Laurence J. Lane Fri, 26 Sep 2003 00:03:06 -0400 + +scrot (0.7-1) unstable; urgency=low + + * New upstream release + + -- Laurence J. Lane Fri, 28 Feb 2003 00:23:01 -0500 + +scrot (0.6-2) unstable; urgency=low + + * maintenance update: debhelper version, standards version, etc + + -- Laurence J. Lane Fri, 22 Nov 2002 04:00:16 -0500 + +scrot (0.6-1) unstable; urgency=low + + * New upstream release + * debian/changelog: removed user emacs mode settings + + -- Laurence J. Lane Mon, 17 Dec 2001 09:27:48 -0500 + +scrot (0.5-1) unstable; urgency=low + + * new upstream release + * updated package description, Closes: #93823 + * changed section from x11 to graphics + + -- Laurence J. Lane Wed, 2 May 2001 21:40:26 -0400 + +scrot (0.3-2) unstable; urgency=low + + * Build-Depends typo corrected, closes: #77179 + + -- Laurence J. Lane Thu, 16 Nov 2000 10:27:21 -0500 + +scrot (0.3-1) unstable; urgency=low + + * Initial release + + -- Laurence J. Lane Mon, 30 Oct 2000 20:11:13 -0500 + --- scrot-0.8.orig/debian/patches/06_manpagespace.dpatch +++ scrot-0.8/debian/patches/06_manpagespace.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 06_manpagespace.dpatch by William Vera +## +## DP: Improve spacing in manual page. + +@DPATCH@ +diff -urNad scrot-0.8~/scrot.1 scrot-0.8/scrot.1 +--- scrot-0.8~/scrot.1 2001-01-11 11:43:06.000000000 -0600 ++++ scrot-0.8/scrot.1 2009-10-25 19:55:38.000000000 -0600 +@@ -58,7 +58,7 @@ + These options may be used to refer to the current date and time. + The second kind are internal to scrot and are prefixed by '$' + The following specifiers are recognised: +-.br ++.PP + .B $f + image path/filename (ignored when used in the filename) + .br --- scrot-0.8.orig/debian/patches/02_options.c.dpatch +++ scrot-0.8/debian/patches/02_options.c.dpatch @@ -0,0 +1,27 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_options.c.dpatch by William Vera +## +## DP: A little fix for wrong words. + +@DPATCH@ +diff -urNad scrot-0.8~/src/options.c scrot-0.8/src/options.c +--- scrot-0.8~/src/options.c 2003-06-23 07:09:08.000000000 -0500 ++++ scrot-0.8/src/options.c 2008-10-27 22:06:20.000000000 -0600 +@@ -229,7 +229,7 @@ + " low quality means high compression.\n" + " -m, --multidisp For multiple heads, grab shot from each\n" + " and join them together.\n" +- " -s, --select interactively choose a window or rectnagle\n" ++ " -s, --select interactively choose a window or rectangle\n" + " with the mouse\n" + " -t, --thumb NUM generate thumbnail too. NUM is the percentage\n" + " of the original size for the thumbnail to be,\n" +@@ -238,7 +238,7 @@ + " Both the --exec and filename parameters can take format specifiers\n" + " that are expanded by " PACKAGE " when encountered.\n" + " There are two types of format specifier. Characters preceded by a '%%'\n" +- " are interpretted by strftime(2). See man strftime for examples.\n" ++ " are interpreted by strftime(2). See man strftime for examples.\n" + " These options may be used to refer to the current date and time.\n" + " The second kind are internal to " PACKAGE + " and are prefixed by '$'\n" --- scrot-0.8.orig/debian/patches/04-focused.dpatch +++ scrot-0.8/debian/patches/04-focused.dpatch @@ -0,0 +1,243 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04-focused.dpatch by James Cameron +## +## DP: src/options.c (scrot_parse_option_array): add --focused option. +## DP: src/main.c (scrot_get_geometry, scrot_nice_clip): new functions +## for common code used by both selected and focused screenshot. +## DP: src/main.c (scrot_grab_focused): new function to grab currently +## focused window after specified delay. + +@DPATCH@ +diff -u -r scrot-0.8~/src/options.h scrot-0.8/src/options.h +--- scrot-0.8~/src/options.h 2004-04-21 21:15:24.000000000 +1000 ++++ scrot-0.8~/src/options.h 2004-04-21 22:00:47.000000000 +1000 +@@ -32,6 +32,7 @@ + int delay; + int countdown; + int select; ++ int focused; + int quality; + int border; + int multidisp; +diff -u -r scrot-0.8~/src/options.c scrot-0.8/src/options.c +--- scrot-0.8~/orig/options.c 2004-04-21 21:15:24.000000000 +1000 ++++ scrot-0.8/src/options.c 2004-04-21 22:00:32.000000000 +1000 +@@ -44,13 +44,15 @@ + static void + scrot_parse_option_array(int argc, char **argv) + { +- static char stropts[] = "bcd:e:hmq:st:v+:"; ++ static char stropts[] = "bcd:e:hmq:st:uv+:"; + static struct option lopts[] = { + /* actions */ + {"help", 0, 0, 'h'}, /* okay */ + {"version", 0, 0, 'v'}, /* okay */ + {"count", 0, 0, 'c'}, + {"select", 0, 0, 's'}, ++ {"focused", 0, 0, 'u'}, ++ {"focussed", 0, 0, 'u'}, /* macquarie dictionary has both spellings */ + {"border", 0, 0, 'b'}, + {"multidisp", 0, 0, 'm'}, + /* toggles */ +@@ -95,6 +97,9 @@ + case 's': + opt.select = 1; + break; ++ case 'u': ++ opt.focused = 1; ++ break; + case '+': + opt.debug_level = atoi(optarg); + break; +@@ -231,6 +236,7 @@ + " and join them together.\n" + " -s, --select interactively choose a window or rectangle\n" + " with the mouse\n" ++ " -u, --focused use the currently focused window\n" + " -t, --thumb NUM generate thumbnail too. NUM is the percentage\n" + " of the original size for the thumbnail to be,\n" + " or the geometry in percent, e.g. 50x60 or 80x20.\n" +diff -u -r scrot-0.8~/src/scrot.h scrot-0.8/src/scrot.h +--- scrot-0.8~/src/scrot.h 2004-04-21 21:15:24.000000000 +1000 ++++ scrot-0.8/src/scrot.h 2004-04-21 22:00:42.000000000 +1000 +@@ -72,7 +72,10 @@ + char *filename_im, char *filename_thumb); + void scrot_do_delay(void); + Imlib_Image scrot_sel_and_grab_image(void); ++Imlib_Image scrot_grab_focused(void); + void scrot_sel_area(int *x, int *y, int *w, int *h); ++void scrot_nice_clip(int *rx, int *ry, int *rw, int *rh); ++int scrot_get_geometry(Window target, int *rx, int *ry, int *rw, int *rh); + Window scrot_get_window(Display *display,Window window,int x,int y); + Window scrot_get_client_window(Display * display, Window target); + Window scrot_find_window_by_property(Display * display, const Window window, +diff -u -r scrot-0.8~/src/main.c scrot-0.8/src/main.c +--- scrot-0.8~/src/main.c 2004-04-21 21:15:24.000000000 +1000 ++++ scrot-0.8/src/main.c 2004-04-21 22:01:27.000000000 +1000 +@@ -48,7 +48,9 @@ + } + + +- if (opt.select) ++ if (opt.focused) ++ image = scrot_grab_focused(); ++ else if (opt.select) + image = scrot_sel_and_grab_image(); + else { + scrot_do_delay(); +@@ -171,6 +173,22 @@ + } + + Imlib_Image ++scrot_grab_focused(void) ++{ ++ Imlib_Image im = NULL; ++ int rx = 0, ry = 0, rw = 0, rh = 0; ++ Window target = None; ++ int ignored; ++ ++ scrot_do_delay(); ++ XGetInputFocus(disp, &target, &ignored); ++ if (!scrot_get_geometry(target, &rx, &ry, &rw, &rh)) return NULL; ++ scrot_nice_clip(&rx, &ry, &rw, &rh); ++ im = gib_imlib_create_image_from_drawable(root, 0, rx, ry, rw, rh, 1); ++ return im; ++} ++ ++Imlib_Image + scrot_sel_and_grab_image(void) + { + Imlib_Image im = NULL; +@@ -313,57 +331,10 @@ + rh = 0 - rh; + } + } else { +- Window child; +- XWindowAttributes attr; +- int stat; +- + /* else it's a window click */ +- /* get geometry of window and use that */ +- /* get windowmanager frame of window */ +- if (target != root) { +- unsigned int d, x; +- int status; +- +- status = XGetGeometry(disp, target, &root, &x, &x, &d, &d, &d, &d); +- if (status != 0) { +- Window rt, *children, parent; +- +- for (;;) { +- /* Find window manager frame. */ +- status = XQueryTree(disp, target, &rt, &parent, &children, &d); +- if (status && (children != None)) +- XFree((char *) children); +- if (!status || (parent == None) || (parent == rt)) +- break; +- target = parent; +- } +- /* Get client window. */ +- if (!opt.border) +- target = scrot_get_client_window(disp, target); +- XRaiseWindow(disp, target); +- } +- } +- stat = XGetWindowAttributes(disp, target, &attr); +- if ((stat == False) || (attr.map_state != IsViewable)) +- return NULL; +- rw = attr.width; +- rh = attr.height; +- XTranslateCoordinates(disp, target, root, 0, 0, &rx, &ry, &child); ++ if (!scrot_get_geometry(target, &rx, &ry, &rw, &rh)) return NULL; + } +- +- /* clip rectangle nicely */ +- if (rx < 0) { +- rw += rx; +- rx = 0; +- } +- if (ry < 0) { +- rh += ry; +- ry = 0; +- } +- if ((rx + rw) > scr->width) +- rw = scr->width - rx; +- if ((ry + rh) > scr->height) +- rh = scr->height - ry; ++ scrot_nice_clip(&rx, &ry, &rw, &rh); + + XBell(disp, 0); + im = gib_imlib_create_image_from_drawable(root, 0, rx, ry, rw, rh, 1); +@@ -371,6 +342,72 @@ + return im; + } + ++/* clip rectangle nicely */ ++void ++scrot_nice_clip(int *rx, ++ int *ry, ++ int *rw, ++ int *rh) ++{ ++ if (*rx < 0) { ++ *rw += *rx; ++ *rx = 0; ++ } ++ if (*ry < 0) { ++ *rh += *ry; ++ *ry = 0; ++ } ++ if ((*rx + *rw) > scr->width) ++ *rw = scr->width - *rx; ++ if ((*ry + *rh) > scr->height) ++ *rh = scr->height - *ry; ++} ++ ++/* get geometry of window and use that */ ++int ++scrot_get_geometry(Window target, ++ int *rx, ++ int *ry, ++ int *rw, ++ int *rh) ++{ ++ Window child; ++ XWindowAttributes attr; ++ int stat; ++ ++ /* get windowmanager frame of window */ ++ if (target != root) { ++ unsigned int d, x; ++ int status; ++ ++ status = XGetGeometry(disp, target, &root, &x, &x, &d, &d, &d, &d); ++ if (status != 0) { ++ Window rt, *children, parent; ++ ++ for (;;) { ++ /* Find window manager frame. */ ++ status = XQueryTree(disp, target, &rt, &parent, &children, &d); ++ if (status && (children != None)) ++ XFree((char *) children); ++ if (!status || (parent == None) || (parent == rt)) ++ break; ++ target = parent; ++ } ++ /* Get client window. */ ++ if (!opt.border) ++ target = scrot_get_client_window(disp, target); ++ XRaiseWindow(disp, target); ++ } ++ } ++ stat = XGetWindowAttributes(disp, target, &attr); ++ if ((stat == False) || (attr.map_state != IsViewable)) ++ return 0; ++ *rw = attr.width; ++ *rh = attr.height; ++ XTranslateCoordinates(disp, target, root, 0, 0, rx, ry, &child); ++ return 1; ++} ++ + Window + scrot_get_window(Display * display, + Window window, --- scrot-0.8.orig/debian/patches/00list +++ scrot-0.8/debian/patches/00list @@ -0,0 +1,7 @@ +01_manpagefix.dpatch +02_options.c.dpatch +003_descmanpage.dpatch +04-focused.dpatch +05-addfocusedmanpage.dpatch +06_manpagespace.dpatch +07_fix-formatstring.dpatch --- scrot-0.8.orig/debian/patches/003_descmanpage.dpatch +++ scrot-0.8/debian/patches/003_descmanpage.dpatch @@ -0,0 +1,17 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 003_descmanpage.dpatch by William Vera +## +## DP: Change the description on manpage. + +@DPATCH@ +diff -urNad scrot-0.8~/scrot.1 scrot-0.8/scrot.1 +--- scrot-0.8~/scrot.1 2001-01-11 11:43:06.000000000 -0600 ++++ scrot-0.8/scrot.1 2009-05-13 06:44:15.000000000 -0500 +@@ -1,6 +1,6 @@ + .TH scrot 1 "Oct 26, 2000" + .SH NAME +-scrot - Screen capture using imlib2 ++scrot - capture a screenshot using imlib2 + .SH SYNOPSIS + scrot [options] [file] + .SH DESCRIPTION --- scrot-0.8.orig/debian/patches/05-addfocusedmanpage.dpatch +++ scrot-0.8/debian/patches/05-addfocusedmanpage.dpatch @@ -0,0 +1,19 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 05-addfocusedmanpage.dpatch by William Vera +## +## DP: Add a new option in the man page (focused option). + +@DPATCH@ +diff -urNad scrot-0.8~/scrot.1 scrot-0.8/scrot.1 +--- scrot-0.8~/scrot.1 2009-05-19 09:33:05.000000000 -0500 ++++ scrot-0.8/scrot.1 2009-05-19 09:37:44.000000000 -0500 +@@ -43,6 +43,9 @@ + .B -s, --select + Interactively select a window or rectangle with the mouse. + .TP 5 ++.B -u, --focused ++Use the currently focused window. ++.TP 5 + .B -t, --thumb NUM + generate thumbnail too. NUM is the percentage of the original size for the + thumbnail to be. --- scrot-0.8.orig/debian/patches/07_fix-formatstring.dpatch +++ scrot-0.8/debian/patches/07_fix-formatstring.dpatch @@ -0,0 +1,22 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 07_fix-formatstring.dpatch by George Danchev +## +## DP: Prevent arbitrary long file names + +@DPATCH@ +diff -urNad scrot-0.8~/src/options.c scrot-0.8/src/options.c +--- scrot-0.8~/src/options.c 2009-10-27 08:11:41.000000000 +0200 ++++ scrot-0.8/src/options.c 2009-10-27 08:12:09.000000000 +0200 +@@ -124,6 +124,12 @@ + if (!opt.output_file) + { + opt.output_file = argv[optind++]; ++ ++ if ( strlen(opt.output_file) > 256 ) { ++ printf("output filename too long.\n"); ++ exit(EXIT_FAILURE); ++ } ++ + if (opt.thumb) + opt.thumb_file = name_thumbnail(opt.output_file); + } --- scrot-0.8.orig/debian/patches/01_manpagefix.dpatch +++ scrot-0.8/debian/patches/01_manpagefix.dpatch @@ -0,0 +1,18 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_manpagefix.dpatch by William Vera +## +## DP: Character cleanup for UTF-8 compatibility. + +@DPATCH@ +diff -urNad scrot-0.8~/scrot.1 scrot-0.8/scrot.1 +--- scrot-0.8~/scrot.1 2001-01-11 11:43:06.000000000 -0600 ++++ scrot-0.8/scrot.1 2008-08-15 00:46:36.000000000 -0500 +@@ -87,7 +87,7 @@ + \\n prints a newline (ignored when used in the filename) + .fi + .SH EXAMPLE +-scrot '%Y-%m-%d_$wx$h.png' -e 'mv $f ~/shots/' ++scrot '%Y\-%m\-%d_$wx$h.png' \-e 'mv $f ~/shots/' + .br + This would create a file called something like + 2000-10-30_2560x1024.png and move it to your shots directory.