summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-22 22:39:29 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2010-10-22 22:39:29 +0200
commit190f2c353c34f2d10f47473130e3cfc60151a807 (patch)
treef52feba6cfe5fe5767b2632e6956df9eb5c7dd98 /packages
parent2cda1db4e1e3f08036c2728d2b499468e8da42b9 (diff)
downloadembtoolkit-190f2c353c34f2d10f47473130e3cfc60151a807.tar.gz
embtoolkit-190f2c353c34f2d10f47473130e3cfc60151a807.tar.bz2
embtoolkit-190f2c353c34f2d10f47473130e3cfc60151a807.tar.xz
Packages: Add NEW packages SQLIte-3.7.3 database library
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/database/database.kconfig27
-rw-r--r--packages/database/database.mk28
-rw-r--r--packages/database/sqlite/sqlite.kconfig47
-rw-r--r--packages/database/sqlite/sqlite.mk111
4 files changed, 213 insertions, 0 deletions
diff --git a/packages/database/database.kconfig b/packages/database/database.kconfig
new file mode 100644
index 0000000..69bc6d4
--- /dev/null
+++ b/packages/database/database.kconfig
@@ -0,0 +1,27 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file database.mk
+# \brief database.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+#SQLite
+source packages/database/sqlite/sqlite.kconfig
diff --git a/packages/database/database.mk b/packages/database/database.mk
new file mode 100644
index 0000000..4efb1c4
--- /dev/null
+++ b/packages/database/database.mk
@@ -0,0 +1,28 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file database.mk
+# \brief database.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+#SQLite
+include $(EMBTK_ROOT)/packages/database/sqlite/sqlite.mk
+ROOTFS_COMPONENTS-$(CONFIG_EMBTK_HAVE_SQLITE) += sqlite_install
diff --git a/packages/database/sqlite/sqlite.kconfig b/packages/database/sqlite/sqlite.kconfig
new file mode 100644
index 0000000..14639cb
--- /dev/null
+++ b/packages/database/sqlite/sqlite.kconfig
@@ -0,0 +1,47 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file sqlite.kconfig
+# \brief sqlite.kconfig of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+config EMBTK_HAVE_SQLITE
+ bool "Have sqlite"
+ help
+ sqlite description
+choice
+ prompt "sqlite version you wish"
+ depends on EMBTK_HAVE_SQLITE
+ help
+ Here you can choose which version of sqlite you want to use.
+
+ config EMBTK_SQLITE_VERSION_3_7_3
+ bool "sqlite-3.7.3"
+endchoice
+
+config EMBTK_SQLITE_VERSION_STRING
+ string
+ default "3.7.3" if EMBTK_SQLITE_VERSION_3_7_3
+
+config EMBTK_SQLITE_NEED_PATCH
+ bool
+
+
diff --git a/packages/database/sqlite/sqlite.mk b/packages/database/sqlite/sqlite.mk
new file mode 100644
index 0000000..2ca9260
--- /dev/null
+++ b/packages/database/sqlite/sqlite.mk
@@ -0,0 +1,111 @@
+################################################################################
+# Embtoolkit
+# Copyright(C) 2010 Abdoulaye Walsimou GAYE. All rights reserved.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+################################################################################
+#
+# \file sqlite.mk
+# \brief sqlite.mk of Embtoolkit
+# \author Abdoulaye Walsimou GAYE <awg@embtoolkit.org>
+# \date October 2010
+################################################################################
+
+SQLITE_VERSION := $(subst ",,$(strip $(CONFIG_EMBTK_SQLITE_VERSION_STRING)))
+SQLITE_SITE := http://www.sqlite.org
+SQLITE_PATCH_SITE := ftp://ftp.embtoolkit.org/embtoolkit.org/sqlite/$(SQLITE_VERSION)
+SQLITE_PACKAGE := sqlite-amalgamation-$(SQLITE_VERSION).tar.gz
+SQLITE_BUILD_DIR := $(PACKAGES_BUILD)/sqlite-$(SQLITE_VERSION)
+
+SQLITE_BINS = sqlite3
+SQLITE_SBINS =
+SQLITE_INCLUDES = sqlite3.h sqlite3ext.h
+SQLITE_LIBS = libsqlite3.*
+SQLITE_PKGCONFIGS = sqlite3.pc
+
+SQLITE_CONFIGURE_OPTS := --enable-threadsafe --enable-readline \
+ --enable-threadsafe --enable-dynamic-extensions
+
+
+SQLITE_DEPS :=
+
+sqlite_install:
+ @test -e $(SQLITE_BUILD_DIR)/.installed || \
+ $(MAKE) $(SQLITE_BUILD_DIR)/.installed
+
+$(SQLITE_BUILD_DIR)/.installed: $(SQLITE_DEPS) download_sqlite \
+ $(SQLITE_BUILD_DIR)/.decompressed $(SQLITE_BUILD_DIR)/.configured
+ $(call EMBTK_GENERIC_MESSAGE,"Compiling and installing \
+ sqlite-$(SQLITE_VERSION) in your root filesystem...")
+ $(call EMBTK_KILL_LT_RPATH,$(SQLITE_BUILD_DIR))
+ $(Q)$(MAKE) -C $(SQLITE_BUILD_DIR) $(J)
+ $(Q)$(MAKE) -C $(SQLITE_BUILD_DIR) DESTDIR=$(SYSROOT) install
+ $(Q)$(MAKE) libtool_files_adapt
+ $(Q)$(MAKE) pkgconfig_files_adapt
+ @touch $@
+
+download_sqlite:
+ $(call EMBTK_GENERIC_MESSAGE,"Downloading $(SQLITE_PACKAGE) \
+ if necessary...")
+ @test -e $(DOWNLOAD_DIR)/$(SQLITE_PACKAGE) || \
+ wget -O $(DOWNLOAD_DIR)/$(SQLITE_PACKAGE) \
+ $(SQLITE_SITE)/$(SQLITE_PACKAGE)
+ifeq ($(CONFIG_EMBTK_SQLITE_NEED_PATCH),y)
+ @test -e $(DOWNLOAD_DIR)/sqlite-$(SQLITE_VERSION).patch || \
+ wget -O $(DOWNLOAD_DIR)/sqlite-$(SQLITE_VERSION).patch \
+ $(SQLITE_PATCH_SITE)/sqlite-$(SQLITE_VERSION)-*.patch
+endif
+
+$(SQLITE_BUILD_DIR)/.decompressed:
+ $(call EMBTK_GENERIC_MESSAGE,"Decompressing $(SQLITE_PACKAGE) ...")
+ @tar -C $(PACKAGES_BUILD) -xzf $(DOWNLOAD_DIR)/$(SQLITE_PACKAGE)
+ifeq ($(CONFIG_EMBTK_SQLITE_NEED_PATCH),y)
+ @cd $(SQLITE_BUILD_DIR); \
+ patch -p1 < $(DOWNLOAD_DIR)/sqlite-$(SQLITE_VERSION).patch
+endif
+ @touch $@
+
+$(SQLITE_BUILD_DIR)/.configured:
+ $(Q)cd $(SQLITE_BUILD_DIR); \
+ CC=$(TARGETCC_CACHED) \
+ CXX=$(TARGETCXX_CACHED) \
+ AR=$(TARGETAR) \
+ RANLIB=$(TARGETRANLIB) \
+ AS=$(CROSS_COMPILE)as \
+ LD=$(TARGETLD) \
+ NM=$(TARGETNM) \
+ STRIP=$(TARGETSTRIP) \
+ OBJDUMP=$(TARGETOBJDUMP) \
+ OBJCOPY=$(TARGETOBJCOPY) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="-L$(SYSROOT)/$(LIBDIR) -L$(SYSROOT)/usr/$(LIBDIR)" \
+ CPPFLAGS="-I$(SYSROOT)/usr/include" \
+ PKG_CONFIG=$(PKGCONFIG_BIN) \
+ PKG_CONFIG_PATH=$(PKG_CONFIG_PATH) \
+ ./configure --build=$(HOST_BUILD) --host=$(STRICT_GNU_TARGET) \
+ --target=$(STRICT_GNU_TARGET) --libdir=/usr/$(LIBDIR) \
+ --prefix=/usr $(SQLITE_CONFIGURE_OPTS)
+ @touch $@
+
+sqlite_clean:
+ $(call EMBTK_GENERIC_MESSAGE,"cleanup sqlite...")
+ $(Q)-cd $(SYSROOT)/usr/bin; rm -rf $(SQLITE_BINS)
+ $(Q)-cd $(SYSROOT)/usr/sbin; rm -rf $(SQLITE_SBINS)
+ $(Q)-cd $(SYSROOT)/usr/include; rm -rf $(SQLITE_INCLUDES)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR); rm -rf $(SQLITE_LIBS)
+ $(Q)-cd $(SYSROOT)/usr/$(LIBDIR)/pkgconfig; rm -rf $(SQLITE_PKGCONFIGS)
+ $(Q)-rm -rf $(SQLITE_BUILD_DIR)*
+