]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Cleanup and documentation for ipptool standalone release.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 7 Apr 2010 18:46:04 +0000 (18:46 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Wed, 7 Apr 2010 18:46:04 +0000 (18:46 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@9086 7a7537e8-13f0-0310-91df-b6672ffda945

IPPTOOL.txt [new file with mode: 0644]
README.txt
cups/ipp-support.c
test/get-completed-jobs.test
test/get-jobs.test
tools/makeipptoolpkg [new file with mode: 0755]
tools/makesrcdist

diff --git a/IPPTOOL.txt b/IPPTOOL.txt
new file mode 100644 (file)
index 0000000..c968220
--- /dev/null
@@ -0,0 +1,88 @@
+IPPTOOL.txt - 2010-04-07
+------------------------
+
+
+INTRODUCTION
+
+    Starting with CUPS 1.5, CUPS now installs a user program called
+    ipptool that can be used to send arbitrary IPP requests to a CUPS
+    server or IPP printer. This tool started life as part of the CUPS
+    automated test suite and has grown to support complex conformance
+    tests and a simple way to query printer, job, and subscription
+    attributes.
+
+
+BASIC USAGE
+
+    The ipptool command requires a printer URI and one or more "test"
+    files that describe the operations, attributes to display, and
+    expected status and attribute values. Several standard files are
+    included with CUPS, for example to show a list of pending print jobs
+    on a CUPS printer called "myprinter" you'd run:
+
+        ipptool ipp://localhost/printers/myprinter get-jobs.test
+
+    which would produce something like this:
+
+       job-id job-state    job-name     job-originating-user-name
+       ------ ------------ ------------ -------------------------
+       72     pending      testfile.pdf msweet
+       73     pending      testfile.ps  msweet
+       74     pending-held testfile.jpg msweet
+       75     pending-held testfile.txt msweet
+
+    To get output suitable for import into a spreadsheet, use the "-c"
+    (CSV) option:
+
+        ipptool -c ipp://localhost/printers/myprinter get-jobs.test
+
+    which would produce something like this:
+
+       job-id,job-state,job-name,job-originating-user-name
+       72,pending,testfile.pdf,msweet
+       73,pending,testfile.ps,msweet
+       74,pending-held,testfile.jpg,msweet
+       75,pending-held,testfile.txt,msweet
+
+
+CONFORMANCE TESTS
+
+    We provide basic IPP conformance tests for IPP/1.1, IPP/2.0, and
+    IPP/2.1. For a given printer URI, the following commands perform
+    tests at each level:
+
+        ipptool -t printer-uri ipp-1.1.test
+        ipptool -t -V 2.0 printer-uri ipp-2.0.test
+        ipptool -t -V 2.1 printer-uri ipp-2.1.test
+
+
+READING THE DOCUMENTATION
+
+    The command usage is described in the ipptest(1) man page, while the
+    file format is described in the ipptestfile(5) man page.
+
+
+GETTING SUPPORT AND OTHER RESOURCES
+
+    If you have problems, READ THE DOCUMENTATION FIRST!  We also provide many
+    discussion forums which are available at:
+
+       http://www.cups.org/newsgroups.php
+
+    See the CUPS web site at "http://www.cups.org/" for other resources.
+
+
+LEGAL STUFF
+
+    CUPS is Copyright 2007-2010 by Apple Inc.  CUPS and the CUPS logo are
+    trademarks of Apple Inc.
+
+    The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
+
+    This software is based in part on the work of the Independent JPEG Group.
+
+    CUPS is provided under the terms of version 2 of the GNU General Public
+    License and GNU Library General Public License. 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 "doc/help/license.html" or "LICENSE.txt" files for more information.
index 138fc928714fe911b8e281e367b1b89c78f85b49..d0a8957b53cd0c376aef83de05826f0cc9af18b4 100644 (file)
@@ -1,5 +1,5 @@
-README - CUPS v1.4.0 - 2009-06-26
----------------------------------
+README - CUPS v1.5svn - 2010-04-07
+----------------------------------
 
 Looking for compile instructions?  Read the file "INSTALL.txt"
 instead...
@@ -150,7 +150,7 @@ PRINTING FILES
 
 LEGAL STUFF
 
-    CUPS is Copyright 2007-2009 by Apple Inc.  CUPS and the CUPS logo are
+    CUPS is Copyright 2007-2010 by Apple Inc.  CUPS and the CUPS logo are
     trademarks of Apple Inc.
 
     The MD5 Digest code is Copyright 1999 Aladdin Enterprises.
index aa0ad0c630e2eca27217b643b4c04073f0854f5f..88a09dac159881fa67d61dac7eb9182bc83ebd77 100644 (file)
@@ -272,7 +272,7 @@ static const char * const job_states[] =
   "pending",
   "pending-held",
   "processing",
-  "processing-stopped"
+  "processing-stopped",
   "canceled",
   "aborted",
   "completed"
index 84ce9e6bcfd3f6b23e84396c385a9959205a4bcf..9d8ebb40ce4c174520a17534595cd44f7a93e887 100644 (file)
@@ -14,7 +14,7 @@
 #
 # Usage:
 #
-#   ./ipptool printer-uri get-jobs.test
+#   ./ipptool printer-uri get-completed-jobs.test
 #
 
 
        ATTR uri printer-uri $uri
        ATTR keyword which-jobs completed
        ATTR keyword requested-attributes
-            job-id,job-name,document-format,job-media-sheets-completed,job-originating-user-name
+            job-id,job-state,job-name,job-originating-user-name,job-media-sheets-completed
 
        # What statuses are OK?
        STATUS successful-ok
 
        # What attributes to display
        DISPLAY job-id
+       DISPLAY job-state
        DISPLAY job-name
-       DISPLAY document-format
-       DISPLAY job-media-sheets-completed
        DISPLAY job-originating-user-name
+       DISPLAY job-media-sheets-completed
 }
 
 
index 212b3fbc2fad8e269a083113b744fb51e8485037..b40ea15d9f8f6e327e02dc9c662df84d258b5129 100644 (file)
        ATTR language attributes-natural-language en
        ATTR uri printer-uri $uri
        ATTR keyword requested-attributes
-            job-id,job-name,document-format,job-media-sheets-completed,job-originating-user-name
+            job-id,job-state,job-name,job-originating-user-name
 
        # What statuses are OK?
        STATUS successful-ok
 
        # What attributes to display
        DISPLAY job-id
+       DISPLAY job-state
        DISPLAY job-name
-       DISPLAY document-format
-       DISPLAY job-media-sheets-completed
        DISPLAY job-originating-user-name
 }
 
diff --git a/tools/makeipptoolpkg b/tools/makeipptoolpkg
new file mode 100755 (executable)
index 0000000..ab27661
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+# "$Id$"
+#
+#   Make an ipptool package for CUPS.
+#
+#   Copyright 2007-2010 by Apple Inc.
+#   Copyright 1997-2007 by Easy Software Products, all rights reserved.
+#
+#   These coded instructions, statements, and computer programs are the
+#   property of Apple Inc. and are protected by Federal copyright
+#   law.  Distribution and use rights are outlined in the file "LICENSE.txt"
+#   which should have been included with this file.  If this file is
+#   file is missing or damaged, see the license at "http://www.cups.org/".
+#
+
+# Make sure we are running in the right directory...
+if test ! -f tools/makeipptoolpkg; then
+        echo "Run this script from the top-level CUPS source directory, e.g.:"
+        echo ""
+        echo "    tools/makeipptoolpkg $*"
+        echo ""
+        exit 1
+fi
+
+if test $# = 0; then
+       echo Updating to get snapshot version...
+       svn up
+       rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
+       fileversion="1.5svn-r$rev"
+       version=snapshot
+else
+       fileversion=$1
+       version=$1
+fi
+
+if (svn st | grep -qv '^\?'); then
+       echo Local changes remain:
+       svn st | grep -v '^\?'
+       exit 1
+fi
+
+echo Creating package directory...
+pkgdir="ipptool-$fileversion"
+
+test -d $pkgdir && rm -r $pkgdir || exit 1
+mkdir $pkgdir || exit 1
+
+echo Copying package files
+cp IPPTOOL.txt LICENSE.txt $pkgdir
+cp test/create-printer-subscription.test $pkgdir
+cp test/get-completed-jobs.test test/get-jobs.test $pkgdir
+cp test/ipp-*.test $pkgdir
+cp test/ipptool-static $pkgdir/ipptool
+cp test/testfile.* $pkgdir
+
+if test `uname` = Darwin; then
+       echo Creating disk image...
+       pkgfile="$pkgdir.dmg"
+       test -f $pkgfile && rm $pkgfile || exit 1
+       hdiutil create -srcfolder $pkgdir $pkgfile || exit 1
+else
+       echo Creating archive...
+       pkgfile="$pkgdir.tar.gz"
+       tar czf $pkgfile $pkgdir || exit 1
+fi
+
+if test -x /usr/bin/md5sum; then
+        (md5sum $pkgfile | awk '{print $1, "'$fileversion' cups/'$version'/" $2}')
+elif test -x /sbin/md5; then
+        (md5 $pkgfile | awk '{print $4, "'$fileversion' cups/'$version'/" substr($2, 2, length($2) - 2)}')
+fi
+
+echo Removing temporary files...
+#rm -r $pkgdir
+
+echo "Done!"
+
+#
+# End of "$Id$".
+#
index 94c7fa5adecae7418f98712ffe3e16712f8bc145..ae09fd0f6af8149be06f12c758f493fd469fe78b 100755 (executable)
@@ -18,10 +18,10 @@ if test $# = 0; then
        echo Updating for snapshot...
        svn up
        rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
-       version="1.4svn"
+       version="1.5svn"
        revision="-r$rev"
-       fileversion="1.4svn-r$rev"
-       fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar."
+       fileversion="1.5svn-r$rev"
+       fileurl="http://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar."
        url="."
 else
        echo Creating tag for release...
@@ -29,7 +29,7 @@ else
        version=$1
        revision=""
        fileversion=$1
-       fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar."
+       fileurl="http://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar."
        url="https://svn.easysw.com/public/cups/tags/release-$version"
 
        svn copy https://svn.easysw.com/public/cups/trunk "$url" \