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'`
23 fileversion
="1.2svn-r$rev"
24 fileurl
="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar.bz2"
27 echo Creating tag
for release...
32 fileurl
="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar.bz2"
33 url
="https://svn.easysw.com/public/cups/tags/release-$version"
35 svn copy https
://svn.easysw.com
/public
/cups
/trunk
"$url" \
36 -m "Tag $version" ||
exit 1
39 echo Exporting
$fileversion...
40 rm -rf /tmp
/cups-
$version
41 svn
export $url /tmp
/cups-
$version
43 echo Updating version information...
44 cd /tmp
/cups-
$version/config-scripts
46 sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$fileversion'/' \
47 -e '1,$s/^CUPS_REVISION=.*/CUPS_REVISION='$revision'/' \
48 <cups-common.
m4 >cups-common.
m4.new
49 mv cups-common.
m4.new cups-common.
m4
51 fileurl
=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
52 sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
53 -e '1,$s/^Release:.*/Release: '$rev'/' \
54 -e '1,$s/^Source:.*/Source: '$fileurl'/' \
55 <packaging
/cups.spec.
in >packaging
/cups.spec
59 rm -rf autom4te
*.cache
64 echo -n Archiving...gz
65 tar czf cups-
$fileversion-source.
tar.gz cups-
$version
67 tar cjf cups-
$fileversion-source.
tar.bz2 cups-
$version
70 echo Removing temporary files...