[packages] classpath: depends on alsa-lib, libgmp and libmagic
[openwrt/svn-archive/archive.git] / libs / sqlite2 / Makefile
index 076f3473bf7310a1e0b5657915f50411634d5d47..68306d6e364574552dd7855c4733a4c3df36f670 100644 (file)
@@ -1,16 +1,15 @@
-# 
-# Copyright (C) 2006 OpenWrt.org
+#
+# Copyright (C) 2006-2010 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-# $Id$
 
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=sqlite2
 PKG_VERSION:=2.8.17
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=sqlite-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.sqlite.org/
@@ -20,9 +19,16 @@ PKG_BUILD_DIR:=$(BUILD_DIR)/sqlite-$(PKG_VERSION)
 
 PKG_BUILD_DEPENDS:=libncurses libreadline
 
+PKG_FIXUP:=autoreconf
+
+PKG_INSTALL:=1
+
 include $(INCLUDE_DIR)/package.mk
 
+TARGET_CFLAGS += $(FPIC)
+
 define Package/sqlite2/Default
+  SUBMENU:=database
   TITLE:=SQLite (v2.x) database engine
   URL:=http://www.sqlite.org/
 endef
@@ -35,7 +41,6 @@ define Package/libsqlite2
 endef
 
 define Package/libsqlite2/description
-=
        SQLite is a small C library that implements a self-contained, embeddable, 
        zero-configuration SQL database engine. 
        This package contains the SQLite (v2.x) shared library, used by other programs.
@@ -51,7 +56,6 @@ define Package/sqlite2-cli
 endef
 
 define Package/sqlite2-cli/description
-=
        SQLite is a small C library that implements a self-contained, embeddable, 
        zero-configuration SQL database engine. 
        This package contains a terminal-based front-end to the SQLite (v2.x) library 
@@ -68,24 +72,18 @@ define Build/Configure
                config_BUILD_CFLAGS="-O2" \
                config_TARGET_CC="$(TARGET_CC)" \
                config_TARGET_CFLAGS="$(TARGET_CFLAGS)" \
-               config_TARGET_READLINE_INC="-I$(STAGING_DIR)/usr/include" \
-               config_TARGET_READLINE_LIBS="-L$(STAGING_DIR)/usr/lib -lreadline -lncurses" \
+               config_TARGET_READLINE_INC="$(TARGET_CPPFLAGS)" \
+               config_TARGET_READLINE_LIBS="$(TARGET_LDFLAGS) -lreadline -lncurses" \
                config_TARGET_TCL_INC="-DNO_TCL=1" \
        )
 endef
 
-define Build/Compile
-       $(MAKE) -C $(PKG_BUILD_DIR) \
-               DESTDIR="$(PKG_INSTALL_DIR)" \
-               all install
-endef
-
 define Build/InstallDev
-       mkdir -p $(1)/usr/include
+       $(INSTALL_DIR) $(1)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/sqlite.h $(1)/usr/include/
-       mkdir -p $(1)/usr/lib
+       $(INSTALL_DIR) $(1)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsqlite.{a,so*} $(1)/usr/lib/
-       mkdir -p $(1)/usr/lib/pkgconfig
+       $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/sqlite.pc $(1)/usr/lib/pkgconfig/
 endef