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
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://www.sqlite.org
/
17 PKG_MD5SUM
:=b58412904b42fe49e5a281e99da0fd72
19 PKG_BUILD_DEPENDS
:=libncurses libreadline
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/sqlite3
/Default
24 TITLE
:=SQLite
(v3.x
) database engine
25 URL
:=http
://www.sqlite.org
/
29 define Package
/libsqlite3
30 $(call Package
/sqlite3
/Default
)
36 define Package
/libsqlite3
/description
37 SQLite is a small C library that implements a self-contained
, embeddable
,
38 zero-configuration SQL database engine. This package contains the SQLite
39 (v3.x
) shared library
, used by other programs.
42 define Package
/sqlite3-cli
43 $(call Package
/sqlite3
/Default
)
46 DEPENDS
:=+libsqlite3
+libncurses
+libreadline
50 define Package
/sqlite3-cli
/description
51 SQLite is a small C library that implements a self-contained
, embeddable
,
52 zero-configuration SQL database engine.
53 This package contains a terminal-based front-end to the SQLite
(v3.x
) library
54 that can evaluate queries interactively and display the results in
58 TARGET_CFLAGS
+= $(FPIC
)
60 define Build
/Configure
61 $(call Build
/Configure
/Default
, \
66 config_BUILD_CC
="$(HOSTCC)" \
67 config_BUILD_CFLAGS
="-O2" \
68 config_TARGET_CC
="$(TARGET_CC)" \
69 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
70 config_TARGET_READLINE_INC
="-I$(STAGING_DIR)/usr/include" \
71 config_TARGET_READLINE_LIBS
="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \
76 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
77 DESTDIR
="$(PKG_INSTALL_DIR)" \
81 define Build
/InstallDev
82 mkdir
-p
$(1)/usr
/include
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite3.h
$(1)/usr
/include/
85 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.
{a
,so
*} $(1)/usr
/lib
/
86 mkdir
-p
$(1)/usr
/lib
/pkgconfig
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/sqlite3.
pc $(1)/usr
/lib
/pkgconfig
/
90 define Package
/libsqlite3
/install
91 $(INSTALL_DIR
) $(1)/usr
/lib
92 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.so.
* $(1)/usr
/lib
/
95 define Package
/sqlite3-cli
/install
96 $(INSTALL_DIR
) $(1)/usr
/bin
97 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sqlite3
$(1)/usr
/bin
/
100 $(eval
$(call BuildPackage
,libsqlite3
))
101 $(eval
$(call BuildPackage
,sqlite3-cli
))