summaryrefslogtreecommitdiff
path: root/sqlite3
diff options
context:
space:
mode:
Diffstat (limited to 'sqlite3')
-rw-r--r--sqlite3/.gitignore21
-rw-r--r--sqlite3/INSTALL8
-rw-r--r--sqlite3/README20
-rw-r--r--sqlite3/README-DEV7
-rw-r--r--sqlite3/build/.gitignore3
-rw-r--r--sqlite3/build/bootstrap.build10
-rw-r--r--sqlite3/build/root.build17
-rw-r--r--sqlite3/buildfile52
-rw-r--r--sqlite3/manifest19
l---------sqlite3/shell.c1
l---------sqlite3/sqlite3.11
-rw-r--r--sqlite3/test.out1
12 files changed, 160 insertions, 0 deletions
diff --git a/sqlite3/.gitignore b/sqlite3/.gitignore
new file mode 100644
index 0000000..7a3c058
--- /dev/null
+++ b/sqlite3/.gitignore
@@ -0,0 +1,21 @@
+# Compiler/linker output.
+#
+*.d
+*.t
+*.i
+*.ii
+*.o
+*.obj
+*.so
+*.dll
+*.a
+*.lib
+*.exp
+*.pdb
+*.ilk
+*.exe
+*.exe.dlls/
+*.exe.manifest
+*.pc
+
+sqlite3
diff --git a/sqlite3/INSTALL b/sqlite3/INSTALL
new file mode 100644
index 0000000..d8a5e99
--- /dev/null
+++ b/sqlite3/INSTALL
@@ -0,0 +1,8 @@
+The aim of this package is to make reading the INSTALL file unnecessary. So
+next time try running:
+
+$ bpkg build sqlite3
+
+But if you don't want to use the package manager, then you can also build this
+package manually using the standard build2 build system. See buildfile for
+some configuration options.
diff --git a/sqlite3/README b/sqlite3/README
new file mode 100644
index 0000000..d26d856
--- /dev/null
+++ b/sqlite3/README
@@ -0,0 +1,20 @@
+SQLite is a C library that implements an in-process SQL database engine. A
+complete database is stored in a single file on disk. The code for SQLite is
+in the public domain. For more information see:
+
+https://sqlite.org/
+
+This package contains the original SQLite shell program source code overlaid
+with the build2-based build system and packaged for the build2 package manager
+(bpkg).
+
+See the INSTALL file for the prerequisites and installation instructions.
+
+Send questions, bug reports, or any other feedback about the program itself to
+the SQLite mailing lists. Send build system and packaging-related feedback to
+the packaging@build2.org mailing list (see https://lists.build2.org for
+posting guidelines, etc).
+
+The packaging of SQLite for build2 is tracked in a Git repository at:
+
+https://git.build2.org/cgit/packaging/sqlite/
diff --git a/sqlite3/README-DEV b/sqlite3/README-DEV
new file mode 100644
index 0000000..7683c32
--- /dev/null
+++ b/sqlite3/README-DEV
@@ -0,0 +1,7 @@
+This document describes how the sqlite3 program was packaged for build2. In
+particular, this understanding will be useful when upgrading to a new upstream
+version. See ../README-DEV for general notes on SQLite packaging.
+
+Symlink the required upstream files:
+
+$ ln -s ../upstream/{shell.c,sqlite3.1} ./
diff --git a/sqlite3/build/.gitignore b/sqlite3/build/.gitignore
new file mode 100644
index 0000000..4a730a3
--- /dev/null
+++ b/sqlite3/build/.gitignore
@@ -0,0 +1,3 @@
+config.build
+root/
+bootstrap/
diff --git a/sqlite3/build/bootstrap.build b/sqlite3/build/bootstrap.build
new file mode 100644
index 0000000..793831e
--- /dev/null
+++ b/sqlite3/build/bootstrap.build
@@ -0,0 +1,10 @@
+# file : build/bootstrap.build
+# copyright : not copyrighted - public domain
+
+project = sqlite3
+
+using version
+using config
+using dist
+using test
+using install
diff --git a/sqlite3/build/root.build b/sqlite3/build/root.build
new file mode 100644
index 0000000..678c40e
--- /dev/null
+++ b/sqlite3/build/root.build
@@ -0,0 +1,17 @@
+# file : build/root.build
+# copyright : not copyrighted - public domain
+
+using c
+
+h{*}: extension = h
+c{*}: extension = c
+
+if ($c.class == 'msvc')
+{
+ c.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS
+ c.coptions += /wd4251 /wd4275 /wd4800
+}
+
+# Specify the test target for cross-testing.
+#
+test.target = $c.target
diff --git a/sqlite3/buildfile b/sqlite3/buildfile
new file mode 100644
index 0000000..7722955
--- /dev/null
+++ b/sqlite3/buildfile
@@ -0,0 +1,52 @@
+# file : buildfile
+# copyright : not copyrighted - public domain
+
+./: exe{sqlite3} doc{INSTALL README} man1{sqlite3} manifest
+
+import libs = libsqlite3%lib{sqlite3}
+
+exe{sqlite3}: {h c}{*} $libs
+
+gcc = ($c.class == 'gcc')
+
+# Build options.
+#
+# By default we are going to build a spartan shell without readline support
+# since if you are on a system that has readline then you probably already
+# have sqlite3 and won't be building this package in the first place. But
+# if you want readline, then you can enable it like this:
+#
+# config.c.poptions=-DHAVE_READLINE config.c.libs="-lreadline -lncurses"
+#
+
+# This is the subset of features that we enable by default in libsqlite3 and
+# that affect the shell. They can be overridden in the same way.
+#
+#cc.poptions =+ -DSQLITE_ENABLE_SESSION=1
+
+# Both Debian and Fedora add this so gotta be important.
+#
+if $gcc
+ c.coptions += -fno-strict-aliasing
+
+# Disable warnings that pop up with -Wextra. Upstream doesn't seem to care
+# about these and it is not easy to disable specific warnings in a way that
+# works across compilers/version (some -Wno-* options are only recognized in
+# newer versions). Some warnings may still appear for certain (newer)
+# platforms/compilers. We pass them through but disable treating them as
+# errors.
+#
+if $gcc
+ c.coptions += -Wno-extra -Wno-error
+
+# Smoke test.
+#
+exe{sqlite3}: file{test.out}: test.stdout = true
+exe{sqlite3}: test.arguments = ':memory:' \
+'CREATE TABLE test (id INTEGER PRIMARY KEY);
+INSERT INTO test VALUES(123);
+SELECT * FROM test;'
+
+# Don't install INSTALL file.
+#
+doc{INSTALL}@./: install = false
diff --git a/sqlite3/manifest b/sqlite3/manifest
new file mode 100644
index 0000000..1d2d25e
--- /dev/null
+++ b/sqlite3/manifest
@@ -0,0 +1,19 @@
+: 1
+name: sqlite3
+version: 3.18.2+7
+project: sqlite
+summary: SQLite database engine shell program
+license: public domain
+tags: sql, database, shell
+description-file: README
+url: https://sqlite.org/
+doc-url: https://sqlite.org/cli.html
+src-url: https://git.build2.org/cgit/packaging/sqlite/sqlite/tree/sqlite3/
+package-url: https://git.build2.org/cgit/packaging/sqlite/
+email: sqlite-users@mailinglists.sqlite.org ; Mailing list.
+package-email: packaging@build2.org ; Mailing list.
+build-error-email: builds@build2.org
+builds: all
+depends: * build2 >= 0.9.0
+depends: * bpkg >= 0.9.0
+depends: libsqlite3 == $
diff --git a/sqlite3/shell.c b/sqlite3/shell.c
new file mode 120000
index 0000000..f99bc09
--- /dev/null
+++ b/sqlite3/shell.c
@@ -0,0 +1 @@
+../upstream/shell.c \ No newline at end of file
diff --git a/sqlite3/sqlite3.1 b/sqlite3/sqlite3.1
new file mode 120000
index 0000000..d3a163c
--- /dev/null
+++ b/sqlite3/sqlite3.1
@@ -0,0 +1 @@
+../upstream/sqlite3.1 \ No newline at end of file
diff --git a/sqlite3/test.out b/sqlite3/test.out
new file mode 100644
index 0000000..190a180
--- /dev/null
+++ b/sqlite3/test.out
@@ -0,0 +1 @@
+123