]> git.ipfire.org Git - thirdparty/cups.git/blame - tools/makeipptoolpkg
Merge changes from CUPS 1.5svn-r9567
[thirdparty/cups.git] / tools / makeipptoolpkg
CommitLineData
39ff2fe7
MS
1#!/bin/sh
2#
3# "$Id$"
4#
5# Make an ipptool package for CUPS.
6#
c8fef167 7# Copyright 2007-2011 by Apple Inc.
39ff2fe7
MS
8# Copyright 1997-2007 by Easy Software Products, all rights reserved.
9#
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/".
15#
16
17# Make sure we are running in the right directory...
18if test ! -f tools/makeipptoolpkg; then
19 echo "Run this script from the top-level CUPS source directory, e.g.:"
20 echo ""
21 echo " tools/makeipptoolpkg $*"
22 echo ""
23 exit 1
24fi
25
26if test $# = 0; then
27 echo Updating to get snapshot version...
28 svn up
29 rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
30 fileversion="1.5svn-r$rev"
c7017ecc 31 version=snapshots
39ff2fe7
MS
32else
33 fileversion=$1
34 version=$1
35fi
36
37if (svn st | grep -qv '^\?'); then
38 echo Local changes remain:
39 svn st | grep -v '^\?'
40 exit 1
41fi
42
43echo Creating package directory...
44pkgdir="ipptool-$fileversion"
45
46test -d $pkgdir && rm -r $pkgdir
47mkdir $pkgdir || exit 1
48
49echo Copying package files
50cp IPPTOOL.txt LICENSE.txt $pkgdir
51cp doc/help/man-ipptool*.html $pkgdir
52cp test/create-printer-subscription.test $pkgdir
53cp test/get-completed-jobs.test test/get-jobs.test $pkgdir
c8fef167 54cp test/get-printer-attributes.test $pkgdir
39ff2fe7
MS
55cp test/ipp-[12].*.test $pkgdir
56cp test/ipptool-static $pkgdir/ipptool
57cp test/testfile.* $pkgdir
58
59if test `uname` = Darwin; then
60 echo Creating disk image...
61 pkgfile="$pkgdir-macosx-universal.dmg"
62 test -f $pkgfile && rm $pkgfile
63 hdiutil create -srcfolder $pkgdir $pkgfile
64 #sudo chown `whoami` $pkgfile
65else
66 echo Creating archive...
67 pkgfile="$pkgdir-`uname`-`uname -m`.tar.gz"
68 tar czf $pkgfile $pkgdir || exit 1
69fi
70
71if test -x /usr/bin/md5sum; then
72 (md5sum $pkgfile | awk '{print $1, "'$fileversion' cups/'$version'/" $2}')
73elif test -x /sbin/md5; then
74 (md5 $pkgfile | awk '{print $4, "'$fileversion' cups/'$version'/" substr($2, 2, length($2) - 2)}')
75fi
76
77echo Removing temporary files...
78rm -r $pkgdir
79
80echo "Done!"
81
82#
83# End of "$Id$".
84#