]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | #!/bin/sh |
2 | # | |
3 | # "$Id$" | |
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'` | |
21 | version="1.2svn" | |
ecdc0628 | 22 | revision="-r$rev" |
ef416fc2 | 23 | fileversion="1.2svn-r$rev" |
24 | fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar.bz2" | |
25 | url="." | |
26 | else | |
27 | echo Creating tag for release... | |
28 | rev="1" | |
29 | version=$1 | |
ecdc0628 | 30 | revision="" |
ef416fc2 | 31 | fileversion=$1 |
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" | |
34 | ||
35 | svn copy https://svn.easysw.com/public/cups/trunk "$url" \ | |
36 | -m "Tag $version" || exit 1 | |
37 | fi | |
38 | ||
39 | echo Exporting $fileversion... | |
40 | rm -rf /tmp/cups-$version | |
41 | svn export $url /tmp/cups-$version | |
42 | ||
43 | echo Updating version information... | |
44 | cd /tmp/cups-$version/config-scripts | |
45 | ||
b423cd4c | 46 | sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \ |
ecdc0628 | 47 | -e '1,$s/^CUPS_REVISION=.*/CUPS_REVISION='$revision'/' \ |
ef416fc2 | 48 | <cups-common.m4 >cups-common.m4.new |
49 | mv cups-common.m4.new cups-common.m4 | |
50 | cd .. | |
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 | |
56 | ||
57 | echo Configuring... | |
58 | autoconf -f | |
59 | rm -rf autom4te*.cache | |
60 | rm -rf standards | |
61 | rm -rf tools | |
62 | cd .. | |
63 | ||
64 | echo -n Archiving...gz | |
bd7854cb | 65 | tar czf cups-$fileversion-source.tar.gz cups-$version |
ef416fc2 | 66 | echo -n ...bz2 |
bd7854cb | 67 | tar cjf cups-$fileversion-source.tar.bz2 cups-$version |
ef416fc2 | 68 | echo "..." |
69 | ||
bd7854cb | 70 | echo Removing temporary files... |
71 | rm -rf cups-$version | |
72 | ||
ef416fc2 | 73 | echo "Done!" |
74 | ||
75 | # | |
76 | # End of "$Id$". | |
77 | # |