2 # Copyright (C) 2006-2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-autoconf-
$(PKG_VERSION
).
tar.gz
15 PKG_HASH
:=5daa6a3fb7d1e8c767cd59c4ded8da6e4b00c61d3b466d0685e35c4dd6d7bf5d
16 PKG_SOURCE_URL
:=https
://www.sqlite.org
/2018/
18 PKG_LICENSE
:=PUBLICDOMAIN
21 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-autoconf-
$(PKG_VERSION
)
22 PKG_BUILD_DEPENDS
:=libncurses libreadline
28 include $(INCLUDE_DIR
)/package.mk
30 define Package
/sqlite3
/Default
32 TITLE
:=SQLite
(v3.x
) database engine
33 URL
:=http
://www.sqlite.org
/
34 MAINTAINER
:=Etienne CHAMPETIER
<champetier.etienne@gmail.com
>
37 define Package
/sqlite3
/Default
/description
38 SQLite is a small C library that implements a self-contained
, embeddable
,
39 zero-configuration SQL database engine.
42 define Package
/libsqlite3
43 $(call Package
/sqlite3
/Default
)
46 DEPENDS
:=+libpthread
+zlib
50 define Package
/libsqlite3
/description
51 $(call Package
/sqlite3
/Default
/description
)
52 This package contains the SQLite
(v3.x
) shared library
, used by other
56 define Package
/sqlite3-cli
57 $(call Package
/sqlite3
/Default
)
60 DEPENDS
:=+libsqlite3
+libncurses
+libreadline
64 define Package
/sqlite3-cli
/description
65 $(call Package
/sqlite3
/Default
/description
)
66 This package contains a terminal-based front-end to the SQLite
(v3.x
) library
67 that can evaluate queries interactively and display the results in multiple
71 # On uClibc libm needs to be linked in for ISNAN()
72 TARGET_LDFLAGS
+= $(if
$(CONFIG_USE_UCLIBC
),-lm
)
74 TARGET_CFLAGS
+= $(FPIC
) \
75 -DSQLITE_ENABLE_UNLOCK_NOTIFY
=1 \
77 -DHAVE_MALLOC_USABLE_SIZE
=1
85 config_BUILD_CC
="$(HOSTCC)" \
86 config_BUILD_CFLAGS
="-O2" \
87 config_TARGET_CC
="$(TARGET_CC)" \
88 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
89 config_TARGET_READLINE_INC
="$(TARGET_CPPFLAGS)" \
90 config_TARGET_READLINE_LIBS
="$(TARGET_LDFLAGS) -lreadline -lncurses" \
92 define Build
/InstallDev
93 $(INSTALL_DIR
) $(1)/usr
/include
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite3
{,ext
}.h
$(1)/usr
/include/
95 $(INSTALL_DIR
) $(1)/usr
/lib
96 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.
{a
,so
*} $(1)/usr
/lib
/
97 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/sqlite3.
pc $(1)/usr
/lib
/pkgconfig
/
101 define Package
/libsqlite3
/install
102 $(INSTALL_DIR
) $(1)/usr
/lib
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.so.
* $(1)/usr
/lib
/
106 define Package
/sqlite3-cli
/install
107 $(INSTALL_DIR
) $(1)/usr
/bin
108 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sqlite3
$(1)/usr
/bin
/
111 $(eval
$(call BuildPackage
,libsqlite3
))
112 $(eval
$(call BuildPackage
,sqlite3-cli
))