2010-02-18 13:10:21 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006-2010 OpenWrt.org
|
2006-07-22 16:42:34 +00:00
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=sqlite2
|
|
|
|
PKG_VERSION:=2.8.17
|
2010-02-19 00:14:01 +00:00
|
|
|
PKG_RELEASE:=2
|
2006-07-22 16:42:34 +00:00
|
|
|
|
|
|
|
PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz
|
|
|
|
PKG_SOURCE_URL:=http://www.sqlite.org/
|
|
|
|
PKG_MD5SUM:=838dbac20b56d2c4292e98848505a05b
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION)
|
|
|
|
|
2007-01-22 17:33:10 +00:00
|
|
|
PKG_BUILD_DEPENDS:=libncurses libreadline
|
2010-12-08 18:55:23 +00:00
|
|
|
|
2012-06-11 21:18:33 +00:00
|
|
|
PKG_FIXUP:=autoreconf
|
2010-12-08 18:55:23 +00:00
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
PKG_INSTALL:=1
|
2006-07-22 16:42:34 +00:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
2010-02-18 13:10:21 +00:00
|
|
|
TARGET_CFLAGS += $(FPIC)
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/sqlite2/Default
|
2009-08-14 11:11:40 +00:00
|
|
|
SUBMENU:=database
|
2006-10-28 22:43:08 +00:00
|
|
|
TITLE:=SQLite (v2.x) database engine
|
|
|
|
URL:=http://www.sqlite.org/
|
|
|
|
endef
|
|
|
|
|
2006-07-22 16:42:34 +00:00
|
|
|
define Package/libsqlite2
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Package/sqlite2/Default)
|
2006-07-22 16:42:34 +00:00
|
|
|
SECTION:=libs
|
|
|
|
CATEGORY:=Libraries
|
2006-10-28 22:43:08 +00:00
|
|
|
TITLE+= (library)
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/libsqlite2/description
|
2014-03-27 07:04:52 +00:00
|
|
|
SQLite is a small C library that implements a self-contained, embeddable,
|
|
|
|
zero-configuration SQL database engine.
|
2006-10-28 22:43:08 +00:00
|
|
|
This package contains the SQLite (v2.x) shared library, used by other programs.
|
2006-07-22 16:42:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/sqlite2-cli
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Package/sqlite2/Default)
|
2006-07-26 01:26:21 +00:00
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
|
|
|
DEPENDS:=+libsqlite2 +libncurses +libreadline
|
2006-10-28 22:43:08 +00:00
|
|
|
TITLE+= (cli)
|
2007-10-18 19:13:05 +00:00
|
|
|
SUBMENU:=database
|
2007-10-14 04:32:56 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/sqlite2-cli/description
|
2014-03-27 07:04:52 +00:00
|
|
|
SQLite is a small C library that implements a self-contained, embeddable,
|
|
|
|
zero-configuration SQL database engine.
|
|
|
|
This package contains a terminal-based front-end to the SQLite (v2.x) library
|
|
|
|
that can evaluate queries interactively and display the results in
|
2006-10-28 22:43:08 +00:00
|
|
|
multiple formats.
|
2006-07-22 16:42:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Configure
|
2006-10-28 22:43:08 +00:00
|
|
|
$(call Build/Configure/Default, \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-static \
|
|
|
|
, \
|
2006-07-22 16:42:34 +00:00
|
|
|
config_BUILD_CC="$(HOSTCC)" \
|
|
|
|
config_BUILD_CFLAGS="-O2" \
|
|
|
|
config_TARGET_CC="$(TARGET_CC)" \
|
|
|
|
config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
|
2009-04-29 12:56:17 +00:00
|
|
|
config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
|
|
|
|
config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
|
2006-07-22 16:42:34 +00:00
|
|
|
config_TARGET_TCL_INC="-DNO_TCL=1" \
|
2006-10-28 22:43:08 +00:00
|
|
|
)
|
2006-07-22 16:42:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/InstallDev
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/include
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(1)/usr/include/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(1)/usr/lib/
|
2009-12-18 11:06:19 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
|
2007-10-07 03:20:26 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(1)/usr/lib/pkgconfig/
|
2006-07-22 16:42:34 +00:00
|
|
|
endef
|
|
|
|
|
2006-10-28 22:43:08 +00:00
|
|
|
define Package/libsqlite2/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib
|
2006-10-28 22:43:08 +00:00
|
|
|
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(1)/usr/lib/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/sqlite2-cli/install
|
2006-11-23 00:29:07 +00:00
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
2007-12-09 18:59:01 +00:00
|
|
|
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(1)/usr/bin/
|
2006-10-28 22:43:08 +00:00
|
|
|
endef
|
|
|
|
|
2006-07-22 16:42:34 +00:00
|
|
|
$(eval $(call BuildPackage,libsqlite2))
|
|
|
|
$(eval $(call BuildPackage,sqlite2-cli))
|