packages: ipv6/tayga: move static mappings to 'firewall' config
[openwrt/svn-archive/archive.git] / libs / sqlite2 / 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:=sqlite2
11 PKG_VERSION:=2.8.17
12 PKG_RELEASE:=2
13
14 PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://www.sqlite.org/
16 PKG_MD5SUM:=838dbac20b56d2c4292e98848505a05b
17
18 PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION)
19
20 PKG_BUILD_DEPENDS:=libncurses libreadline
21
22 PKG_FIXUP:=libtool
23
24 PKG_INSTALL:=1
25
26 include $(INCLUDE_DIR)/package.mk
27
28 TARGET_CFLAGS += $(FPIC)
29
30 define Package/sqlite2/Default
31 SUBMENU:=database
32 TITLE:=SQLite (v2.x) database engine
33 URL:=http://www.sqlite.org/
34 endef
35
36 define Package/libsqlite2
37 $(call Package/sqlite2/Default)
38 SECTION:=libs
39 CATEGORY:=Libraries
40 TITLE+= (library)
41 endef
42
43 define Package/libsqlite2/description
44 SQLite is a small C library that implements a self-contained, embeddable,
45 zero-configuration SQL database engine.
46 This package contains the SQLite (v2.x) shared library, used by other programs.
47 endef
48
49 define Package/sqlite2-cli
50 $(call Package/sqlite2/Default)
51 SECTION:=utils
52 CATEGORY:=Utilities
53 DEPENDS:=+libsqlite2 +libncurses +libreadline
54 TITLE+= (cli)
55 SUBMENU:=database
56 endef
57
58 define Package/sqlite2-cli/description
59 SQLite is a small C library that implements a self-contained, embeddable,
60 zero-configuration SQL database engine.
61 This package contains a terminal-based front-end to the SQLite (v2.x) library
62 that can evaluate queries interactively and display the results in
63 multiple formats.
64 endef
65
66 define Build/Configure
67 $(call Build/Configure/Default, \
68 --enable-shared \
69 --enable-static \
70 , \
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 config_TARGET_TCL_INC="-DNO_TCL=1" \
78 )
79 endef
80
81 define Build/InstallDev
82 $(INSTALL_DIR) $(1)/usr/include
83 $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(1)/usr/include/
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(1)/usr/lib/
86 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(1)/usr/lib/pkgconfig/
88 endef
89
90 define Package/libsqlite2/install
91 $(INSTALL_DIR) $(1)/usr/lib
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.so.* $(1)/usr/lib/
93 endef
94
95 define Package/sqlite2-cli/install
96 $(INSTALL_DIR) $(1)/usr/bin
97 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/sqlite $(1)/usr/bin/
98 endef
99
100 $(eval $(call BuildPackage,libsqlite2))
101 $(eval $(call BuildPackage,sqlite2-cli))