Skip to content

Commit b79c330

Browse files
committed
switch-sqlite: add package
1 parent 58ce063 commit b79c330

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

switch/sqlite/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
switch-sqlite

switch/sqlite/PKGBUILD

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Contributor: Martin Larralde <[email protected]>
2+
3+
pkgname="switch-sqlite"
4+
_srcver=3300100
5+
_docver=${_srcver}
6+
pkgver=3.30.1
7+
pkgrel=1
8+
pkgdesc="A C library that implements an SQL database engine"
9+
arch=('any')
10+
license=('custom:Public Domain')
11+
options=(!emptydirs !makeflags !strip libtool staticlibs)
12+
url="https://www.sqlite.org/"
13+
depends=('switch-zlib')
14+
makedepends=('switch-pkg-config' 'devkitpro-pkgbuild-helpers')
15+
source=(https://www.sqlite.org/2019/sqlite-src-${_srcver}.zip
16+
license.txt)
17+
provides=("switch-sqlite3=$pkgver")
18+
replaces=("switch-sqlite3")
19+
groups=('switch-portlibs')
20+
21+
sha1sums=('3dec734206fab0cdceb421021964ff7e3fedf3b0'
22+
'f34f6daa4ab3073d74e774aad21d66878cf26853')
23+
24+
prepare() {
25+
cd sqlite-src-$_srcver
26+
# autoreconf -vfi
27+
}
28+
29+
build() {
30+
# get devkitpro variables
31+
source /opt/devkitpro/switchvars.sh
32+
33+
# additional compatibility flags for the Switch
34+
export CPPFLAGS="$CPPFLAGS -DSQLITE_OMIT_WAL=1"
35+
36+
# build only the sqlite libray
37+
cd sqlite-src-$_srcver
38+
./configure --prefix=$PORTLIBS_PREFIX \
39+
--host=aarch64-none-elf \
40+
--disable-shared \
41+
--enable-static \
42+
--disable-load-extension \
43+
--disable-readline \
44+
--disable-tcl \
45+
--with-gnu-ld \
46+
--with-pic
47+
make libsqlite3.la
48+
}
49+
50+
package() {
51+
source /opt/devkitpro/switchvars.sh
52+
53+
# install the library
54+
cd sqlite-src-$_srcver
55+
make DESTDIR="${pkgdir}" lib_install
56+
57+
# install the license
58+
install -D -m644 "${srcdir}"/license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt
59+
}

switch/sqlite/license.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
SQLite Copyright
2+
SQLite is in the
3+
Public Domain
4+
5+
6+
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.
7+
8+
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.
9+
10+
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.
11+
Obtaining An Explicit License To Use SQLite
12+
13+
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:
14+
You are using SQLite in a jurisdiction that does not recognize the public domain.
15+
You are using SQLite in a jurisdiction that does not recognize the right of an author to dedicate their work to the public domain.
16+
You want to hold a tangible legal document as evidence that you have the legal right to use and distribute SQLite.
17+
Your legal department tells you that you have to purchase a license.
18+
19+
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.
20+
Contributed Code
21+
22+
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:
23+
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.
24+
25+
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:
26+
Hwaci
27+
6200 Maple Cove Lane
28+
Charlotte, NC 28269
29+
USA
30+
31+
A template copyright release is available in PDF or HTML. You can use this release to make future changes.
32+
33+
see http://www.sqlite.org/copyright.html

0 commit comments

Comments
 (0)