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
:=2feec9b429f9298c9f288420c8b449f8
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
38 SQLite is a small C library that implements a self-contained
, embeddable
,
39 zero-configuration SQL database engine. This package contains the SQLite
(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
52 SQLite is a small C library that implements a self-contained
, embeddable
,
53 zero-configuration SQL database engine.
54 This package contains a terminal-based front-end to the SQLite
(v3.x
) library
55 that can evaluate queries interactively and display the results in
59 TARGET_CFLAGS
+= $(FPIC
)
61 define Build
/Configure
62 $(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" \
77 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
78 DESTDIR
="$(PKG_INSTALL_DIR)" \
82 define Build
/InstallDev
83 mkdir
-p
$(1)/usr
/include
84 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite3.h
$(1)/usr
/include/
86 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.
{a
,so
*} $(1)/usr
/lib
/
87 mkdir
-p
$(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
))