[patch-team] - tor-alpha new package - Signed-off-by: Jacob Appelbaum <jacob@appelbau...
[openwrt/svn-archive/archive.git] / libs / sqlite3 / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=sqlite
11 PKG_VERSION:=3.7.0
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-amalgamation-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.sqlite.org/
16 PKG_MD5SUM:=61b85f108760f91b79afc7833e6e6cb4
17
18 PKG_BUILD_DEPENDS:=libncurses libreadline
19
20 PKG_FIXUP:=libtool
21
22 PKG_INSTALL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/sqlite3/Default
27 SUBMENU:=database
28 TITLE:=SQLite (v3.x) database engine
29 URL:=http://www.sqlite.org/
30 endef
31
32 define Package/sqlite3/Default/description
33 SQLite is a small C library that implements a self-contained, embeddable,
34 zero-configuration SQL database engine.
35 endef
36
37 define Package/libsqlite3
38 $(call Package/sqlite3/Default)
39 SECTION:=libs
40 CATEGORY:=Libraries
41 DEPENDS:=+libpthread
42 TITLE+= (library)
43 endef
44
45 define Package/libsqlite3/description
46 $(call Package/sqlite3/Default/description)
47 This package contains the SQLite (v3.x) shared library, used by other
48 programs.
49 endef
50
51 define Package/sqlite3-cli
52 $(call Package/sqlite3/Default)
53 SECTION:=utils
54 CATEGORY:=Utilities
55 DEPENDS:=+libsqlite3 +libncurses +libreadline
56 TITLE+= (cli)
57 endef
58
59 define Package/sqlite3-cli/description
60 $(call Package/sqlite3/Default/description)
61 This package contains a terminal-based front-end to the SQLite (v3.x) library
62 that can evaluate queries interactively and display the results in multiple
63 formats.
64 endef
65
66 TARGET_CFLAGS += $(FPIC)
67
68 CONFIGURE_ARGS += \
69 --enable-shared \
70 --enable-static \
71
72 CONFIGURE_VARS += \
73 config_BUILD_CC="$(HOSTCC)" \
74 config_BUILD_CFLAGS="-O2" \
75 config_TARGET_CC="$(TARGET_CC)" \
76 config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
77 config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
78 config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
79
80 define Build/InstallDev
81 $(INSTALL_DIR) $(1)/usr/include
82 $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/
83 $(INSTALL_DIR) $(1)/usr/lib
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
85 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
86 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
87 endef
88
89 define Package/libsqlite3/install
90 $(INSTALL_DIR) $(1)/usr/lib
91 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
92 endef
93
94 define Package/sqlite3-cli/install
95 $(INSTALL_DIR) $(1)/usr/bin
96 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
97 endef
98
99 $(eval $(call BuildPackage,libsqlite3))
100 $(eval $(call BuildPackage,sqlite3-cli))