5 # makesrcdist - make a source distribution of CUPS.
8 # Make sure we are running in the right directory...
9 if test ! -f tools
/makesrcdist
; then
10 echo "Run this script from the top-level CUPS source directory, e.g.:"
12 echo " tools/makesrcdist $*"
18 echo Updating
for snapshot...
20 rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
22 fileversion
="1.2svn-r$rev"
23 fileurl
="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar.bz2"
26 echo Creating tag
for release...
30 fileurl
="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar.bz2"
31 url
="https://svn.easysw.com/public/cups/tags/release-$version"
33 svn copy https
://svn.easysw.com
/public
/cups
/trunk
"$url" \
34 -m "Tag $version" ||
exit 1
37 echo Exporting
$fileversion...
38 rm -rf /tmp
/cups-
$version
39 svn
export $url /tmp
/cups-
$version
41 echo Updating version information...
42 cd /tmp
/cups-
$version/config-scripts
44 sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \
45 <cups-common.
m4 >cups-common.
m4.new
46 mv cups-common.
m4.new cups-common.
m4
48 fileurl
=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
49 sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
50 -e '1,$s/^Release:.*/Release: '$rev'/' \
51 -e '1,$s/^Source:.*/Source: '$fileurl'/' \
52 <packaging
/cups.spec.
in >packaging
/cups.spec
56 rm -rf autom4te
*.cache
61 echo -n Archiving...gz
62 tar czf cups-
$version-r$rev-source.
tar.gz cups-
$version
64 tar cjf cups-
$version-r$rev-source.
tar.bz2 cups-
$version