]> git.ipfire.org Git - thirdparty/cups.git/blame - tools/makeipptoolpkg
Changelog.
[thirdparty/cups.git] / tools / makeipptoolpkg
CommitLineData
39ff2fe7
MS
1#!/bin/sh
2#
3# "$Id$"
4#
5# Make an ipptool package for CUPS.
6#
db8b865d 7# Copyright 2007-2013 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
f0ccfab3
MS
26platform="`uname | awk '{print tolower($1)}'`"
27case "x$1" in
28 xfedora* | xlsb | xrhel* | xubuntu*)
29 platform="linux-$1"
30 shift
31 ;;
32esac
dcb445bc 33
39ff2fe7
MS
34if test $# = 0; then
35 echo Updating to get snapshot version...
36 svn up
db8b865d 37 rev=`svn info . | grep Revision | awk '{print $2}'`
9b66acc5 38 fileversion="`date '+%Y%m%d'`-r$rev"
39ff2fe7
MS
39else
40 fileversion=$1
39ff2fe7
MS
41fi
42
43if (svn st | grep -qv '^\?'); then
44 echo Local changes remain:
45 svn st | grep -v '^\?'
46 exit 1
47fi
48
49echo Creating package directory...
50pkgdir="ipptool-$fileversion"
51
52test -d $pkgdir && rm -r $pkgdir
53mkdir $pkgdir || exit 1
54
55echo Copying package files
9b66acc5 56cp CHANGES-IPPTOOL.txt IPPTOOL.txt LICENSE.txt $pkgdir
e5528d42 57cp doc/help/man-ipp*.html $pkgdir
9b66acc5 58cp test/color.jpg $pkgdir
39ff2fe7 59cp test/create-printer-subscription.test $pkgdir
9b66acc5
MS
60cp test/document-*.pdf $pkgdir
61cp test/document-*.ps $pkgdir
39ff2fe7 62cp test/get-completed-jobs.test test/get-jobs.test $pkgdir
94436c5a 63cp test/get-notifications.test $pkgdir
c8fef167 64cp test/get-printer-attributes.test $pkgdir
94436c5a 65cp test/get-subscriptions.test $pkgdir
9b66acc5 66cp test/gray.jpg $pkgdir
39ff2fe7 67cp test/ipp-[12].*.test $pkgdir
db8b865d 68cp test/ipp-everywhere.test $pkgdir
e5528d42 69cp test/ippfind-static $pkgdir/ippfind
39ff2fe7 70cp test/ipptool-static $pkgdir/ipptool
9b66acc5
MS
71cp test/onepage-*.pdf $pkgdir
72cp test/onepage-*.ps $pkgdir
12f89d24 73cp test/print-job.test $pkgdir
db8b865d
MS
74cp test/print-job-deflate.test $pkgdir
75cp test/print-job-gzip.test $pkgdir
39ff2fe7 76cp test/testfile.* $pkgdir
94436c5a 77cp test/validate-job.test $pkgdir
39ff2fe7 78
f0ccfab3
MS
79if test x$platform = xdarwin; then
80 pkgfile="$pkgdir-osx-universal.dmg"
dcb445bc 81 echo Creating disk image $pkgfile...
39ff2fe7
MS
82 test -f $pkgfile && rm $pkgfile
83 hdiutil create -srcfolder $pkgdir $pkgfile
39ff2fe7 84else
f0ccfab3 85 pkgfile="$pkgdir-$platform-`uname -m`.tar.gz"
dcb445bc 86 echo Creating archive $pkgfile...
39ff2fe7
MS
87 tar czf $pkgfile $pkgdir || exit 1
88fi
89
39ff2fe7
MS
90echo Removing temporary files...
91rm -r $pkgdir
92
dcb445bc 93echo Done.
39ff2fe7
MS
94
95#
96# End of "$Id$".
97#