[packages] kismet: Don't add host include paths
[packages.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.6.20
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=$(PKG_NAME)-amalgamation-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.sqlite.org/
16 PKG_MD5SUM:=4bb3e9ee5d25e88b8ff8533fbeb168aa
17
18 PKG_BUILD_DEPENDS:=libncurses libreadline
19 PKG_FIXUP:=libtool
20 PKG_INSTALL:=1
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/sqlite3/Default
25   SUBMENU:=database
26   TITLE:=SQLite (v3.x) database engine
27   URL:=http://www.sqlite.org/
28 endef
29
30 define Package/sqlite3/Default/description
31  SQLite is a small C library that implements a self-contained, embeddable,
32  zero-configuration SQL database engine.
33 endef
34
35 define Package/libsqlite3
36   $(call Package/sqlite3/Default)
37   SECTION:=libs
38   CATEGORY:=Libraries
39   DEPENDS:=+libpthread
40   TITLE+= (library)
41 endef
42
43 define Package/libsqlite3/description
44 $(call Package/sqlite3/Default/description)
45  This package contains the SQLite (v3.x) shared library, used by other
46  programs.
47 endef
48
49 define Package/sqlite3-cli
50   $(call Package/sqlite3/Default)
51   SECTION:=utils
52   CATEGORY:=Utilities
53   DEPENDS:=+libsqlite3 +libncurses +libreadline
54   TITLE+= (cli)
55 endef
56
57 define Package/sqlite3-cli/description
58 $(call Package/sqlite3/Default/description)
59  This package contains a terminal-based front-end to the SQLite (v3.x) library
60  that can evaluate queries interactively and display the results in multiple
61  formats.
62 endef
63
64 TARGET_CFLAGS += $(FPIC)
65
66 CONFIGURE_ARGS += \
67         --enable-shared \
68         --enable-static \
69
70 CONFIGURE_VARS += \
71         config_BUILD_CC="$(HOSTCC)" \
72         config_BUILD_CFLAGS="-O2" \
73         config_TARGET_CC="$(TARGET_CC)" \
74         config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
75         config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
76         config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
77
78 define Build/InstallDev
79         $(INSTALL_DIR) $(1)/usr/include
80         $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite3.h $(1)/usr/include/
81         $(INSTALL_DIR) $(1)/usr/lib
82         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.{a,so*} $(1)/usr/lib/
83         $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
84         $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite3.pc $(1)/usr/lib/pkgconfig/
85 endef
86
87 define Package/libsqlite3/install
88         $(INSTALL_DIR) $(1)/usr/lib
89         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite3.so.* $(1)/usr/lib/
90 endef
91
92 define Package/sqlite3-cli/install
93         $(INSTALL_DIR) $(1)/usr/bin
94         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite3 $(1)/usr/bin/
95 endef
96
97 $(eval $(call BuildPackage,libsqlite3))
98 $(eval $(call BuildPackage,sqlite3-cli))