]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
f7faf1f5 | 3 | # "$Id: makesrcdist 5500 2006-05-08 20:32:27Z mike $" |
ef416fc2 | 4 | # |
5 | # makesrcdist - make a source distribution of CUPS. | |
6 | # | |
7 | ||
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.:" | |
11 | echo "" | |
12 | echo " tools/makesrcdist $*" | |
13 | echo "" | |
14 | exit 1 | |
15 | fi | |
16 | ||
17 | if test $# = 0; then | |
18 | echo Updating for snapshot... | |
19 | svn up | |
20 | rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'` | |
f7faf1f5 | 21 | version="1.2svn" |
ecdc0628 | 22 | revision="-r$rev" |
f7faf1f5 | 23 | fileversion="1.2svn-r$rev" |
e1d6a774 | 24 | fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar." |
ef416fc2 | 25 | url="." |
26 | else | |
27 | echo Creating tag for release... | |
28 | rev="1" | |
29 | version=$1 | |
ecdc0628 | 30 | revision="" |
ef416fc2 | 31 | fileversion=$1 |
e1d6a774 | 32 | fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar." |
ef416fc2 | 33 | url="https://svn.easysw.com/public/cups/tags/release-$version" |
34 | ||
f7faf1f5 | 35 | svn copy https://svn.easysw.com/public/cups/branches/branch-1.2 "$url" \ |
ef416fc2 | 36 | -m "Tag $version" || exit 1 |
37 | fi | |
38 | ||
e1d6a774 | 39 | fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'` |
40 | ||
ef416fc2 | 41 | echo Exporting $fileversion... |
42 | rm -rf /tmp/cups-$version | |
43 | svn export $url /tmp/cups-$version | |
44 | ||
45 | echo Updating version information... | |
46 | cd /tmp/cups-$version/config-scripts | |
47 | ||
b423cd4c | 48 | sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \ |
ecdc0628 | 49 | -e '1,$s/^CUPS_REVISION=.*/CUPS_REVISION='$revision'/' \ |
ef416fc2 | 50 | <cups-common.m4 >cups-common.m4.new |
51 | mv cups-common.m4.new cups-common.m4 | |
52 | cd .. | |
ef416fc2 | 53 | |
54 | echo Configuring... | |
55 | autoconf -f | |
56 | rm -rf autom4te*.cache | |
57 | rm -rf standards | |
58 | rm -rf tools | |
59 | cd .. | |
60 | ||
61 | echo -n Archiving...gz | |
e1d6a774 | 62 | sed -e '1,$s/@CUPS_VERSION@/'$version'/' \ |
63 | -e '1,$s/^Release:.*/Release: '$rev'/' \ | |
64 | -e '1,$s/^Source:.*/Source: '$fileurl'gz/' \ | |
65 | <cups-$version/packaging/cups.spec.in \ | |
66 | >cups-$version/packaging/cups.spec | |
bd7854cb | 67 | tar czf cups-$fileversion-source.tar.gz cups-$version |
e1d6a774 | 68 | |
ef416fc2 | 69 | echo -n ...bz2 |
e1d6a774 | 70 | sed -e '1,$s/@CUPS_VERSION@/'$version'/' \ |
71 | -e '1,$s/^Release:.*/Release: '$rev'/' \ | |
72 | -e '1,$s/^Source:.*/Source: '$fileurl'bz2/' \ | |
73 | <cups-$version/packaging/cups.spec.in \ | |
74 | >cups-$version/packaging/cups.spec | |
bd7854cb | 75 | tar cjf cups-$fileversion-source.tar.bz2 cups-$version |
ef416fc2 | 76 | echo "..." |
77 | ||
bd7854cb | 78 | echo Removing temporary files... |
79 | rm -rf cups-$version | |
80 | ||
ef416fc2 | 81 | echo "Done!" |
82 | ||
83 | # | |
f7faf1f5 | 84 | # End of "$Id: makesrcdist 5500 2006-05-08 20:32:27Z mike $". |
ef416fc2 | 85 | # |