OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 # | 2 # |
3 # This script is used to compile SQLite and package everything up | 3 # This script is used to compile SQLite and package everything up |
4 # so that it is ready to move to the SQLite website. | 4 # so that it is ready to move to the SQLite website. |
5 # | 5 # |
6 | 6 |
7 # Set srcdir to the name of the directory that contains the publish.sh | 7 # Set srcdir to the name of the directory that contains the publish.sh |
8 # script. | 8 # script. |
9 # | 9 # |
10 srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'` | 10 srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'` |
(...skipping 16 matching lines...) Expand all Loading... |
27 CFLAGS="-Os -DSQLITE_ENABLE_FTS3=0 -DSQLITE_ENABLE_RTREE=0" | 27 CFLAGS="-Os -DSQLITE_ENABLE_FTS3=0 -DSQLITE_ENABLE_RTREE=0" |
28 CFLAGS="$CFLAGS -DSQLITE_THREADSAFE=0" | 28 CFLAGS="$CFLAGS -DSQLITE_THREADSAFE=0" |
29 echo '***** '"COMPILING sqlite3-$VERS.bin..." | 29 echo '***** '"COMPILING sqlite3-$VERS.bin..." |
30 gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o sqlite3 -ldl | 30 gcc $CFLAGS -Itsrc sqlite3.c tsrc/shell.c -o sqlite3 -ldl |
31 strip sqlite3 | 31 strip sqlite3 |
32 mv sqlite3 sqlite3-$VERS.bin | 32 mv sqlite3 sqlite3-$VERS.bin |
33 gzip sqlite3-$VERS.bin | 33 gzip sqlite3-$VERS.bin |
34 chmod 644 sqlite3-$VERS.bin.gz | 34 chmod 644 sqlite3-$VERS.bin.gz |
35 mv sqlite3-$VERS.bin.gz doc | 35 mv sqlite3-$VERS.bin.gz doc |
36 | 36 |
37 # Build a source archive useful for windows. | |
38 # | |
39 make target_source | |
40 cd tsrc | |
41 echo '***** BUILDING preprocessed source archives' | |
42 rm fts[12]* icu* | |
43 rm -f ../doc/sqlite-source-$VERSW.zip | |
44 zip ../doc/sqlite-source-$VERSW.zip * | |
45 cd .. | |
46 cp tsrc/sqlite3.h tsrc/sqlite3ext.h . | |
47 pwd | |
48 zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h | |
49 | |
50 # Build the sqlite.so and tclsqlite.so shared libraries | 37 # Build the sqlite.so and tclsqlite.so shared libraries |
51 # under Linux | 38 # under Linux |
52 # | 39 # |
53 TCLDIR=/home/drh/tcltk/846/linux/846linux | 40 TCLDIR=/home/drh/tcltk/846/linux/846linux |
54 TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a | 41 TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a |
55 CFLAGS="-Os -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1" | 42 CFLAGS="-Os -DSQLITE_ENABLE_FTS3=3 -DSQLITE_ENABLE_RTREE=1" |
56 CFLAGS="$CFLAGS -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1" | 43 CFLAGS="$CFLAGS -DHAVE_LOCALTIME_R=1 -DHAVE_GMTIME_R=1" |
57 CFLAGS="$CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1" | 44 CFLAGS="$CFLAGS -DSQLITE_ENABLE_COLUMN_METADATA=1" |
58 echo '***** BUILDING shared libraries for linux' | 45 echo '***** BUILDING shared libraries for linux' |
59 gcc $CFLAGS -shared tclsqlite3.c $TCLSTUBLIB -o tclsqlite3.so -lpthread | 46 gcc $CFLAGS -shared tclsqlite3.c $TCLSTUBLIB -o tclsqlite3.so -lpthread |
(...skipping 20 matching lines...) Expand all Loading... |
80 zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def | 67 zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def |
81 | 68 |
82 # Build the sqlite.exe executable for windows. | 69 # Build the sqlite.exe executable for windows. |
83 # | 70 # |
84 OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1 -DSQLITE_THREADSAFE=0' | 71 OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1 -DSQLITE_THREADSAFE=0' |
85 OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1" | 72 OPTS="$OPTS -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1" |
86 i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \ | 73 i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \ |
87 -o sqlite3.exe | 74 -o sqlite3.exe |
88 zip doc/sqlite-$VERSW.zip sqlite3.exe | 75 zip doc/sqlite-$VERSW.zip sqlite3.exe |
89 | 76 |
| 77 # Build a source archive useful for windows. |
| 78 # |
| 79 make target_source |
| 80 cd tsrc |
| 81 echo '***** BUILDING preprocessed source archives' |
| 82 rm fts[12]* icu* |
| 83 rm -f ../doc/sqlite-source-$VERSW.zip |
| 84 zip ../doc/sqlite-source-$VERSW.zip * |
| 85 cd .. |
| 86 cp tsrc/sqlite3.h tsrc/sqlite3ext.h . |
| 87 cp tsrc/shell.c . |
| 88 pwd |
| 89 zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h shell.c
sqlite3.def |
| 90 |
90 # Construct a tarball of the source tree | 91 # Construct a tarball of the source tree |
91 # | 92 # |
92 echo '***** BUILDING source archive' | 93 echo '***** BUILDING source archive' |
93 ORIGIN=`pwd` | 94 ORIGIN=`pwd` |
94 cd $srcdir | 95 cd $srcdir |
| 96 chmod +x configure |
95 cd .. | 97 cd .. |
96 mv sqlite sqlite-$VERS | 98 mv sqlite sqlite-$VERS |
97 EXCLUDE=`find sqlite-$VERS -print | egrep '(www/|art/|doc/|contrib/|_FOSSIL_)' |
sed 's,^, --exclude ,'` | 99 EXCLUDE=`find sqlite-$VERS -print | egrep '(www/|art/|doc/|contrib/|_FOSSIL_)' |
sed 's,^, --exclude ,'` |
98 echo "tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS" | 100 echo "tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS" |
99 tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS | 101 tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS |
100 mv sqlite-$VERS sqlite | 102 mv sqlite-$VERS sqlite |
101 cd $ORIGIN | 103 cd $ORIGIN |
102 | 104 |
103 # | 105 # |
104 # Build RPMS (binary) and Source RPM | 106 # Build RPMS (binary) and Source RPM |
(...skipping 22 matching lines...) Expand all Loading... |
127 # copy the RPMs into the build directory. | 129 # copy the RPMs into the build directory. |
128 mv $HOME/rpm/RPMS/i386/sqlite*-$vers*.rpm doc | 130 mv $HOME/rpm/RPMS/i386/sqlite*-$vers*.rpm doc |
129 mv $HOME/rpm/SRPMS/sqlite-$vers*.rpm doc | 131 mv $HOME/rpm/SRPMS/sqlite-$vers*.rpm doc |
130 | 132 |
131 # Build the website | 133 # Build the website |
132 # | 134 # |
133 #cp $srcdir/../historical/* doc | 135 #cp $srcdir/../historical/* doc |
134 #make doc | 136 #make doc |
135 #cd doc | 137 #cd doc |
136 #chmod 644 *.gz | 138 #chmod 644 *.gz |
OLD | NEW |