]> git.ipfire.org Git - thirdparty/cups.git/blame - tools/makesrcdist
Load cups into easysw/current.
[thirdparty/cups.git] / tools / makesrcdist
CommitLineData
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...
9if 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
15fi
16
17if 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="."
26else
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
37fi
38
39echo Exporting $fileversion...
40rm -rf /tmp/cups-$version
41svn export $url /tmp/cups-$version
42
43echo Updating version information...
44cd /tmp/cups-$version/config-scripts
45
b423cd4c 46sed -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
49mv cups-common.m4.new cups-common.m4
50cd ..
51fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
52sed -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
57echo Configuring...
58autoconf -f
59rm -rf autom4te*.cache
60rm -rf standards
61rm -rf tools
62cd ..
63
64echo -n Archiving...gz
bd7854cb 65tar czf cups-$fileversion-source.tar.gz cups-$version
ef416fc2 66echo -n ...bz2
bd7854cb 67tar cjf cups-$fileversion-source.tar.bz2 cups-$version
ef416fc2 68echo "..."
69
bd7854cb 70echo Removing temporary files...
71rm -rf cups-$version
72
ef416fc2 73echo "Done!"
74
75#
76# End of "$Id$".
77#