]> git.ipfire.org Git - thirdparty/cups.git/blame - tools/makesrcdist
Update build system to support separate installs of headers, libraries, data
[thirdparty/cups.git] / tools / makesrcdist
CommitLineData
e43e7922 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...
a8520b01 19 svn up
20 rev=`svnversion . | sed -e '1,$s/[a-zA-Z]//g'`
b802f654 21 version="1.4svn"
c6881512 22 revision="-r$rev"
b802f654 23 fileversion="1.4svn-r$rev"
b421d698 24 fileurl="ftp://ftp.easysw.com/pub/cups/test/cups-$fileversion-source.tar."
e43e7922 25 url="."
26else
27 echo Creating tag for release...
28 rev="1"
29 version=$1
c6881512 30 revision=""
e43e7922 31 fileversion=$1
b421d698 32 fileurl="ftp://ftp.easysw.com/pub/cups/$version/cups-$fileversion-source.tar."
e43e7922 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
b421d698 39fileurl=`echo $fileurl | sed -e '1,$s/\\//\\\\\\//g'`
40
e43e7922 41echo Exporting $fileversion...
42rm -rf /tmp/cups-$version
43svn export $url /tmp/cups-$version
44
45echo Updating version information...
46cd /tmp/cups-$version/config-scripts
47
a2aa798b 48sed -e '1,$s/^CUPS_VERSION=.*/CUPS_VERSION='$version'/' \
c6881512 49 -e '1,$s/^CUPS_REVISION=.*/CUPS_REVISION='$revision'/' \
e43e7922 50 <cups-common.m4 >cups-common.m4.new
51mv cups-common.m4.new cups-common.m4
52cd ..
e43e7922 53
54echo Configuring...
55autoconf -f
56rm -rf autom4te*.cache
57rm -rf standards
58rm -rf tools
59cd ..
60
61echo -n Archiving...gz
b421d698 62sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
b421d698 63 -e '1,$s/^Release:.*/Release: '$rev'/' \
64 -e '1,$s/^Source:.*/Source: '$fileurl'gz/' \
a8520b01 65 <cups-$version/packaging/cups.spec.in \
66 >cups-$version/packaging/cups.spec
9dd7b295 67tar czf cups-$fileversion-source.tar.gz cups-$version
b421d698 68
e43e7922 69echo -n ...bz2
b421d698 70sed -e '1,$s/@CUPS_VERSION@/'$version'/' \
b421d698 71 -e '1,$s/^Release:.*/Release: '$rev'/' \
72 -e '1,$s/^Source:.*/Source: '$fileurl'bz2/' \
a8520b01 73 <cups-$version/packaging/cups.spec.in \
74 >cups-$version/packaging/cups.spec
9dd7b295 75tar cjf cups-$fileversion-source.tar.bz2 cups-$version
e43e7922 76echo "..."
77
9dd7b295 78echo Removing temporary files...
79rm -rf cups-$version
80
e43e7922 81echo "Done!"
82
83#
84# End of "$Id$".
85#