summaryrefslogtreecommitdiffstats
path: root/make/berkeleydb.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-08-10 08:51:42 +0000
committerEric Andersen <andersen@codepoet.org>2002-08-10 08:51:42 +0000
commite03b6ce52acc05f3aa36afbcbdd4bb084fc0f950 (patch)
treebf8aed1563851e0a15f14d346d3e95e010880bca /make/berkeleydb.mk
parentec2adbefa64e3dc304ca4fa346409d3471cdd066 (diff)
downloadbuildroot-novena-e03b6ce52acc05f3aa36afbcbdd4bb084fc0f950.tar.gz
buildroot-novena-e03b6ce52acc05f3aa36afbcbdd4bb084fc0f950.zip
Add berkeley db support
Diffstat (limited to 'make/berkeleydb.mk')
-rw-r--r--make/berkeleydb.mk52
1 files changed, 52 insertions, 0 deletions
diff --git a/make/berkeleydb.mk b/make/berkeleydb.mk
new file mode 100644
index 000000000..26b696c47
--- /dev/null
+++ b/make/berkeleydb.mk
@@ -0,0 +1,52 @@
+#############################################################
+#
+# berkeley db
+#
+#############################################################
+DB_SITE:=http://www.sleepycat.com/update/snapshot
+DB_SOURCE:=db-4.0.14.tar.gz
+DB_DIR:=$(BUILD_DIR)/db-4.0.14
+
+
+$(DL_DIR)/$(DB_SOURCE):
+ wget -P $(DL_DIR) --passive-ftp $(DB_SITE)/$(DB_SOURCE)
+
+db-source: $(DL_DIR)/$(DB_SOURCE)
+
+$(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
+ zcat $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) -xvf -
+ touch $(DB_DIR)/.dist
+
+$(DB_DIR)/build_unix/Makefile: $(DB_DIR)/.dist
+ (cd $(DB_DIR)/build_unix; PATH="$(TARGET_PATH)" \
+ CC=$(TARGET_CC1) ../dist/configure \
+ --prefix=/usr \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --libexecdir=/usr/sbin \
+ --mandir=/usr/share/man \
+ --enable-shared=yes \
+ )
+
+$(DB_DIR)/build_unix/.libs/libdb-4.0.so: $(DB_DIR)/build_unix/Makefile
+ PATH="$(TARGET_PATH)" make -C $(DB_DIR)/build_unix
+
+$(STAGING_DIR)/lib/libdb-4.0.so: $(DB_DIR)/build_unix/.libs/libdb-4.0.so
+ -mkdir -p $(STAGING_DIR)/man/man1
+ PATH="$(TARGET_PATH)" make -C $(DB_DIR)/build_unix prefix=$(STAGING_DIR) install
+ rm -rf $(STAGING_DIR)/man/man1
+
+$(TARGET_DIR)/lib/libdb-4.0.so: $(STAGING_DIR)/lib/libdb-4.0.so
+ rm -rf $(TARGET_DIR)/lib/libdb*
+ -mv $(STAGING_DIR)/bin/db_* $(TARGET_DIR)/usr/bin/
+ cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/
+ -$(STRIP) --strip-unneeded $(TARGET_DIR)/lib//libdb*so*
+
+db-clean:
+ make -C $(DB_DIR)/build_unix clean
+
+db-dirclean:
+ rm -rf $(DB_DIR)
+
+db: uclibc $(TARGET_DIR)/lib/libdb-4.0.so
+