aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/sqlite/unix/sqlite-3.5.1/publish.sh
diff options
context:
space:
mode:
authordan miller2007-10-20 02:49:29 +0000
committerdan miller2007-10-20 02:49:29 +0000
commite36d23a85ebff914d74bb541558c2b6082b78edb (patch)
tree54b58fdf162e78af64055282a6035c8d2443389d /libraries/sqlite/unix/sqlite-3.5.1/publish.sh
parent* Fixed an issue whereby avatar chat distances were being calculated against ... (diff)
downloadopensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.zip
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.gz
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.bz2
opensim-SC-e36d23a85ebff914d74bb541558c2b6082b78edb.tar.xz
sqlite source (unix build) added to libraries
Diffstat (limited to 'libraries/sqlite/unix/sqlite-3.5.1/publish.sh')
-rw-r--r--libraries/sqlite/unix/sqlite-3.5.1/publish.sh129
1 files changed, 129 insertions, 0 deletions
diff --git a/libraries/sqlite/unix/sqlite-3.5.1/publish.sh b/libraries/sqlite/unix/sqlite-3.5.1/publish.sh
new file mode 100644
index 0000000..c65d15b
--- /dev/null
+++ b/libraries/sqlite/unix/sqlite-3.5.1/publish.sh
@@ -0,0 +1,129 @@
1#!/bin/sh
2#
3# This script is used to compile SQLite and all its documentation and
4# ship everything up to the SQLite website. This script will only work
5# on the system "zadok" at the Hwaci offices. But others might find
6# the script useful as an example.
7#
8
9# Set srcdir to the name of the directory that contains the publish.sh
10# script.
11#
12srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'`
13
14# Get the makefile.
15#
16cp $srcdir/Makefile.linux-gcc ./Makefile
17chmod +x $srcdir/install-sh
18
19# Get the current version number - needed to help build filenames
20#
21VERS=`cat $srcdir/VERSION`
22VERSW=`sed 's/\./_/g' $srcdir/VERSION`
23echo "VERSIONS: $VERS $VERSW"
24
25# Start by building an sqlite shell for linux.
26#
27make clean
28make sqlite3.c
29gcc -Os -Itsrc sqlite3.c tsrc/shell.c -o sqlite3 -ldl -lpthread
30strip sqlite3
31mv sqlite3 sqlite3-$VERS.bin
32gzip sqlite3-$VERS.bin
33chmod 644 sqlite3-$VERS.bin.gz
34mv sqlite3-$VERS.bin.gz doc
35
36# Build a source archive useful for windows.
37#
38make target_source
39cd tsrc
40rm fts*
41rm -f ../doc/sqlite-source-$VERSW.zip
42zip ../doc/sqlite-source-$VERSW.zip *
43cd ..
44make sqlite3.c
45cp tsrc/sqlite3.h tsrc/sqlite3ext.h .
46pwd
47zip doc/sqlite-amalgamation-$VERSW.zip sqlite3.c sqlite3.h sqlite3ext.h
48
49# Build the sqlite.so and tclsqlite.so shared libraries
50# under Linux
51#
52make sqlite3.c
53TCLDIR=/home/drh/tcltk/846/linux/846linux
54TCLSTUBLIB=$TCLDIR/libtclstub8.4g.a
55gcc -Os -shared -Itsrc sqlite3.c tsrc/tclsqlite.c $TCLSTUBLIB -o tclsqlite3.so
56strip tclsqlite3.so
57chmod 644 tclsqlite3.so
58mv tclsqlite3.so tclsqlite-$VERS.so
59gzip tclsqlite-$VERS.so
60mv tclsqlite-$VERS.so.gz doc
61gcc -Os -shared -Itsrc sqlite3.c -o sqlite3.so
62strip sqlite3.so
63chmod 644 sqlite3.so
64mv sqlite3.so sqlite-$VERS.so
65gzip sqlite-$VERS.so
66mv sqlite-$VERS.so.gz doc
67
68
69# Build the tclsqlite3.dll and sqlite3.dll shared libraries.
70#
71. $srcdir/mkdll.sh
72echo zip doc/tclsqlite-$VERSW.zip tclsqlite3.dll
73zip doc/tclsqlite-$VERSW.zip tclsqlite3.dll
74echo zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
75zip doc/sqlitedll-$VERSW.zip sqlite3.dll sqlite3.def
76
77# Build the sqlite.exe executable for windows.
78#
79make target_source
80OPTS='-DSTATIC_BUILD=1 -DNDEBUG=1'
81i386-mingw32msvc-gcc -Os $OPTS -Itsrc -I$TCLDIR sqlite3.c tsrc/shell.c \
82 -o sqlite3.exe
83zip doc/sqlite-$VERSW.zip sqlite3.exe
84
85# Construct a tarball of the source tree
86#
87ORIGIN=`pwd`
88cd $srcdir
89cd ..
90mv sqlite sqlite-$VERS
91EXCLUDE=`find sqlite-$VERS -print | grep CVS | sed 's,^, --exclude ,'`
92tar czf $ORIGIN/doc/sqlite-$VERS.tar.gz $EXCLUDE sqlite-$VERS
93mv sqlite-$VERS sqlite
94cd $ORIGIN
95
96#
97# Build RPMS (binary) and Source RPM
98#
99
100# Make sure we are properly setup to build RPMs
101#
102echo "%HOME %{expand:%%(cd; pwd)}" > $HOME/.rpmmacros
103echo "%_topdir %{HOME}/rpm" >> $HOME/.rpmmacros
104mkdir $HOME/rpm
105mkdir $HOME/rpm/BUILD
106mkdir $HOME/rpm/SOURCES
107mkdir $HOME/rpm/RPMS
108mkdir $HOME/rpm/SRPMS
109mkdir $HOME/rpm/SPECS
110
111# create the spec file from the template
112sed s/SQLITE_VERSION/$VERS/g $srcdir/spec.template > $HOME/rpm/SPECS/sqlite.spec
113
114# copy the source tarball to the rpm directory
115cp doc/sqlite-$VERS.tar.gz $HOME/rpm/SOURCES/.
116
117# build all the rpms
118rpm -ba $HOME/rpm/SPECS/sqlite.spec >& rpm-$vers.log
119
120# copy the RPMs into the build directory.
121mv $HOME/rpm/RPMS/i386/sqlite*-$vers*.rpm doc
122mv $HOME/rpm/SRPMS/sqlite-$vers*.rpm doc
123
124# Build the website
125#
126#cp $srcdir/../historical/* doc
127make doc
128cd doc
129chmod 644 *.gz