diff options
-rw-r--r-- | debian/INSTALL.Debian | 26 | ||||
-rw-r--r-- | debian/changelog | 193 | ||||
-rw-r--r-- | debian/control | 27 | ||||
-rw-r--r-- | debian/control.xsane | 27 | ||||
-rw-r--r-- | debian/control.xsane-gimp1.1 | 30 | ||||
-rw-r--r-- | debian/copyright | 17 | ||||
-rw-r--r-- | debian/doc-base-xsane | 15 | ||||
-rw-r--r-- | debian/doc-base-xsane-gimp1.1 | 15 | ||||
-rw-r--r-- | debian/menu.xsane | 5 | ||||
-rw-r--r-- | debian/menu.xsane-gimp1.1 | 5 | ||||
-rw-r--r-- | debian/postinst.xsane | 11 | ||||
-rw-r--r-- | debian/postinst.xsane-gimp1.1 | 12 | ||||
-rw-r--r-- | debian/postrm.xsane | 3 | ||||
-rw-r--r-- | debian/postrm.xsane-gimp1.1 | 3 | ||||
-rw-r--r-- | debian/prerm.xsane | 12 | ||||
-rw-r--r-- | debian/prerm.xsane-gimp1.1 | 11 | ||||
-rwxr-xr-x | debian/rules | 135 | ||||
-rw-r--r-- | debian/substvar-gimp1.1 | 1 | ||||
-rw-r--r-- | debian/substvars | 1 | ||||
-rw-r--r-- | frontend/xsane-back-gtk.c | 2 | ||||
-rw-r--r-- | frontend/xsane.c | 35 | ||||
-rw-r--r-- | frontend/xsane.h | 4 |
22 files changed, 589 insertions, 1 deletions
diff --git a/debian/INSTALL.Debian b/debian/INSTALL.Debian new file mode 100644 index 0000000..4937c05 --- /dev/null +++ b/debian/INSTALL.Debian @@ -0,0 +1,26 @@ +xsane and xsane-gimp1.1 are almost identical, with the exception of +rules and changelog. To change rules and changelog to make an xsane +package, type: + + ./debian/rules xsane-files + +To change rules and changelog to make an xsane-gimp1.1 package, type: + + ./debian/rules xsane-gimp1.1-files + + +The first line of changelog should list the package as "xsane" or +"xsane-gimp1.1" for the respective packages. + +In rules, the "package =" and "gimp-version =" lines should be changed +as follows: + +for xsane: + +package = xsane +gimp-version=1.0 + + or + +package = xsane-gimp1.1 +gimp-version=1.1 diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..62daa58 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,193 @@ +xsane (0.50-5.1) stable; urgency=high + + * Non-maintainer upload by Security Team + * Fixed several temporary file vulnerabilities by introducing + /tmp/xsane-${LOGNAME:-$UID} as location for all temporary files, + created securely upon startup. + + -- Martin Schulze <joey@finlandia.infodrom.north.de> Mon, 4 Mar 2002 18:50:02 +0100 + +xsane (0.50-5) frozen unstable; urgency=low + + * added to Build-Depends: libjpeg62-dev, libsane-dev, zlib1g-dev, + libtiff3g-dev, libpng2-dev (closes: #61836, #61837) + + -- Kevin Dalley <kevind@rahul.net> Wed, 5 Apr 2000 08:35:17 -0700 + +xsane-gimp1.1 (0.50-4) frozen unstable; urgency=low + + * Add Build-Depends to control files for xsane and xsane-gimp1.1 (closes: + #60923). + + -- Kevin Dalley <kevind@rahul.net> Mon, 27 Mar 2000 03:17:21 -0800 + +xsane (0.50-3) frozen unstable; urgency=low + + * link xsane-gimp1.1 with libgimp1.1.17, which is the most recent + libgimp1.1 in frozen. + + -- Kevin Dalley <kevind@rahul.net> Mon, 28 Feb 2000 02:34:45 +0000 + +xsane (0.50-2) frozen unstable; urgency=low + + * link xsane-gimp1.1 with libgimp1.1.15, which is the most recent + libgimp1.1 in frozen. + + -- Kevin Dalley <kevind@rahul.net> Sat, 22 Jan 2000 02:00:21 -0800 + +xsane (0.50-1) unstable; urgency=low + + * fixed a number of bugs in 0.49 + * xsane now conflicts with gimp1.1, which increases the chances of + getting the correct versions of gimp with each version of xsane. + Unfortunately, xsane-gimp1.1 cannot conflict with gimp, since gimp1.1 + provides gimp. + + -- Kevin Dalley <kevind@rahul.net> Sun, 16 Jan 2000 11:32:55 -0800 + +xsane (0.49-1) unstable; urgency=low + + * removed LZW compression from TIFF. + * many other changes and updates. + * fixed html link (closes: #51107). + + -- Kevin Dalley <kevind@rahul.net> Sun, 9 Jan 2000 23:03:58 -0800 + +xsane (0.42-1) unstable; urgency=low + + * fixed problem with saving file to png + + -- Kevin Dalley <kevind@rahul.net> Sun, 7 Nov 1999 03:05:56 -0800 + +xsane (0.41-2) unstable; urgency=low + + * corrected link to xsane which is by gimp + + -- Kevin Dalley <kevind@rahul.net> Mon, 1 Nov 1999 14:24:15 -0800 + +xsane-gimp1.1 (0.41-1) unstable; urgency=low + + * various small fixes. + * moved documentation to /usr/share/doc (closes: #37791). + * registers xsane documentation with doc-base. + + -- Kevin Dalley <kevind@rahul.net> Sun, 31 Oct 1999 05:37:48 -0800 + +xsane (0.40-1) unstable; urgency=low + + * new release of xsane + + -- Kevin Dalley <kevind@rahul.net> Sun, 24 Oct 1999 13:37:12 -0700 + +xsane (0.39-2) unstable; urgency=low + + * corrected documentation link for xsane-gimp1.1 + + -- Kevin Dalley <kevind@rahul.net> Fri, 15 Oct 1999 10:06:15 -0700 + +xsane (0.39-1) unstable; urgency=low + + * new upstream release + + -- Kevin Dalley <kevind@rahul.net> Fri, 15 Oct 1999 01:30:15 -0700 + +xsane (0.38-1) unstable; urgency=low + + * changed brightness and contrast range maximum form 300 to 400 % + * added continuous update to histogram sliders and preview selection + + -- Kevin Dalley <kevind@rahul.net> Sun, 10 Oct 1999 12:25:17 -0700 + +xsane (0.37-1) unstable; urgency=low + + * implemented real single-bit format for tiff + * setup/jpeg quality selection is enabled if jpeglib or libtiff is available + * miscellaneous other bug fixes and enhancements. + * separate sane-gimp1.1 from xsane + + -- Kevin Dalley <kevind@rahul.net> Sun, 10 Oct 1999 04:40:11 -0700 + +xsane (0.33-2) unstable; urgency=low + + * link xsane-gimp1.1 with libgimp-1.1.so.7 (closes: #44512) + + -- Kevin Dalley <kevind@rahul.net> Wed, 8 Sep 1999 15:29:25 -0700 + +xsane (0.33-1) unstable; urgency=low + + * updated to version 0.33 of xsane + + -- Kevin Dalley <kevind@rahul.net> Sat, 28 Aug 1999 14:07:06 -0700 + +xsane (0.31-1) unstable; urgency=low + + * added support for Automatic Document Feeder (scan until error) + * many other changes + + -- Kevin Dalley <kevind@rahul.net> Mon, 2 Aug 1999 23:14:58 -0700 + +xsane (0.30-1) unstable; urgency=low + + * pipette functions: middle mouse button defines shadow/gray/highlight + for color components, left mouse button only defines gray values! + * improved calculation of auto enhancement values + * many more improvements + + -- Kevin Dalley <kevind@rahul.net> Fri, 23 Jul 1999 00:10:42 -0700 + +xsane (0.29-1) unstable; urgency=low + + * xsane-mode can be selected as command line option + * fixed bugs + + -- Kevin Dalley <kevind@rahul.net> Fri, 16 Jul 1999 18:41:39 -0700 + +xsane (0.28-2) unstable; urgency=low + + * change in xsane-front-gtk.c prevents core dump in fax with some + scanners. + + -- Kevin Dalley <kevind@rahul.net> Tue, 13 Jul 1999 00:29:36 -0700 + +xsane (0.28-1) unstable; urgency=low + + * increased contrast to improve scanning of negatives + * added selection for number of copies in copy mode + * added option negative into enhancement and changed create_gamma + draw_histogram and auto_enhancement to work with it! + + -- Kevin Dalley <kevind@rahul.net> Sun, 11 Jul 1999 11:55:21 -0700 + +xsane (0.27-1) unstable; urgency=low + + * user can now reduce the preview area. + * fax options are saved. + + -- Kevin Dalley <kevind@rahul.net> Fri, 2 Jul 1999 00:44:28 -0700 + +xsane (0.26-1) unstable; urgency=low + + * added Pipette functions (pick black, gray and white) - mouse pointer + does change to pipetty icon + * many other changes. + * Now explicitly depends upon libsane, if compiled with fixed version of + sane (1.0.1-3). + * closes: #37756. + + -- Kevin Dalley <kevind@rahul.net> Sun, 27 Jun 1999 11:46:47 -0700 + +xsane (0.25-1) unstable; urgency=low + + * miscellaneous changes, updated release + + -- Kevin Dalley <kevind@rahul.net> Wed, 19 May 1999 01:40:40 -0700 + +xsane (0.22-1) unstable; urgency=low + + * first Debian release of xsane, a gtk based X11 frontend for SANE + + -- Kevin Dalley <kevind@rahul.net> Mon, 26 Apr 1999 23:03:13 -0700 + +Local variables: +mode: debian-changelog +End: diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..73d0e90 --- /dev/null +++ b/debian/control @@ -0,0 +1,27 @@ +Source: xsane +Section: graphics +Priority: optional +Maintainer: Kevin Dalley <kevind@rahul.net> +Standards-Version: 3.0.0 +Build-Depends: libgimp-dev, libjpeg62-dev, libsane-dev, zlib1g-dev, libtiff3g-dev, libpng2-dev + +Package: xsane +Section: graphics +Architecture: any +Depends: ${shlibs:Depends} +Suggests: gimp (>= 1.0.0), hylafax-client | mgetty-fax +Conflicts: xsane-gimp1.1, gimp1.1 +Description: a gtk based X11 frontend for SANE (Scanner Access Now Easy) + SANE stands for "Scanner Access Now Easy" and is an application + programming interface (API) that provides standardized access to any + raster image scanner hardware (flatbed scanner, hand-held scanner, + video- and still-cameras, frame-grabbers, etc.). The SANE standard is + free and its discussion and development is open to everybody. The + current source code is written for UNIX (including Linux) and is + available under the GNU public license (commercial application and + backends are welcome, too, however). + . + xsane can be run as a stand-alone program or through the GIMP image + manipulation program. In stand-alone mode, xsane can save an image + to a file in a variety of image formats, or serve as a frontend to a + fax program, or send an image to a printer. diff --git a/debian/control.xsane b/debian/control.xsane new file mode 100644 index 0000000..73d0e90 --- /dev/null +++ b/debian/control.xsane @@ -0,0 +1,27 @@ +Source: xsane +Section: graphics +Priority: optional +Maintainer: Kevin Dalley <kevind@rahul.net> +Standards-Version: 3.0.0 +Build-Depends: libgimp-dev, libjpeg62-dev, libsane-dev, zlib1g-dev, libtiff3g-dev, libpng2-dev + +Package: xsane +Section: graphics +Architecture: any +Depends: ${shlibs:Depends} +Suggests: gimp (>= 1.0.0), hylafax-client | mgetty-fax +Conflicts: xsane-gimp1.1, gimp1.1 +Description: a gtk based X11 frontend for SANE (Scanner Access Now Easy) + SANE stands for "Scanner Access Now Easy" and is an application + programming interface (API) that provides standardized access to any + raster image scanner hardware (flatbed scanner, hand-held scanner, + video- and still-cameras, frame-grabbers, etc.). The SANE standard is + free and its discussion and development is open to everybody. The + current source code is written for UNIX (including Linux) and is + available under the GNU public license (commercial application and + backends are welcome, too, however). + . + xsane can be run as a stand-alone program or through the GIMP image + manipulation program. In stand-alone mode, xsane can save an image + to a file in a variety of image formats, or serve as a frontend to a + fax program, or send an image to a printer. diff --git a/debian/control.xsane-gimp1.1 b/debian/control.xsane-gimp1.1 new file mode 100644 index 0000000..27e6124 --- /dev/null +++ b/debian/control.xsane-gimp1.1 @@ -0,0 +1,30 @@ +Source: xsane-gimp1.1 +Section: graphics +Priority: optional +Maintainer: Kevin Dalley <kevind@rahul.net> +Standards-Version: 3.0.0 +Build-Depends: libgimp1.1.17-dev, libjpeg62-dev, libsane-dev, zlib1g-dev, libtiff3g-dev, libpng2-dev + +Package: xsane-gimp1.1 +Section: graphics +Architecture: any +Depends: ${shlibs:Depends} +Conflicts: xsane +Suggests: gimp1.1 (>= 1.0.0), hylafax-client | mgetty-fax +Description: a gtk based X11 frontend for SANE (Scanner Access Now Easy) + SANE stands for "Scanner Access Now Easy" and is an application + programming interface (API) that provides standardized access to any + raster image scanner hardware (flatbed scanner, hand-held scanner, + video- and still-cameras, frame-grabbers, etc.). The SANE standard is + free and its discussion and development is open to everybody. The + current source code is written for UNIX (including Linux) and is + available under the GNU public license (commercial application and + backends are welcome, too, however). + . + xsane can be run as a stand-alone program or through the GIMP image + manipulation program. In stand-alone mode, xsane can save an image + to a file in a variety of image formats, or serve as a frontend to a + fax program, or send an image to a printer. + . + This is the unstable 1.1 branch of GIMP. It is not intended for use + with stable projects! diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e2fd5b8 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,17 @@ +This package was debianized by Kevin Dalley kevind@rahul.net. + +The primary author of xsane is Oliver.Rauch@Wolfsburg.DE +(Oliver.Rauch). More information is in xsane.AUTHOR. + +It was downloaded from: + +http://www.wolfsburg.de/~rauch/sane/ + + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses'. diff --git a/debian/doc-base-xsane b/debian/doc-base-xsane new file mode 100644 index 0000000..5159f67 --- /dev/null +++ b/debian/doc-base-xsane @@ -0,0 +1,15 @@ +Document: xsane +Title: Xsane +Author: Oliver Rauch +Abstract: This manual describes how to use xsane as a frontend to + hardware scanners. Xsane is a gtk based X11 frontend for SANE + (Scanner Access Now Easy). SANE stands for "Scanner Access Now Easy" + and is an application programming interface (API) that provides + standardized access to any raster image scanner hardware (flatbed + scanner, hand-held scanner, video- and still-cameras, frame-grabbers, + etc.). +Section: Apps/Graphics + +Format: html +Index: /usr/share/doc/xsane/sane/sane-xsane-doc.html +Files: /usr/share/doc/xsane/sane/*.html diff --git a/debian/doc-base-xsane-gimp1.1 b/debian/doc-base-xsane-gimp1.1 new file mode 100644 index 0000000..d65db65 --- /dev/null +++ b/debian/doc-base-xsane-gimp1.1 @@ -0,0 +1,15 @@ +Document: xsane +Title: Xsane +Author: Oliver Rauch +Abstract: This manual describes how to use xsane as a frontend to + hardware scanners. Xsane is a gtk based X11 frontend for SANE + (Scanner Access Now Easy). SANE stands for "Scanner Access Now Easy" + and is an application programming interface (API) that provides + standardized access to any raster image scanner hardware (flatbed + scanner, hand-held scanner, video- and still-cameras, frame-grabbers, + etc.). +Section: Apps/Graphics + +Format: html +Index: /usr/share/doc/xsane-gimp1.1/sane/sane-xsane-doc.html +Files: /usr/share/doc/xsane-gimp1.1/sane/*.html diff --git a/debian/menu.xsane b/debian/menu.xsane new file mode 100644 index 0000000..7dfc1fa --- /dev/null +++ b/debian/menu.xsane @@ -0,0 +1,5 @@ +?package(xsane):command="/usr/bin/xsane" needs="X11" \ + section="Apps/Graphics" title="xsane" \ + description="xsane provides a graphical \ + user-interface to control an image acquisition device \ + such as a flatbed scanner or a camera." diff --git a/debian/menu.xsane-gimp1.1 b/debian/menu.xsane-gimp1.1 new file mode 100644 index 0000000..7a8b362 --- /dev/null +++ b/debian/menu.xsane-gimp1.1 @@ -0,0 +1,5 @@ +?package(xsane-gimp1.1):command="/usr/bin/xsane" needs="X11" \ + section="Apps/Graphics" title="xsane" \ + description="xsane provides a graphical \ + user-interface to control an image acquisition device \ + such as a flatbed scanner or a camera." diff --git a/debian/postinst.xsane b/debian/postinst.xsane new file mode 100644 index 0000000..8ab57e9 --- /dev/null +++ b/debian/postinst.xsane @@ -0,0 +1,11 @@ +#!/bin/sh +set -e +if [ -x /usr/bin/update-menus ] ; then update-menus ; fi +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/xsane -a -d /usr/share/doc/xsane ]; then + ln -sf ../share/doc/xsane /usr/doc/xsane + fi + if command -v install-docs >/dev/null 2>&1; then + install-docs -i /usr/share/doc-base/xsane + fi +fi diff --git a/debian/postinst.xsane-gimp1.1 b/debian/postinst.xsane-gimp1.1 new file mode 100644 index 0000000..54f80ba --- /dev/null +++ b/debian/postinst.xsane-gimp1.1 @@ -0,0 +1,12 @@ +#!/bin/sh +set -e +if [ -x /usr/bin/update-menus ] ; then update-menus ; fi +if [ "$1" = "configure" ]; then + if [ -d /usr/doc -a ! -e /usr/doc/xsane-gimp1.1 -a \ + -d /usr/share/doc/xsane-gimp1.1 ]; then + ln -sf ../share/doc/xsane-gimp1.1 /usr/doc/xsane-gimp1.1 + fi + if command -v install-docs >/dev/null 2>&1; then + install-docs -i /usr/share/doc-base/xsane + fi +fi diff --git a/debian/postrm.xsane b/debian/postrm.xsane new file mode 100644 index 0000000..40590c4 --- /dev/null +++ b/debian/postrm.xsane @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ -x /usr/bin/update-menus ] ; then update-menus ; fi diff --git a/debian/postrm.xsane-gimp1.1 b/debian/postrm.xsane-gimp1.1 new file mode 100644 index 0000000..40590c4 --- /dev/null +++ b/debian/postrm.xsane-gimp1.1 @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ -x /usr/bin/update-menus ] ; then update-menus ; fi diff --git a/debian/prerm.xsane b/debian/prerm.xsane new file mode 100644 index 0000000..4dcaecf --- /dev/null +++ b/debian/prerm.xsane @@ -0,0 +1,12 @@ +#!/bin/sh + +set -e + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a -L /usr/doc/xsane ]; then + rm -f /usr/doc/xsane +fi +if [ "$1" = "upgrade" -o "$1" = "remove" ]; then + if command -v install-docs >/dev/null 2>&1; then + install-docs -r xsane + fi +fi diff --git a/debian/prerm.xsane-gimp1.1 b/debian/prerm.xsane-gimp1.1 new file mode 100644 index 0000000..d1beb2d --- /dev/null +++ b/debian/prerm.xsane-gimp1.1 @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if [ \( "$1" = "upgrade" -o "$1" = "remove" \) -a \ + -L /usr/doc/xsane-gimp1.1 ]; then + rm -f /usr/doc/xsane-gimp1.1 + if command -v install-docs >/dev/null 2>&1; then + install-docs -r xsane + fi +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..898556d --- /dev/null +++ b/debian/rules @@ -0,0 +1,135 @@ +#!/usr/bin/make -f +# Sample debian.rules file - for GNU Hello (1.3). +# Copyright 1994,1995 by Ian Jackson. +# I hereby give you perpetual unlimited permission to copy, +# modify and relicense this file, provided that you do not remove +# my name from the file itself. (I assert my moral right of +# paternity under the Copyright, Designs and Patents Act 1988.) +# This file may have to be extensively modified +# Copyright 1996 by Kevin Dalley +# + + +CC = gcc +CFLAGS = -O2 -g +# LDFLAGS = -s LDFLAGS is not correctly defined in Makefile.in +prefix=/usr +package=xsane +gimp-version=1.0 + +build: + $(checkdir) + -rm -f debian/control + cp debian/control.$(package) debian/control + ./configure --prefix=$(prefix) --sysconfdir=/etc \ + --datadir='$$(prefix)/share/doc/$(package)' \ + --mandir='$$(prefix)/share/man' + $(MAKE) CC="$(CC)" CFLAGS="$(CFLAGS)" + touch build + +clean: + $(checkdir) + -rm -f build + -$(MAKE) -i distclean || $(MAKE) -f Makefile.in distclean + -rm -rf *~ debian/*~ debian/files* + -rm -rf debian/tmp-xsane debian/tmp-xsane-gimp1.1 + -rm -f debian/control + cp debian/control.$(package) debian/control + +binary-indep: checkroot build + $(checkdir) + +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: checkroot build + $(checkdir) + -rm -rf debian/tmp-xsane debian/tmp-xsane-gimp1.1 + install -d debian/tmp-$(package) debian/tmp-$(package)/DEBIAN + install -d debian/tmp-$(package)$(prefix)/share/doc/$(package) + install -d debian/tmp-$(package)$(prefix)/bin + install debian/postrm.$(package) debian/tmp-$(package)/DEBIAN/postrm + install debian/prerm.$(package) debian/tmp-$(package)/DEBIAN/prerm + install debian/postinst.$(package) debian/tmp-$(package)/DEBIAN/postinst + install -d debian/tmp-$(package)/usr/share/doc-base + install -m 0644 debian/doc-base-$(package) \ + debian/tmp-$(package)/usr/share/doc-base/xsane + $(MAKE) prefix=`pwd`/debian/tmp-$(package)$(prefix) \ + sysconfdir=`pwd`/debian/tmp-$(package)/etc \ + CC="$(CC)" CFLAGS="$(CFLAGS)" \ + INSTALL_PROGRAM='install -s' \ + install + install -d debian/tmp-$(package)$(prefix)/lib/gimp/$(gimp-version)/plug-ins + ln -sf ../../../../bin/xsane \ + debian/tmp-$(package)$(prefix)/lib/gimp/$(gimp-version)/plug-ins + for file in xsane.AUTHOR xsane.CHANGES \ + xsane.IMAGE xsane.LANGUAGES xsane.ONLINEHELP \ + xsane.PROBLEMS xsane.TODO \ + xsane-*.lsm; \ + do \ + install -m 644 $${file} \ + debian/tmp-$(package)$(prefix)/share/doc/$(package); \ + gzip -9v debian/tmp-$(package)$(prefix)/share/doc/$(package)/$${file}; \ + done + ln -s xsane.CHANGES.gz \ + debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.gz + ln -s ../sane \ + debian/tmp-$(package)$(prefix)/share/doc/$(package)/html + gzip -9v debian/tmp-$(package)$(prefix)/share/man/man[15]/* + install -m 0644 debian/copyright debian/tmp-$(package)$(prefix)/share/doc/$(package)/. + install -m 0644 debian/changelog \ + debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.Debian + gzip -9v \ + debian/tmp-$(package)$(prefix)/share/doc/$(package)/changelog.Debian + install -d debian/tmp-$(package)/usr/lib/menu + install -m 0644 debian/menu.$(package) debian/tmp-$(package)/usr/lib/menu/$(package) + dpkg-shlibdeps debian/tmp-$(package)$(prefix)/bin/* + strip debian/tmp-$(package)$(prefix)/bin/* + dpkg-gencontrol -isp -p$(package) -Pdebian/tmp-$(package) + dpkg --build debian/tmp-$(package) .. + +define checkdir + test -f xsane.INSTALL -a -f debian/rules +endef + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +source diff: + @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false + +checkroot: + $(checkdir) + test root = "`whoami`" + +# change files so that xsane-gimp1.1 will be built +xsane-gimp1.1-files: + $(checkdir) + rm -f debian/changelog.new + sed -e'1,1s/xsane /xsane-gimp1.1 /' debian/changelog > \ + debian/changelog.new + mv debian/changelog.new debian/changelog + rm -f debian/rules.new + sed -e's/^package=xsane$$/package=xsane-gimp1.1/' \ + -e 's/^gimp-version=1.0$$/gimp-version=1.1/' debian/rules > \ + debian/rules.new + mv debian/rules.new debian/rules + chmod a+x debian/rules + +# change files so that xsane will be built +xsane-files: + $(checkdir) + rm -f debian/changelog.new + sed -e'1,1s/xsane-gimp1.1 /xsane /' debian/changelog > \ + debian/changelog.new + mv debian/changelog.new debian/changelog + rm -f debian/rules.new + sed -e's/^package=xsane-gimp1.1$$/package=xsane/' \ + -e 's/^gimp-version=1.1$$/gimp-version=1.0/' debian/rules > \ + debian/rules.new + mv debian/rules.new debian/rules + chmod a+x debian/rules + +.PHONY: binary binary-arch binary-indep clean checkroot diff --git a/debian/substvar-gimp1.1 b/debian/substvar-gimp1.1 new file mode 100644 index 0000000..4219b4f --- /dev/null +++ b/debian/substvar-gimp1.1 @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.1), libgimp1.1.7 (>= 1.1.7-1), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.4-2), libjpeg62, libpng2, libsane (>= 1.0.1-3), libtiff3g, xlib6g (>= 3.3.4-1), zlib1g (>= 1:1.1.3) diff --git a/debian/substvars b/debian/substvars new file mode 100644 index 0000000..3bb265a --- /dev/null +++ b/debian/substvars @@ -0,0 +1 @@ +shlibs:Depends=libc6 (>= 2.1.2), libgimp1.1.17 (>= 1.1.17-3), libglib1.2 (>= 1.2.0), libgtk1.2 (>= 1.2.7-1), libjpeg62, libpng2, libsane (>= 1.0.1-1999-10-21-7), libtiff3g, libz1, xlib6g (>= 3.3.6) diff --git a/frontend/xsane-back-gtk.c b/frontend/xsane-back-gtk.c index 8bde762..b77b585 100644 --- a/frontend/xsane-back-gtk.c +++ b/frontend/xsane-back-gtk.c @@ -110,7 +110,7 @@ int xsane_back_gtk_make_path(size_t buf_size, char *buf, } else /* make path to temporary file */ { - snprintf(buf, buf_size, "%s", PATH_SANE_TMP); + snprintf(buf, buf_size, "%s", path_sane_tmp); } len = strlen(buf); diff --git a/frontend/xsane.c b/frontend/xsane.c index 6302168..89a54a0 100644 --- a/frontend/xsane.c +++ b/frontend/xsane.c @@ -44,6 +44,11 @@ /* ---------------------------------------------------------------------------------------------------------------------- */ +char *path_sane_tmp = NULL; +extern int errno; + +/* ---------------------------------------------------------------------------------------------------------------------- */ + struct option long_options[] = { {"help", no_argument, 0, 'h'}, @@ -4685,9 +4690,39 @@ void xsane_interface(int argc, char **argv) int main(int argc, char **argv) { + int len; + char *login; + struct stat st; + dialog = 0; memset(&xsane, 0, sizeof(xsane)); /* set all values in xsane to 0 */ + /* Create directory PATH_SANE_TMP/xsane-$uid */ + login = getlogin (); + if (login == NULL) { + if ((login = (char *)malloc (10)) == NULL) + return 1; + snprintf (login, 10, "%d", getuid ()); + } + + len = strlen (login) + strlen (PATH_SANE_TMP) + 8; + if ((path_sane_tmp = (char *)malloc (len)) == NULL) + return 1; + sprintf (path_sane_tmp, "%s/xsane-%s", PATH_SANE_TMP, login); + + if (lstat (path_sane_tmp, &st)) { + if (errno == ENOENT) { + if (mkdir (path_sane_tmp, 0700)) + return 1; /* Can't create dir, huh? */ + } else + return 1; /* Can't stat, huh? */ + } else { + if (st.st_uid != getuid()) { + fprintf (stderr, "%s not owned by you, security problem?\n", path_sane_tmp); + return 1; + } + } + umask(XSANE_DEFAULT_UMASK); /* define permissions of new files */ xsane.sensitivity = TRUE; diff --git a/frontend/xsane.h b/frontend/xsane.h index 69e6d2c..ad82912 100644 --- a/frontend/xsane.h +++ b/frontend/xsane.h @@ -144,6 +144,10 @@ extern int xsane_scanmode_number[]; /* ---------------------------------------------------------------------------------------------------------------------- */ +extern char *path_sane_tmp; + +/* ---------------------------------------------------------------------------------------------------------------------- */ + #ifndef PATH_MAX # define PATH_MAX 1024 #endif |