5 # Make an ipptool package for CUPS.
7 # Copyright 2007-2013 by Apple Inc.
8 # Copyright 1997-2007 by Easy Software Products, all rights reserved.
10 # These coded instructions, statements, and computer programs are the
11 # property of Apple Inc. and are protected by Federal copyright
12 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 # which should have been included with this file. If this file is
14 # file is missing or damaged, see the license at "http://www.cups.org/".
17 # Make sure we are running in the right directory...
18 if test ! -f tools
/makeipptoolpkg
; then
19 echo "Run this script from the top-level CUPS source directory, e.g.:"
21 echo " tools/makeipptoolpkg $*"
26 uname
="`uname | awk '{print tolower($1)}'`"
27 if test "x$1" = xlsb
; then
33 echo Updating to get snapshot version...
35 rev=`svn info . | grep Revision | awk '{print $2}'`
36 fileversion
="`date '+%Y%m%d'`-r$rev"
41 if (svn st |
grep -qv '^\?'); then
42 echo Local changes remain
:
43 svn st |
grep -v '^\?'
47 echo Creating package directory...
48 pkgdir
="ipptool-$fileversion"
50 test -d $pkgdir && rm -r $pkgdir
51 mkdir
$pkgdir ||
exit 1
53 echo Copying package files
54 cp CHANGES-IPPTOOL.txt IPPTOOL.txt LICENSE.txt
$pkgdir
55 cp doc
/help
/man-ipptool
*.html
$pkgdir
56 cp test
/color.jpg
$pkgdir
57 cp test
/create-printer-subscription.
test $pkgdir
58 cp test
/document-
*.pdf
$pkgdir
59 cp test
/document-
*.ps
$pkgdir
60 cp test
/get-completed-jobs.
test test
/get-jobs.
test $pkgdir
61 cp test
/get-notifications.
test $pkgdir
62 cp test
/get-printer-attributes.
test $pkgdir
63 cp test
/get-subscriptions.
test $pkgdir
64 cp test
/gray.jpg
$pkgdir
65 cp test
/ipp-
[12].
*.
test $pkgdir
66 cp test
/ipp-everywhere.
test $pkgdir
67 cp test
/ipptool-static
$pkgdir/ipptool
68 cp test
/onepage-
*.pdf
$pkgdir
69 cp test
/onepage-
*.ps
$pkgdir
70 cp test
/print-job.
test $pkgdir
71 cp test
/print-job-deflate.
test $pkgdir
72 cp test
/print-job-gzip.
test $pkgdir
73 cp test
/testfile.
* $pkgdir
74 cp test
/validate-job.
test $pkgdir
76 if test `uname` = Darwin
; then
77 pkgfile
="$pkgdir-macosx-universal.dmg"
78 echo Creating disk image
$pkgfile...
79 test -f $pkgfile && rm $pkgfile
80 hdiutil create
-srcfolder $pkgdir $pkgfile
82 pkgfile
="$pkgdir-$uname-`uname -m`.tar.gz"
83 echo Creating archive
$pkgfile...
84 tar czf
$pkgfile $pkgdir ||
exit 1
87 echo Removing temporary files...