This document describes the approach applied to packaging SQLite for build2. In particular, this understanding will be useful when upgrading to a new upstream version. The upstream package contains the libsqlite3 library and the sqlite3 program that we package separately (see the respective README-DEV files for details). We extract the upstream package from the archive and symlink the required files into the build2 package subdirectories. For 3.27.2 the archive URL is https://www.sqlite.org/2019/sqlite-autoconf-3270200.tar.gz. For the future releases the URL can be deduced from the above. The upstream package can be configured to contain a specific feature set. We reproduce the union of features configured for the upstream source package in Debian and Fedora distributions. The configuration options defining these sets are specified in the Debian's rules and Fedora's RPM .spec files. Note, however, that at the time of this writing Fedora doesn't provide the 3.27.2 package version, so we will use 3.29.0 instead. These files can be obtained as follows: $ wget http://deb.debian.org/debian/pool/main/s/sqlite3/sqlite3_3.27.2-3.debian.tar.xz $ tar xf sqlite3_3.27.2-3.debian.tar.xz debian/rules $ wget https://kojipkgs.fedoraproject.org//packages/sqlite/3.29.0/2.fc31/src/sqlite-3.29.0-2.fc31.src.rpm $ rpm2cpio sqlite-3.29.0-2.fc31.src.rpm | cpio -civ '*.spec' Some of the features are enabled via the preprocessor macro definitions and others via the configure script options. Here are the discovered configuration options. Debian: -DSQLITE_SECURE_DELETE -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY -DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_ENABLE_DBSTAT_VTAB -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 -DSQLITE_ENABLE_LOAD_EXTENSION -DSQLITE_ENABLE_JSON1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS -DSQLITE_THREADSAFE=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_USE_URI=1 -DSQLITE_MAX_SCHEMA_RETRY=25 -DSQLITE_ENABLE_PREUPDATE_HOOK -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_STMTVTAB -DSQLITE_MAX_VARIABLE_NUMBER=250000 --enable-threadsafe --enable-load-extension --enable-json1 --enable-fts4 --enable-fts5 Fedora: -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_DISABLE_DIRSYNC=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_JSON1=1 --enable-fts5 --enable-threadsafe --enable-threads-override-locks --enable-load-extension Translating the configure script options into the macro definitions and adding the unconditionally defined macros (see upstream's Makefile.am for details) we end up with: -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1 -DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_FTS3_PARENTHESIS=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_LOAD_EXTENSION=1 -DSQLITE_ENABLE_PREUPDATE_HOOK=1 -DSQLITE_ENABLE_RTREE=1 -DSQLITE_ENABLE_SESSION=1 -DSQLITE_ENABLE_STMTVTAB=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT=1 -DSQLITE_LIKE_DOESNT_MATCH_BLOBS=1 -DSQLITE_MAX_SCHEMA_RETRY=25 -DSQLITE_MAX_VARIABLE_NUMBER=250000 -DSQLITE_OMIT_LOOKASIDE=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_SOUNDEX=1 -DSQLITE_THREADSAFE=1 -DSQLITE_USE_URI=1 As a side note, on Debian and Fedora the library, headers and program are packaged as follows: libsqlite3 headers sqlite3 Debian/Ubuntu: libsqlite3-0 libsqlite3-dev sqlite3 Fedora/RHEL: sqlite-libs sqlite-devel sqlite Search for the Debian and Fedora packages at https://packages.debian.org/search and https://apps.fedoraproject.org/packages/.