2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=sqlite-
$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.sqlite.org
/
17 PKG_MD5SUM
:=838dbac20b56d2c4292e98848505a05b
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/sqlite-
$(PKG_VERSION
)
21 PKG_BUILD_DEPENDS
:=libncurses libreadline
23 include $(INCLUDE_DIR
)/package.mk
25 define Package
/sqlite2
/Default
26 TITLE
:=SQLite
(v2.x
) database engine
27 URL
:=http
://www.sqlite.org
/
30 define Package
/libsqlite2
31 $(call Package
/sqlite2
/Default
)
37 define Package
/libsqlite2
/description
39 SQLite is a small C library that implements a self-contained
, embeddable
,
40 zero-configuration SQL database engine.
41 This package contains the SQLite
(v2.x
) shared library
, used by other programs.
44 define Package
/sqlite2-cli
45 $(call Package
/sqlite2
/Default
)
48 DEPENDS
:=+libsqlite2
+libncurses
+libreadline
53 define Package
/sqlite2-cli
/description
55 SQLite is a small C library that implements a self-contained
, embeddable
,
56 zero-configuration SQL database engine.
57 This package contains a terminal-based front-end to the SQLite
(v2.x
) library
58 that can evaluate queries interactively and display the results in
62 define Build
/Configure
63 $(call Build
/Configure
/Default
, \
67 config_BUILD_CC
="$(HOSTCC)" \
68 config_BUILD_CFLAGS
="-O2" \
69 config_TARGET_CC
="$(TARGET_CC)" \
70 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
71 config_TARGET_READLINE_INC
="-I$(STAGING_DIR)/usr/include" \
72 config_TARGET_READLINE_LIBS
="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \
73 config_TARGET_TCL_INC
="-DNO_TCL=1" \
78 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
79 DESTDIR
="$(PKG_INSTALL_DIR)" \
83 define Build
/InstallDev
84 mkdir
-p
$(1)/usr
/include
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite.h
$(1)/usr
/include/
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite.
{a
,so
*} $(1)/usr
/lib
/
88 mkdir
-p
$(1)/usr
/lib
/pkgconfig
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/sqlite.
pc $(1)/usr
/lib
/pkgconfig
/
92 define Package
/libsqlite2
/install
93 $(INSTALL_DIR
) $(1)/usr
/lib
94 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite.so.
* $(1)/usr
/lib
/
97 define Package
/sqlite2-cli
/install
98 $(INSTALL_DIR
) $(1)/usr
/bin
99 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sqlite
$(1)/usr
/bin
/
102 $(eval
$(call BuildPackage
,libsqlite2
))
103 $(eval
$(call BuildPackage
,sqlite2-cli
))