Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 184 lines (151 sloc) 5.342 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
1609685 @bagder various changes of CVS to git
authored
3 # from git 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 #
919c97f @yangtse curl tool: use configuration files from lib directory
yangtse authored
12 # Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
f7e3bd2 @bagder - Karl M brought the patch that creates vc9 Makefiles, and I made 'ma…
authored
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 ###########################################################################
ae1912c @bagder Initial revision
authored
26
ce7326e @bagder 1. read the version from the command line
authored
27 version=$1
28
29 if [ -z "$version" ]; then
30 echo "Specify a version number!"
31 exit
32 fi
33
ae1912c @bagder Initial revision
authored
34 libversion="$version"
35
ce7326e @bagder 1. read the version from the command line
authored
36 # we make curl the same version as libcurl
37 curlversion=$libversion
ae1912c @bagder Initial revision
authored
38
472c4d8 @bagder Insert the major, minor and patch numbers into the curl/curl.h header as
authored
39 major=`echo $libversion |cut -d. -f1 | sed -e "s/[^0-9]//g"`
40 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
41 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
42
a2bd47c @bagder Bryan Henderson pointed out in bug report #1081788 that the curl-config
authored
43 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
44
c5f02c1 @bagder Introducing curl/curlver.h for keeping the curl version info only.
authored
45 HEADER=include/curl/curlver.h
f7bfdba @yangtse curl tool: reviewed code moved to tool_*.[ch] files
yangtse authored
46 CHEADER=src/tool_version.h
ae1912c @bagder Initial revision
authored
47
cf49135 @bagder When building tarballs, we also set the timestamp of the generated pa…
authored
48 # requires a date command that knows -u for UTC time zone
49 datestamp=`date -u`
50
ae1912c @bagder Initial revision
authored
51 # Replace version number in header file:
96dde76 @bagder moved here from the newlib branch
authored
52 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
53 -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
54 -e 's/^#define LIBCURL_VERSION_MAJOR .*/#define LIBCURL_VERSION_MAJOR '$major'/g' \
55 -e 's/^#define LIBCURL_VERSION_MINOR .*/#define LIBCURL_VERSION_MINOR '$minor'/g' \
56 -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
57 -e "s/^#define LIBCURL_TIMESTAMP .*/#define LIBCURL_TIMESTAMP \"$datestamp\"/g" \
ffc58c6 @bagder newer, nicer
authored
58 $HEADER >$HEADER.dist
ae1912c @bagder Initial revision
authored
59
60 # Replace version number in header file:
5700334 @bagder src/version.h was not properly made!
authored
61 sed 's/#define CURL_VERSION .*/#define CURL_VERSION "'$curlversion'"/g' $CHEADER >$CHEADER.dist
ae1912c @bagder Initial revision
authored
62
864d5ad @gknauf Added some hacks in order to build with VC from git.
gknauf authored
63 # Generate VC8, VC9, and VC10 versions from the VC6 Makefile versions
64 for ver in vc8 vc9 vc10; do
607253c @bagder Truly make sure that the vc8 and vc9 makefiles that are generated get…
authored
65 make -f Makefile.dist $ver
66 mv src/Makefile.$ver src/Makefile.$ver.dist
67 mv lib/Makefile.$ver lib/Makefile.$ver.dist
68 done
d3b89e1 @bagder - Robert A. Monat and Shmulik Regev helped out to fix the new */Makef…
authored
69
7b3c308 @bagder update the version numbers in the libcurl.plist automaticly on release
authored
70 # Replace version number in plist file:
71 PLIST=lib/libcurl.plist
72 sed "s/7\.12\.3/$libversion/g" $PLIST > $PLIST.dist
73
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
74 echo "curl version $curlversion"
75 echo "libcurl version $libversion"
76 echo "libcurl numerical $numeric"
cf49135 @bagder When building tarballs, we also set the timestamp of the generated pa…
authored
77 echo "datestamp $datestamp"
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
78
ae1912c @bagder Initial revision
authored
79 findprog()
80 {
81 file="$1"
82 for part in `echo $PATH| tr ':' ' '`; do
83 path="$part/$file"
84 if [ -x "$path" ]; then
85 # there it is!
86 return 1
87 fi
88 done
89
90 # no such executable
91 return 0
92 }
93
94 ############################################################################
95 #
fe84071 @bagder adjusted to use 'make dist' when building the package
authored
96 # Enforce a rerun of configure (updates the VERSION)
ae1912c @bagder Initial revision
authored
97 #
fe84071 @bagder adjusted to use 'make dist' when building the package
authored
98
888d39e @bagder generate bzip2 and zip files too
authored
99 echo "Re-running config.status"
100 ./config.status --recheck >/dev/null
ae1912c @bagder Initial revision
authored
101
102 ############################################################################
103 #
104 # automake is needed to run to make a non-GNU Makefile.in if Makefile.am has
105 # been modified.
106 #
107
108 if { findprog automake >/dev/null 2>/dev/null; } then
109 echo "- Could not find or run automake, I hope you know what you're doing!"
110 else
111 echo "Runs automake --include-deps"
888d39e @bagder generate bzip2 and zip files too
authored
112 automake --include-deps Makefile >/dev/null
ae1912c @bagder Initial revision
authored
113 fi
114
115 ############################################################################
116 #
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
117 # Make sure we have updated HTML versions of all man pages:
118 #
a7de09a @bagder some outputs for easier debugging
authored
119 echo "make html"
ffc58c6 @bagder newer, nicer
authored
120 make -s html
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
121
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
122 # And the PDF versions
a7de09a @bagder some outputs for easier debugging
authored
123 echo "make pdf"
ffc58c6 @bagder newer, nicer
authored
124 make -s pdf
e6367ab @bagder generate and include PDF versions of the docs in the release archive
authored
125
1182c8b @bagder maketgz: produce CHANGES automatically with the 1000 most recent commits
authored
126 echo "produce CHANGES"
127 git log --pretty=fuller --no-color --date=short --decorate=full -1000 | ./log2changes.pl > CHANGES.dist
128
05d9c9b @bagder run 'make clean' before 'make dist' to make sure the HTML files are u…
authored
129 ############################################################################
130 #
888d39e @bagder generate bzip2 and zip files too
authored
131 # Now run make dist to generate a tar.gz archive
ae1912c @bagder Initial revision
authored
132 #
133
a7de09a @bagder some outputs for easier debugging
authored
134 echo "make dist"
888d39e @bagder generate bzip2 and zip files too
authored
135 targz="curl-$version.tar.gz"
ffc58c6 @bagder newer, nicer
authored
136 make -s dist VERSION=$version
888d39e @bagder generate bzip2 and zip files too
authored
137
138 ############################################################################
139 #
140 # Now make a bz2 archive from the tar.gz original
141 #
142
143 bzip2="curl-$version.tar.bz2"
144 echo "Generating $bzip2"
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
145 gzip -dc $targz | bzip2 --best - > $bzip2
146
147 ############################################################################
148 #
149 # Now make an lzma archive from the tar.gz original
150 #
151
152 lzma="curl-$version.tar.lzma"
153 echo "Generating $lzma"
154 gzip -dc $targz | lzma --best - > $lzma
888d39e @bagder generate bzip2 and zip files too
authored
155
156 ############################################################################
157 #
158 # Now make a zip archive from the tar.gz original
159 #
160 makezip ()
161 {
162 rm -rf $tempdir
163 mkdir $tempdir
164 cd $tempdir
165 gzip -dc ../$targz | tar -xf -
166 find . | zip $zip -@ >/dev/null
167 mv $zip ../
168 cd ..
169 rm -rf $tempdir
170 }
171
172 zip="curl-$version.zip"
173 echo "Generating $zip"
174 tempdir=".builddir"
175 makezip
176
177 echo "------------------"
178 echo "maketgz report:"
179 echo ""
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
180 ls -l $targz $bzip2 $zip $lzma
4da0428 @bagder Remind about the gpg command lines
authored
181
cdb2552 @bagder offer a friendlier single-line command
authored
182 echo "Run this:"
3a7e8c9 @bagder lzma compressed tarballs too for some testing, it does produce MUCH s…
authored
183 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.