2010-02-25 Brian Lu <
[email protected]>
* SUNWsqlite3.spec:
* base-specs/sqlite.spec:
* copyright/SUNWsqlite3.copyright:
* ext-sources/mapfile-libsqlite3:
* manpages/Makefile:
* manpages/man1/sqlite3.1:
* patches/sqlite3-01-using-mapfile.diff:
Ship sqlite3 packages
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/SUNWsqlite3.spec Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,146 @@
+#
+# spec file for package SUNWsqlite3
+#
+# includes module(s): sqlite3
+#
+# Copyright 2009 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+%define owner hawklu
+#
+%include Solaris.inc
+
+%ifarch amd64 sparcv9
+%include arch64.inc
+%use sqlite_64= sqlite.spec
+%endif
+
+%include base.inc
+
+%use sqlite= sqlite.spec
+
+Name: SUNWsqlite3
+Vendor: Sun Microsystems, Inc.
+Summary: SQL database engine library
+Version: %{sqlite.version}
+Source: %{name}-manpages-0.1.tar.gz
+SUNW_BaseDir: %{_basedir}
+SUNW_Copyright: %{name}.copyright
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+%include default-depend.inc
+
+%package devel
+Summary: %{summary} - development files
+SUNW_BaseDir: %{_basedir}
+%include default-depend.inc
+Requires: SUNWsqlite3
+
+%package -n SUNWsqlite3tcl
+Summary: %{summary} - tcl files
+SUNW_BaseDIR: %{_basedir}
+%include default-depend.inc
+Requires: SUNWsqlite3
+
+%package -n SUNWsqlite3docs
+Summary: %{summary} - Documention
+SUNW_BaseDIR: %{_basedir}
+%include default-depend.inc
+Requires: SUNWsqlite3
+
+%prep
+rm -rf %name-%version
+mkdir %name-%version
+
+%ifarch amd64 sparcv9
+mkdir %name-%version/%_arch64
+
+%sqlite_64.prep -d %name-%version/%_arch64
+%endif
+
+mkdir %name-%version/%{base_arch}
+%sqlite.prep -d %name-%version/%{base_arch}
+
+cd %{_builddir}/%name-%version
+gzcat %SOURCE0 | tar xf -
+
+%ifarch amd64 sparcv9
+cd %{_builddir}/%name-%version/%{_arch64}/sqlite-%{sqlite.version}
+%endif
+
+%build
+
+%ifarch amd64 sparcv9
+export TCLLIBDIR=/usr/lib/tcl8.4/sqlite3/%{_arch64}
+%sqlite_64.build -d %name-%version/%_arch64
+%endif
+
+unset TCLLIBDIR
+%sqlite.build -d %name-%version/%{base_arch}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%ifarch amd64 sparcv9
+%sqlite_64.install -d %name-%version/%_arch64
+rm -rf $RPM_BUILD_ROOT/%{_bindir}/%_arch64/
+%endif
+
+%sqlite.install -d %name-%version/%{base_arch}
+
+rm -rf $RPM_BUILD_ROOT%{_mandir}
+cd %{_builddir}/%name-%version/sun-manpages
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%{?pkgbuild_postprocess: %pkgbuild_postprocess -v -c "%{version}:%{jds_version}:%{name}:$RPM_ARCH:%(date +%%Y-%%m-%%d):%{support_level}" $RPM_BUILD_ROOT}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,bin)
+%dir %attr (0755, root, bin) %{_bindir}
+%{_bindir}/sqlite3
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/lib*.so*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %{_libdir}/%{_arch64}
+%{_libdir}/%{_arch64}/lib*.so*
+%endif
+%dir %attr (0755, root, sys) %{_datadir}
+%dir %attr(0755, root, bin) %{_mandir}
+%dir %attr(0755, root, bin) %{_mandir}/man1
+%{_mandir}/man1/*
+
+%files devel
+%defattr (-, root, bin)
+%dir %attr (0755, root, bin) %dir %{_libdir}
+%dir %attr (0755, root, other) %{_libdir}/pkgconfig
+%{_libdir}/pkgconfig/*
+%dir %attr (0755, root, bin) %dir %{_includedir}
+%{_includedir}/*
+%ifarch amd64 sparcv9
+%dir %attr (0755, root, bin) %dir %{_libdir}/%{_arch64}
+%dir %attr (0755, root, other) %{_libdir}/%{_arch64}/pkgconfig
+%{_libdir}/%{_arch64}/pkgconfig/*
+%endif
+
+%files -n SUNWsqlite3tcl
+%defattr(-,root,bin)
+%dir %attr (0755, root, bin) %{_libdir}
+%{_libdir}/tcl8.4/sqlite3/*
+%ifarch amd64 sparcv9
+#%dir %attr (0755, root, bin) %{_libdir}/tcl8.4/sqlite3/%{_arch64}
+#%{_libdir}/tcl8.4/sqlite3/%{_arch64}/*
+%endif
+
+%files -n SUNWsqlite3docs
+%defattr(-,root,bin)
+%dir %attr (0755, root, bin) %{_datadir}/doc
+%{_datadir}/doc/sqlite3/*
+
+%changelog
+* Fri Jan 15 2010 - [email protected]
+- initial spec created
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/sqlite.spec Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,125 @@
+#
+# Copyright (c) 2008 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+%define owner hawklu
+# bugdb: bugzilla.freedesktop.org
+#
+
+%define OSR 4091:1.0.2
+%define doc_version 3_6_22
+
+Name: sqlite
+License: LGPL
+Group: System/Libraries
+Version: 3.6.22
+Release: 1
+Distribution: Java Desktop System
+Vendor: Sun Microsystems, Inc.
+Summary: SQL database engine
+Source: http://www.sqlite.org/%{name}-%{version}.tar.gz
+Source1: mapfile-libsqlite3
+Source2: http://www.sqlite.org/%{name}_docs_%{doc_version}.zip
+Source3: pkgIndex.tcl
+
+
+# owner:hawklu date:2008-10-10 type:bug bugster:6750518
+Patch1: sqlite3-01-using-mapfile.diff
+
+URL: http://www.sqlite.org
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+Docdir: %{_defaultdocdir}
+Autoreqprov: on
+
+%description
+SQLite is a software library that implements a self-contained,
+serverless, zero-configuration, transactional SQL database engine.
+SQLite is the most widely deployed SQL database engine in the world.
+
+%package devel
+Summary: SQL database engine library
+Group: Development/Libraries
+Requires: %{name} = %{version}
+
+%description devel
+SQLite is a software library that implements a self-contained,
+serverless, zero-configuration, transactional SQL database engine.
+SQLite is the most widely deployed SQL database engine in the world.
+
+%prep
+%setup -q
+
+%patch1 -p1
+
+%build
+%ifos linux
+if [ -x /usr/bin/getconf ]; then
+ CPUS=`getconf _NPROCESSORS_ONLN`
+fi
+%else
+ CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '`
+%endif
+if test "x$CPUS" = "x" -o $CPUS = 0; then
+ CPUS=1
+fi
+
+export PATH=`pwd`:$PATH
+
+cp %{SOURCE1} .
+
+%if %option_with_debug
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
+%else
+ export CFLAGS="%optflags -D_POSIX_PTHREAD_SEMANTICS -DNDEBUG -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_FTS3 -DUSE_PREAD -DHAVE_USLEEP -DHAVE_FDATASYNC -DHAVE_STATVFS -I. "
+%endif
+
+export LDFLAGS="%_ldflags -Bdirect"
+./configure \
+ --prefix=%{_prefix} \
+ --libdir=%{_libdir} \
+ --bindir=%{_bindir} \
+ --enable-threadsafe \
+ --enable-cross-thread-connections \
+ --enable-load-extension \
+ --enable-shared \
+ --disable-static \
+ --with-tcl="/usr/lib"
+
+make -j $CPUS
+
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+rm $RPM_BUILD_ROOT%{_libdir}/*.la
+
+#install pkgIndex.tcl
+cp %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3
+%ifarch amd64 sparcv9
+rm -f $RPM_BUILD_ROOT/usr/lib/tcl8.4/sqlite3/%{_arch64}/pkgIndex.tcl
+%endif
+
+# install docs
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc
+cd $RPM_BUILD_ROOT%{_datadir}/doc
+unzip %{SOURCE2}
+mv %{name}-%{doc_version}-docs sqlite3
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root)
+%doc AUTHORS ChangeLog COPYING NEWS README TODO
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*
+
+%changelog
+* Fri Jan 15 2010 - [email protected]
+- initial version of the spec file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/copyright/SUNWsqlite3.copyright Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,72 @@
+SQLite is in the Public Domain
+
+All of the deliverable code in SQLite has been dedicated to the public
+domain by the authors. All code authors, and representatives of the
+companies they work for, have signed affidavits dedicating their
+contributions to the public domain and originals of those signed
+affidavits are stored in a firesafe at the main offices of Hwaci. Anyone
+is free to copy, modify, publish, use, compile, sell, or distribute the
+original SQLite code, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any means.
+
+The previous paragraph applies to the deliverable code in SQLite - those
+parts of the SQLite library that you actually bundle and ship with a
+larger application. Portions of the documentation and some code used as
+part of the build process might fall under other licenses. The details
+here are unclear. We do not worry about the licensing of the
+documentation and build code so much because none of these things are
+part of the core deliverable SQLite library.
+
+All of the deliverable code in SQLite has been written from scratch. No
+code has been taken from other projects or from the open internet. Every
+line of code can be traced back to its original author, and all of those
+authors have public domain dedications on file. So the SQLite code base
+is clean and is uncontaminated with licensed code from other projects.
+Obtaining An Explicit License To Use SQLite
+
+Even though SQLite is in the public domain and does not require a
+license, some users want to obtain a license anyway. Some reasons for
+obtaining a license include:
+
+ * You are using SQLite in a jurisdiction that does not recognize the
+ public domain.
+ * You are using SQLite in a jurisdiction that does not recognize the
+ right of an author to dedicate their work to the public domain.
+ * You want to hold a tangible legal document as evidence that you
+ have the legal right to use and distribute SQLite.
+ * Your legal department tells you that you have to purchase a
+ license.
+
+If you feel like you really have to purchase a license for SQLite,
+Hwaci, the company that employs the architect and principal developers
+of SQLite, will sell you one. Contributed Code
+
+In order to keep SQLite completely free and unencumbered by copyright,
+all new contributors to the SQLite code base are asked to dedicate their
+contributions to the public domain. If you want to send a patch or
+enhancement for possible inclusion in the SQLite source tree, please
+accompany the patch with the following statement:
+
+The author or authors of this code dedicate any and all copyright
+interest in this code to the public domain. We make this dedication for
+the benefit of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+code under copyright law.
+
+We are not able to accept patches or changes to SQLite that are not
+accompanied by a statement such as the above. In addition, if you make
+changes or enhancements as an employee, then a simple statement such as
+the above is insufficient. You must also send by surface mail a
+copyright release signed by a company officer. A signed original of the
+copyright release should be mailed to:
+
+ Hwaci
+ 6200 Maple Cove Lane
+ Charlotte, NC 28269
+ USA
+
+A template copyright release is available in PDF or HTML. You can use
+this release to make future changes. This page last modified 2007/11/14
+15:25:42 UTC
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/ext-sources/mapfile-libsqlite3 Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,216 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "@(#)mapfile-libsqlite3 1.4 09/06/05 SMI"
+#
+# Defines the public interface to SQLite3
+#
+sqlite_3.6.22 {
+ global:
+ sqlite3_sourceid;
+} sqlite_3.6.17;
+
+sqlite_3.6.17 {
+ global:
+ sqlite3_enable_load_extension;
+ sqlite3_load_extension;
+ sqlite3_strnicmp;
+} sqlite_3.5.4;
+
+sqlite_3.5.4 {
+ global:
+ # exported functions
+ sqlite3_aggregate_context;
+ sqlite3_aggregate_count;
+ sqlite3_auto_extension;
+ sqlite3_backup_finish;
+ sqlite3_backup_init;
+ sqlite3_backup_pagecount;
+ sqlite3_backup_remaining;
+ sqlite3_backup_step;
+ sqlite3_bind_blob;
+ sqlite3_bind_double;
+ sqlite3_bind_int;
+ sqlite3_bind_int64;
+ sqlite3_bind_null;
+ sqlite3_bind_parameter_count;
+ sqlite3_bind_parameter_index;
+ sqlite3_bind_parameter_name;
+ sqlite3_bind_text;
+ sqlite3_bind_text16;
+ sqlite3_bind_value;
+ sqlite3_bind_zeroblob;
+ sqlite3_blob_bytes;
+ sqlite3_blob_close;
+ sqlite3_blob_open;
+ sqlite3_blob_read;
+ sqlite3_blob_write;
+ sqlite3_busy_handler;
+ sqlite3_busy_timeout;
+ sqlite3_changes;
+ sqlite3_clear_bindings;
+ sqlite3_close;
+ sqlite3_collation_needed;
+ sqlite3_collation_needed16;
+ sqlite3_column_blob;
+ sqlite3_column_bytes;
+ sqlite3_column_bytes16;
+ sqlite3_column_count;
+ sqlite3_column_decltype;
+ sqlite3_column_decltype16;
+ sqlite3_column_double;
+ sqlite3_column_int;
+ sqlite3_column_int64;
+ sqlite3_column_name;
+ sqlite3_column_name16;
+ sqlite3_column_text;
+ sqlite3_column_text16;
+ sqlite3_column_type;
+ sqlite3_column_value;
+ sqlite3_commit_hook;
+ sqlite3_complete;
+ sqlite3_complete16;
+ sqlite3_config;
+ sqlite3_context_db_handle;
+ sqlite3_create_collation;
+ sqlite3_create_collation16;
+ sqlite3_create_collation_v2;
+ sqlite3_create_function;
+ sqlite3_create_function16;
+ sqlite3_create_module;
+ sqlite3_create_module_v2;
+ sqlite3_data_count;
+ sqlite3_db_config;
+ sqlite3_db_handle;
+ sqlite3_db_mutex;
+ sqlite3_db_status;
+ sqlite3_declare_vtab;
+ sqlite3_enable_shared_cache;
+ sqlite3_errcode;
+ sqlite3_errmsg;
+ sqlite3_errmsg16;
+ sqlite3_exec;
+ sqlite3_expired;
+ sqlite3_extended_errcode;
+ sqlite3_extended_result_codes;
+ sqlite3_file_control;
+ sqlite3_finalize;
+ sqlite3_free;
+ sqlite3_free_table;
+ sqlite3_get_autocommit;
+ sqlite3_get_auxdata;
+ sqlite3_get_table;
+ sqlite3_global_recover;
+ sqlite3_initialize;
+ sqlite3_interrupt;
+ sqlite3_last_insert_rowid;
+ sqlite3_libversion;
+ sqlite3_libversion_number;
+ sqlite3_limit;
+ sqlite3_malloc;
+ sqlite3_memory_alarm;
+ sqlite3_memory_highwater;
+ sqlite3_memory_used;
+ sqlite3_mprintf;
+ sqlite3_mutex_alloc;
+ sqlite3_mutex_enter;
+ sqlite3_mutex_free;
+ sqlite3_mutex_leave;
+ sqlite3_mutex_try;
+ sqlite3_next_stmt;
+ sqlite3_open;
+ sqlite3_open16;
+ sqlite3_open_v2;
+ sqlite3_os_end;
+ sqlite3_os_init;
+ sqlite3_overload_function;
+ sqlite3_prepare;
+ sqlite3_prepare16;
+ sqlite3_prepare16_v2;
+ sqlite3_prepare_v2;
+ sqlite3_profile;
+ sqlite3_progress_handler;
+ sqlite3_randomness;
+ sqlite3_realloc;
+ sqlite3_release_memory;
+ sqlite3_reset;
+ sqlite3_reset_auto_extension;
+ sqlite3_result_blob;
+ sqlite3_result_double;
+ sqlite3_result_error;
+ sqlite3_result_error16;
+ sqlite3_result_error_code;
+ sqlite3_result_error_nomem;
+ sqlite3_result_error_toobig;
+ sqlite3_result_int;
+ sqlite3_result_int64;
+ sqlite3_result_null;
+ sqlite3_result_text;
+ sqlite3_result_text16;
+ sqlite3_result_text16be;
+ sqlite3_result_text16le;
+ sqlite3_result_value;
+ sqlite3_result_zeroblob;
+ sqlite3_rollback_hook;
+ sqlite3_set_authorizer;
+ sqlite3_set_auxdata;
+ sqlite3_shutdown;
+ sqlite3_sleep;
+ sqlite3_snprintf;
+ sqlite3_soft_heap_limit;
+ sqlite3_sql;
+ sqlite3_status;
+ sqlite3_step;
+ sqlite3_stmt_status;
+ sqlite3_test_control;
+ sqlite3_thread_cleanup;
+ sqlite3_threadsafe;
+ sqlite3_total_changes;
+ sqlite3_trace;
+ sqlite3_transfer_bindings;
+ sqlite3_update_hook;
+ sqlite3_user_data;
+ sqlite3_value_blob;
+ sqlite3_value_bytes;
+ sqlite3_value_bytes16;
+ sqlite3_value_double;
+ sqlite3_value_int;
+ sqlite3_value_int64;
+ sqlite3_value_numeric_type;
+ sqlite3_value_text;
+ sqlite3_value_text16;
+ sqlite3_value_text16be;
+ sqlite3_value_text16le;
+ sqlite3_value_type;
+ sqlite3_vfs_find;
+ sqlite3_vfs_register;
+ sqlite3_vfs_unregister;
+ sqlite3_vmprintf;
+
+ # exported data
+ sqlite3_temp_directory;
+ sqlite3_version;
+
+ local:
+ *;
+};
--- a/manpages/Makefile Thu Feb 25 08:32:31 2010 +0000
+++ b/manpages/Makefile Thu Feb 25 09:24:56 2010 +0000
@@ -180,6 +180,7 @@
SUNWrealplayer \
SUNWseahorse \
SUNWsigcpp \
+ SUNWsqlite3 \
SUNWthunderbird \
SUNWvinagre \
SUNWlibunique \
@@ -838,6 +839,10 @@
man1/realplay.1
SUNWrealplayer.PAGES: $(SUNWrealplayer_PAGES)
+SUNWsqlite3_PAGES= \
+ man1/sqlite3.1
+SUNWsqlite3.PAGES: $(SUNWsqlite3_PAGES)
+
SUNWthunderbird_PAGES = \
man1/thunderbird.1
SUNWthunderbird.PAGES: $(SUNWthunderbird_PAGES)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/manpages/man1/sqlite3.1 Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,229 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH SQLITE3 1 "Mon Apr 15 23:49:17 2002"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+.B sqlite3
+\- A command line interface for SQLite version 3
+
+.SH SYNOPSIS
+.B sqlite3
+.RI [ options ]
+.RI [ databasefile ]
+.RI [ SQL ]
+
+.SH SUMMARY
+.PP
+.B sqlite3
+is a terminal-based front-end to the SQLite library that can evaluate
+queries interactively and display the results in multiple formats.
+.B sqlite3
+can also be used within shell scripts and other applications to provide
+batch processing features.
+
+.SH DESCRIPTION
+To start a
+.B sqlite3
+interactive session, invoke the
+.B sqlite3
+command and optionally provide the name of a database file. If the
+database file does not exist, it will be created. If the database file
+does exist, it will be opened.
+
+For example, to create a new database file named "mydata.db", create
+a table named "memos" and insert a couple of records into that table:
+.sp
+$
+.B sqlite3 mydata.db
+.br
+SQLite version 3.1.3
+.br
+Enter ".help" for instructions
+.br
+sqlite>
+.B create table memos(text, priority INTEGER);
+.br
+sqlite>
+.B insert into memos values('deliver project description', 10);
+.br
+sqlite>
+.B insert into memos values('lunch with Christine', 100);
+.br
+sqlite>
+.B select * from memos;
+.br
+deliver project description|10
+.br
+lunch with Christine|100
+.br
+sqlite>
+.sp
+
+If no database name is supplied, the ATTACH sql command can be used
+to attach to existing or create new database files. ATTACH can also
+be used to attach to multiple databases within the same interactive
+session. This is useful for migrating data between databases,
+possibly changing the schema along the way.
+
+Optionally, a SQL statement or set of SQL statements can be supplied as
+a single argument. Multiple statements should be separated by
+semi-colons.
+
+For example:
+.sp
+$
+.B sqlite3 -line mydata.db 'select * from memos where priority > 20;'
+.br
+ text = lunch with Christine
+.br
+priority = 100
+.br
+.sp
+
+.SS SQLITE META-COMMANDS
+.PP
+The interactive interpreter offers a set of meta-commands that can be
+used to control the output format, examine the currently attached
+database files, or perform administrative operations upon the
+attached databases (such as rebuilding indices). Meta-commands are
+always prefixed with a dot (.).
+
+A list of available meta-commands can be viewed at any time by issuing
+the '.help' command. For example:
+.sp
+sqlite>
+.B .help
+.nf
+.cc |
+.databases List names and files of attached databases
+.dump ?TABLE? ... Dump the database in an SQL text format
+.echo ON|OFF Turn command echo on or off
+.exit Exit this program
+.explain ON|OFF Turn output mode suitable for EXPLAIN on or off.
+.header(s) ON|OFF Turn display of headers on or off
+.help Show this message
+.import FILE TABLE Import data from FILE into TABLE
+.indices TABLE Show names of all indices on TABLE
+.mode MODE ?TABLE? Set output mode where MODE is one of:
+ csv Comma-separated values
+ column Left-aligned columns. (See .width)
+ html HTML <table> code
+ insert SQL insert statements for TABLE
+ line One value per line
+ list Values delimited by .separator string
+ tabs Tab-separated values
+ tcl TCL list elements
+.nullvalue STRING Print STRING in place of NULL values
+.output FILENAME Send output to FILENAME
+.output stdout Send output to the screen
+.prompt MAIN CONTINUE Replace the standard prompts
+.quit Exit this program
+.read FILENAME Execute SQL in FILENAME
+.schema ?TABLE? Show the CREATE statements
+.separator STRING Change separator used by output mode and .import
+.show Show the current values for various settings
+.tables ?PATTERN? List names of tables matching a LIKE pattern
+.timeout MS Try opening locked tables for MS milliseconds
+.width NUM NUM ... Set column widths for "column" mode
+sqlite>
+|cc .
+.sp
+.fi
+
+.SH OPTIONS
+.B sqlite3
+has the following options:
+.TP
+.BI \-init\ file
+Read and execute commands from
+.I file
+, which can contain a mix of SQL statements and meta-commands.
+.TP
+.B \-echo
+Print commands before execution.
+.TP
+.B \-[no]header
+Turn headers on or off.
+.TP
+.B \-column
+Query results will be displayed in a table like form, using
+whitespace characters to separate the columns and align the
+output.
+.TP
+.B \-html
+Query results will be output as simple HTML tables.
+.TP
+.B \-line
+Query results will be displayed with one value per line, rows
+separated by a blank line. Designed to be easily parsed by
+scripts or other programs
+.TP
+.B \-list
+Query results will be displayed with the separator (|, by default)
+character between each field value. The default.
+.TP
+.BI \-separator\ separator
+Set output field separator. Default is '|'.
+.TP
+.BI \-nullvalue\ string
+Set string used to represent NULL values. Default is ''
+(empty string).
+.TP
+.B \-version
+Show SQLite version.
+.TP
+.B \-help
+Show help on options and exit.
+
+
+.SH INIT FILE
+.B sqlite3
+reads an initialization file to set the configuration of the
+interactive environment. Throughout initialization, any previously
+specified setting can be overridden. The sequence of initialization is
+as follows:
+
+o The default configuration is established as follows:
+
+.sp
+.nf
+.cc |
+mode = LIST
+separator = "|"
+main prompt = "sqlite> "
+continue prompt = " ...> "
+|cc .
+.sp
+.fi
+
+o If the file
+.B ~/.sqliterc
+exists, it is processed first.
+can be found in the user's home directory, it is
+read and processed. It should generally only contain meta-commands.
+
+o If the -init option is present, the specified file is processed.
+
+o All other command line options are processed.
+
+.SH SEE ALSO
+http://www.sqlite.org/
+.br
+The sqlite-doc package
+.SH AUTHOR
+This manual page was originally written by Andreas Rottmann
+<[email protected]>, for the Debian GNU/Linux system (but may be used
+by others). It was subsequently revised by Bill Bumgarner <[email protected]>.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/sqlite3-01-using-mapfile.diff Thu Feb 25 09:24:56 2010 +0000
@@ -0,0 +1,10 @@
+--- sqlite-3.6.17/Makefile.in.old 2010-01-21 17:09:24.462557000 +0800
++++ sqlite-3.6.17/Makefile.in 2010-01-25 16:43:36.314568000 +0800
+@@ -463,6 +463,7 @@
+
+ libsqlite3.la: $(LIBOBJ)
+ $(LTLINK) -o $@ $(LIBOBJ) $(TLIBS) \
++ -Wc,-M,mapfile-libsqlite3 \
+ ${ALLOWRELEASE} -rpath "$(libdir)" -version-info "8:6:8"
+
+ libtclsqlite3.la: tclsqlite.lo libsqlite3.la