Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 185 lines (152 sloc) 5.292 kB
ae1912c @bagder Initial revision
authored
1 #! /bin/sh
607253c @bagder Truly make sure that the vc8 and vc9 makefiles that are generated get…
authored
2 # Script to build release-archives with. Note that this requires a checkout
3 # from CVS and you should first run ./buildconf and build curl once.
ae1912c @bagder Initial revision
authored
4 #
f7e3bd2 @bagder - Karl M brought the patch that creates vc9 Makefiles, and I made 'ma…
authored
5 #***************************************************************************
6 # _ _ ____ _
7 # Project ___| | | | _ \| |
8 # / __| | | | |_) | |
9 # | (__| |_| | _ <| |___
10 # \___|\___/|_| \_\_____|
11 #
12 # Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
13 #
14 # This software is licensed as described in the file COPYING, which
15 # you should have received as part of this distribution. The terms
16 # are also available at http://curl.haxx.se/docs/copyright.html.
17 #
18 # You may opt to use, copy, modify, merge, publish, distribute and/or sell
19 # copies of the Software, and permit persons to whom the Software is
20 # furnished to do so, under the terms of the COPYING file.
21 #
22 # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
23 # KIND, either express or implied.
24 #
25 # $Id$
26 ###########################################################################
ae1912c @bagder Initial revision
authored
27
ce7326e @bagder 1. read the version from the command line
authored
28 version=$1
29
30 if [ -z "$version" ]; then
31 echo "Specify a version number!"
32 exit
33 fi
34
ae1912c @bagder Initial revision
authored
35 libversion="$version"
36
ce7326e @bagder 1. read the version from the command line
authored
37 # we make curl the same version as libcurl
38 curlversion=$libversion
ae1912c @bagder Initial revision
authored
39
472c4d8 @bagder Insert the major, minor and patch numbers into the curl/curl.h header as
authored
40 major=`echo $libversion |cut -d. -f1 | sed -e "s/[^0-9]//g"`
41 minor=`echo $libversion |cut -d. -f2 | sed -e "s/[^0-9]//g"`
11e8600 @bagder cut the patch number before a '-' too, to enable '7.11.0-pre1' to use
authored
42 patch=`echo $libversion |cut -d. -f3 | cut -d- -f1 | sed -e "s/[^0-9]//g"`
472c4d8 @bagder Insert the major, minor and patch numbers into the curl/curl.h header as
authored
43
a2bd47c @bagder Bryan Henderson pointed out in bug report #1081788 that the curl-config
authored
44 numeric=`perl -e 'printf("%02x%02x%02x\n", '"$major, $minor, $patch);"`
472c4d8 @bagder Insert the major, minor and patch numbers into the curl/curl.h header as
authored
45
c5f02c1 @bagder Introducing curl/curlver.h for keeping the curl version info only.
authored
46 HEADER=include/curl/curlver.h
ae1912c @bagder Initial revision
authored
47 CHEADER=src/version.h
48
cf49135 @bagder When building tarballs, we also set the timestamp of the generated pa…
authored
49 # requires a date command that knows -u for UTC time zone
50 datestamp=`date -u`
51
ae1912c @bagder Initial revision
authored
52 # Replace version number in header file:
96dde76 @bagder moved here from the newlib branch
authored
53 sed -e 's/^#define LIBCURL_VERSION .*/#define LIBCURL_VERSION "'$libversion'"/g' \
f335bac @bagder Reverted the LIBCURL_VERSION_NUM change from October 6. As Dave Dribin
authored
54 -e 's/^#define LIBCURL_VERSION_NUM .*/#define LIBCURL_VERSION_NUM 0x'$numeric'/g' \
472c4d8 @bagder Insert the major, minor and patch numbers into the curl/curl.h header as
authored
55 -e 's/^#define LIBCURL_VERSION_MAJOR .*/#define LIBCURL_VERSION_MAJOR '$major'/g' \
56 -e 's/^#define LIBCURL_VERSION_MINOR .*/#define LIBCURL_VERSION_MINOR '$minor'/g' \
57 -e 's/^#define LIBCURL_VERSION_PATCH .*/#define LIBCURL_VERSION_PATCH '$patch'/g' \
cf49135 @bagder When building tarballs, we also set the timestamp of the generated pa…
authored
58 -e "s/^#define LIBCURL_TIMESTAMP .*/#define LIBCURL_TIMESTAMP \"$datestamp\"/g" \
ffc58c6 @bagder newer, nicer
authored
59 $HEADER >$HEADER.dist
ae1912c @bagder Initial revision
authored
60
61 # Replace version number in header file:
5700334 @bagder src/version.h was not properly made!
authored
62 sed 's/#define CURL_VERSION .*/#define CURL_VERSION "'$curlversion'"/g' $CHEADER >$CHEADER.dist
ae1912c @bagder Initial revision
authored
63
607253c @bagder Truly make sure that the vc8 and vc9 makefiles that are generated get…
authored
64 # Generate VC8 and VC9 versions from the VC6 Makefile versions
65 for ver in vc8 vc9; do
66 make -f Makefile.dist $ver
67 mv src/Makefile.$ver src/Makefile.$ver.dist
68 mv lib/Makefile.$ver lib/Makefile.$ver.dist
69 done
d3b89e1 @bagder - Robert A. Monat and Shmulik Regev helped out to fix the new */Makef…
authored
70
7b3c308 @bagder update the version numbers in the libcurl.plist automaticly on release
authored
71 # Replace version number in plist file:
72 PLIST=lib/libcurl.plist
73 sed "s/7\.12\.3/$libversion/g" $PLIST > $PLIST.dist
74
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
75 echo "curl version $curlversion"
76 echo "libcurl version $libversion"
77 echo "libcurl numerical $numeric"
cf49135 @bagder When building tarballs, we also set the timestamp of the generated pa…
authored
78 echo "datestamp $datestamp"
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
79
ae1912c @bagder Initial revision
authored
80 findprog()
81 {
82 file="$1"
83 for part in `echo $PATH| tr ':' ' '`; do
84 path="$part/$file"
85 if [ -x "$path" ]; then
86 # there it is!
87 return 1
88 fi
89 done
90
91 # no such executable
92 return 0
93 }
94
c410769 @bagder make REALLY sure src/config.h.in is a copy of lib/config.h.in
authored
95 echo "maketgz: cp lib/config.h.in src/config.h.in"
96 cp lib/config.h.in src/config.h.in
97
ae1912c @bagder Initial revision
authored
98 ############################################################################
99 #
fe84071 @bagder adjusted to use 'make dist' when building the package
authored
100 # Enforce a rerun of configure (updates the VERSION)
ae1912c @bagder Initial revision
authored
101 #
fe84071 @bagder adjusted to use 'make dist' when building the package
authored
102
888d39e @bagder generate bzip2 and zip files too
authored
103 echo "Re-running config.status"
104 ./config.status --recheck >/dev/null
ae1912c @bagder Initial revision
authored
105
106 ############################################################################
107 #
108 # automake is needed to run to make a non-GNU Makefile.in if Makefile.am has
109 # been modified.
110 #
111
112 if { findprog automake >/dev/null 2>/dev/null; } then
113 echo "- Could not find or run automake, I hope you know what you're doing!"
114 else
115 echo "Runs automake --include-deps"
888d39e @bagder generate bzip2 and zip files too
authored
116 automake --include-deps Makefile >/dev/null
ae1912c @bagder Initial revision
authored
117 fi
118
119 ############################################################################
120 #
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
121 # Make sure we have updated HTML versions of all man pages:
122 #
a7de09a @bagder some outputs for easier debugging
authored
123 echo "make html"
ffc58c6 @bagder newer, nicer
authored
124 make -s html
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
125
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
126 # And the PDF versions
a7de09a @bagder some outputs for easier debugging
authored
127 echo "make pdf"
ffc58c6 @bagder newer, nicer
authored
128 make -s pdf
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
129
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
130 ############################################################################
131 #
888d39e @bagder generate bzip2 and zip files too
authored
132 # Now run make dist to generate a tar.gz archive
ae1912c @bagder Initial revision
authored
133 #
134
a7de09a @bagder some outputs for easier debugging
authored
135 echo "make dist"
888d39e @bagder generate bzip2 and zip files too
authored
136 targz="curl-$version.tar.gz"
ffc58c6 @bagder newer, nicer
authored
137 make -s dist VERSION=$version
888d39e @bagder generate bzip2 and zip files too
authored
138
139 ############################################################################
140 #
141 # Now make a bz2 archive from the tar.gz original
142 #
143
144 bzip2="curl-$version.tar.bz2"
145 echo "Generating $bzip2"
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
146 gzip -dc $targz | bzip2 --best - > $bzip2
147
148 ############################################################################
149 #
150 # Now make an lzma archive from the tar.gz original
151 #
152
153 lzma="curl-$version.tar.lzma"
154 echo "Generating $lzma"
155 gzip -dc $targz | lzma --best - > $lzma
888d39e @bagder generate bzip2 and zip files too
authored
156
157 ############################################################################
158 #
159 # Now make a zip archive from the tar.gz original
160 #
161 makezip ()
162 {
163 rm -rf $tempdir
164 mkdir $tempdir
165 cd $tempdir
166 gzip -dc ../$targz | tar -xf -
167 find . | zip $zip -@ >/dev/null
168 mv $zip ../
169 cd ..
170 rm -rf $tempdir
171 }
172
173 zip="curl-$version.zip"
174 echo "Generating $zip"
175 tempdir=".builddir"
176 makezip
177
178 echo "------------------"
179 echo "maketgz report:"
180 echo ""
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
181 ls -l $targz $bzip2 $zip $lzma
4da0428 @bagder Remind about the gpg command lines
authored
182
cdb2552 @bagder offer a friendlier single-line command
authored
183 echo "Run this:"
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
184 echo "gpg -b -a $targz && gpg -b -a $bzip2 && gpg -b -a $zip && gpg -b -a $lzma"
Something went wrong with that request. Please try again.