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_BUILD_DIR
:=$(BUILD_DIR
)/sqlite-
$(PKG_VERSION
)
16 PKG_SOURCE
:=sqlite-
$(PKG_VERSION
).
tar.gz
17 PKG_SOURCE_URL
:=http
://www.sqlite.org
/
18 PKG_MD5SUM
:=838dbac20b56d2c4292e98848505a05b
21 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 PKG_BUILDDEP
:=libncurses libreadline
24 include $(INCLUDE_DIR
)/package.mk
26 define Package
/libsqlite2
29 TITLE
:=Self-contained SQL database engine
30 DESCRIPTION
:=Self-contained
, embeddable
, zero-configuration SQL database engine.
\\\
31 SQLite is a small C library that implements a self-contained
, embeddable
, \\\
32 zero-configuration SQL database engine.
\\\
34 This package contains the shared library
, needed by other programs.
35 URL
:=http
://www.sqlite.org
/
38 define Package
/sqlite2-cli
41 DEPENDS
:=+libsqlite2
+libncurses
+libreadline
42 TITLE
:=Command line interface for SQLite
43 DESCRIPTION
:=Command line interface for SQLite.
\\\
44 SQLite is a small C library that implements a self-contained
, embeddable
, \\\
45 zero-configuration SQL database engine.
\\\
47 This package contains a terminal-based front-end to the SQLite library
\\\
48 that can evaluate queries interactively and display the results in
\\\
50 URL
:=http
://www.sqlite.org
/
53 define Build
/Configure
54 (cd
$(PKG_BUILD_DIR
); rm -f config.cache
; \
55 $(TARGET_CONFIGURE_OPTS
) \
56 CFLAGS
="$(TARGET_CFLAGS)" \
57 CPPFLAGS
="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
58 LDFLAGS
="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
59 config_BUILD_CC
="$(HOSTCC)" \
60 config_BUILD_CFLAGS
="-O2" \
61 config_TARGET_CC
="$(TARGET_CC)" \
62 config_TARGET_CFLAGS
="$(TARGET_CFLAGS)" \
63 config_TARGET_READLINE_INC
="-I$(STAGING_DIR)/usr/include" \
64 config_TARGET_READLINE_LIBS
="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \
65 config_TARGET_TCL_INC
="-DNO_TCL=1" \
67 --target
=$(GNU_TARGET_NAME
) \
68 --host
=$(GNU_TARGET_NAME
) \
69 --build
=$(GNU_HOST_NAME
) \
75 --datadir=/usr
/share \
76 --includedir=/usr
/include \
77 --infodir=/usr
/share
/info \
79 --libexecdir
=/usr
/lib \
80 --localstatedir
=/var \
81 --mandir=/usr
/share
/man \
84 $(DISABLE_LARGEFILE
) \
91 rm -rf
$(PKG_INSTALL_DIR
)
92 mkdir
-p
$(PKG_INSTALL_DIR
)
93 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
94 DESTDIR
="$(PKG_INSTALL_DIR)" \
98 define Package
/libsqlite2
/install
99 install -d
-m0755
$(1)/usr
/lib
100 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite.so.
* $(1)/usr
/lib
/
103 define Package
/sqlite2-cli
/install
104 install -d
-m0755
$(1)/usr
/bin
105 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/sqlite
$(1)/usr
/bin
/
108 define Build
/InstallDev
109 mkdir
-p
$(STAGING_DIR
)/usr
/include
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/sqlite.h
$(STAGING_DIR
)/usr
/include/
111 mkdir
-p
$(STAGING_DIR
)/usr
/lib
112 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libsqlite.
{a
,so
*} $(STAGING_DIR
)/usr
/lib
/
113 mkdir
-p
$(STAGING_DIR
)/usr
/lib
/pkgconfig
114 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/sqlite.
pc $(STAGING_DIR
)/usr
/lib
/pkgconfig
/
117 define Build
/UninstallDev
119 $(STAGING_DIR
)/usr
/include/sqlite.h \
120 $(STAGING_DIR
)/usr
/lib
/libsqlite.
{a
,so
*} \
121 $(STAGING_DIR
)/usr
/lib
/pkgconfig
/sqlite.
pc
124 $(eval
$(call BuildPackage
,libsqlite2
))
125 $(eval
$(call BuildPackage
,sqlite2-cli
))