]>
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" | |
22 | fileversion="1.2svn-r$rev" | |
23 | fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar.bz2" | |
24 | url="." | |
25 | else | |
26 | echo Creating tag for release... | |
27 | rev="1" | |
28 | version=$1 | |
29 | fileversion=$1 | |
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" | |
32 | ||
33 | svn copy https://svn.easysw.com/public/cups/trunk "$url" \ | |
34 | -m "Tag $version" || exit 1 | |
35 | fi | |
36 | ||
37 | echo Exporting $fileversion... | |
38 | rm -rf /tmp/cups-$version | |
39 | svn export $url /tmp/cups-$version | |
40 | ||
41 | echo Updating version information... | |
42 | cd /tmp/cups-$version/config-scripts | |
43 | ||
e00b005a | 44 | sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$fileversion'/' \ |
ef416fc2 | 45 | <cups-common.m4 >cups-common.m4.new |
46 | mv cups-common.m4.new cups-common.m4 | |
47 | cd .. | |
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 | |
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 | |
62 | tar czf cups-$version-r$rev-source.tar.gz cups-$version | |
63 | echo -n ...bz2 | |
64 | tar cjf cups-$version-r$rev-source.tar.bz2 cups-$version | |
65 | echo "..." | |
66 | ||
67 | echo "Done!" | |
68 | ||
69 | # | |
70 | # End of "$Id$". | |
71 | # |