2 # Copyright (C) 2006-2012 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_SOURCE_URL:=http://www.sqlite.org
16 PKG_MD5SUM:=eb7bbd258913518ad30971ea7ecb0ca9
18 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-autoconf-$(PKG_VERSION)
19 PKG_BUILD_DEPENDS:=libncurses libreadline
25 include $(INCLUDE_DIR)/package.mk
27 define Package/sqlite3/Default
29 TITLE:=SQLite (v3.x) database engine
30 URL:=http://www.sqlite.org/
33 define Package/sqlite3/Default/description
34 SQLite is a small C library that implements a self-contained, embeddable,
35 zero-configuration SQL database engine.
38 define Package/libsqlite3
39 $(call Package/sqlite3/Default)
46 define Package/libsqlite3/description
47 $(call Package/sqlite3/Default/description)
48 This package contains the SQLite (v3.x) shared library, used by other
52 define Package/sqlite3-cli
53 $(call Package/sqlite3/Default)
56 DEPENDS:=+libsqlite3 +libncurses +libreadline
60 define Package/sqlite3-cli/description
61 $(call Package/sqlite3/Default/description)
62 This package contains a terminal-based front-end to the SQLite (v3.x) library
63 that can evaluate queries interactively and display the results in multiple
67 TARGET_CFLAGS += $(FPIC) \
68 -DSQLITE_ENABLE_UNLOCK_NOTIFY \
75 config_BUILD_CC="$(HOSTCC)" \
76 config_BUILD_CFLAGS="-O2" \
77 config_TARGET_CC="$(TARGET_CC)" \
78 config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
79 config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
80 config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
82 define Build/InstallDev
83 $(INSTALL_DIR) $(1)/usr/include
84 $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3{,ext}.h $(1)/usr/include/
85 $(INSTALL_DIR) $(1)/usr/lib
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
87 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
91 define Package/libsqlite3/install
92 $(INSTALL_DIR) $(1)/usr/lib
93 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
96 define Package/sqlite3-cli/install
97 $(INSTALL_DIR) $(1)/usr/bin
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
101 $(eval $(call BuildPackage,libsqlite3))
102 $(eval $(call BuildPackage,sqlite3-cli))