oops, remove leftover from [13973]
[openwrt/svn-archive/archive.git] / libs / sqlite3 / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=sqlite
12 PKG_VERSION:=3.5.9
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://www.sqlite.org/
17 PKG_MD5SUM:=b58412904b42fe49e5a281e99da0fd72
18
19 PKG_BUILD_DEPENDS:=libncurses libreadline
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/sqlite3/Default
24 SUBMENU:=database
25 TITLE:=SQLite (v3.x) database engine
26 URL:=http://www.sqlite.org/
27 endef
28
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.
32 endef
33
34 define Package/libsqlite3
35 $(call Package/sqlite3/Default)
36 SECTION:=libs
37 CATEGORY:=Libraries
38 TITLE+= (library)
39 endef
40
41 define Package/libsqlite3/description
42 $(call Package/sqlite3/Default/description)
43 This package contains the SQLite (v3.x) shared library, used by other
44 programs.
45 endef
46
47 define Package/sqlite3-cli
48 $(call Package/sqlite3/Default)
49 SECTION:=utils
50 CATEGORY:=Utilities
51 DEPENDS:=+libsqlite3 +libncurses +libreadline
52 TITLE+= (cli)
53 endef
54
55 define Package/sqlite3-cli/description
56 $(call Package/sqlite3/Default/description)
57 This package contains a terminal-based front-end to the SQLite (v3.x) library
58 that can evaluate queries interactively and display the results in multiple
59 formats.
60 endef
61
62 TARGET_CFLAGS += $(FPIC)
63
64 CONFIGURE_ARGS += \
65 --enable-shared \
66 --enable-static \
67 --disable-tcl \
68
69 CONFIGURE_VARS += \
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="-I$(STAGING_DIR)/usr/include" \
75 config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \
76
77 define Build/Compile
78 $(MAKE) -C $(PKG_BUILD_DIR) \
79 DESTDIR="$(PKG_INSTALL_DIR)" \
80 all install
81 endef
82
83 define Build/InstallDev
84 $(INSTALL_DIR) $(1)/usr/include
85 $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
88 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
90 endef
91
92 define Package/libsqlite3/install
93 $(INSTALL_DIR) $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
95 endef
96
97 define Package/sqlite3-cli/install
98 $(INSTALL_DIR) $(1)/usr/bin
99 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
100 endef
101
102 $(eval $(call BuildPackage,libsqlite3))
103 $(eval $(call BuildPackage,sqlite3-cli))