1 # Build recipe for sqlite.
3 # Copyright (c) 2019-2020 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # Exit immediately on any error
24 # Define a category for the output of the package name
27 tarname=${program}-autoconf-${version}.tar.gz
30 fetch=http://sqlite.org/2020/$tarname
33 SQlite is a C-language library that implements a SQL database engine.
35 The sqlite package is a software library that implements a
36 self-contained, serverless, zero-configuration, transactional
40 homepage=http://www.sqlite.org
41 license="Public Domain"
43 # Source documentation
45 docsdir="${docdir}/${program}-${version}"
47 # The source has a custom source directory
48 srcdir=${program}-autoconf-${version}
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 ./configure LDFLAGS="$QILDFLAGS" \
61 --libdir=/usr/lib${libSuffix} \
64 --build="$(gcc -dumpmachine)" \
67 -DSQLITE_ENABLE_FTS3=1 \
68 -DSQLITE_ENABLE_FTS4=1 \
69 -DSQLITE_ENABLE_COLUMN_METADATA=1 \
70 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 \
71 -DSQLITE_ENABLE_DBSTAT_VTAB=1 \
72 -DSQLITE_SECURE_DELETE=1 \
73 -DSQLITE_ENABLE_FTS3_TOKENIZER=1"
75 make -j${jobs} V=1 && make -j${jobs} check
76 make -j${jobs} DESTDIR="$destdir" install-strip
78 # Build TCL extension (TEA)
82 ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
83 $configure_args --libdir=/usr/lib${libSuffix}
85 make -j${jobs} && make -j${jobs} DESTDIR="$destdir" install
89 # Compress and link man pages (if needed)
90 if test -d "${destdir}/$mandir"
93 cd "${destdir}/$mandir"
94 find . -type f -exec lzip -9 {} +
95 find . -type l | while read -r file
97 ln -sf "$(readlink -- "$file").lz" "${file}.lz"
104 mkdir -p "${destdir}${docsdir}"
105 cp -p $docs "${destdir}${docsdir}"