2 # Copyright (C) 2006-2009 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
)-amalgamation-
$(PKG_VERSION
).
tar.gz
15 PKG_SOURCE_URL
:=http
://www.sqlite.org
/
16 PKG_MD5SUM
:=4bb3e9ee5d25e88b8ff8533fbeb168aa
18 PKG_BUILD_DEPENDS
:=libncurses libreadline
21 include $(INCLUDE_DIR
)/package.mk
23 define Package
/sqlite3
/Default
25 TITLE
:=SQLite
(v3.x
) database engine
26 URL
:=http
://www.sqlite.org
/
29 define Package
/sqlite3
/Default
/description
30 SQLite is a small C library that implements a self-contained
, embeddable
,
31 zero-configuration SQL database engine.
34 define Package
/libsqlite3
35 $(call Package
/sqlite3
/Default
)
42 define Package
/libsqlite3
/description
43 $(call Package
/sqlite3
/Default
/description
)
44 This package contains the SQLite
(v3.x
) shared library
, used by other
48 define Package
/sqlite3-cli
49 $(call Package
/sqlite3
/Default
)
52 DEPENDS
:=+libsqlite3
+libncurses
+libreadline
56 define Package
/sqlite3-cli
/description
57 $(call Package
/sqlite3
/Default
/description
)
58 This package contains a terminal-based front-end to the SQLite
(v3.x
) library
59 that can evaluate queries interactively and display the results in multiple
63 TARGET_CFLAGS
+= $(FPIC
)
70 config_BUILD_CC
="$(HOSTCC)" \
71 config_BUILD_CFLAGS
="-O2" \
72 config_TARGET_CC
="$(TARGET_CC)" \
73 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
74 config_TARGET_READLINE_INC
="$(TARGET_CPPFLAGS)" \
75 config_TARGET_READLINE_LIBS
="$(TARGET_LDFLAGS) -lreadline -lncurses" \
77 define Build
/InstallDev
78 $(INSTALL_DIR
) $(1)/usr
/include
79 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite3.h
$(1)/usr
/include/
80 $(INSTALL_DIR
) $(1)/usr
/lib
81 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.
{a
,so
*} $(1)/usr
/lib
/
82 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
83 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/sqlite3.
pc $(1)/usr
/lib
/pkgconfig
/
86 define Package
/libsqlite3
/install
87 $(INSTALL_DIR
) $(1)/usr
/lib
88 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite3.so.
* $(1)/usr
/lib
/
91 define Package
/sqlite3-cli
/install
92 $(INSTALL_DIR
) $(1)/usr
/bin
93 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/sqlite3
$(1)/usr
/bin
/
96 $(eval
$(call BuildPackage
,libsqlite3
))
97 $(eval
$(call BuildPackage
,sqlite3-cli
))