Auto-download of db package now works properly.

This commit is contained in:
Gregory Burd 2011-11-28 18:39:53 -05:00
parent daa79ac912
commit ad64781df6
3 changed files with 10 additions and 7 deletions

1
.gitignore vendored
View file

@ -7,6 +7,7 @@
*.orig
logs
doc
include/BDBERL-MIB.hrl
test/test.cover
int_test/test.cover
.eunit

View file

@ -26,3 +26,5 @@ distclean: clean
-rm -rf logs
include rebar.mk
.EXPORT_ALL_VARIABLES:

View file

@ -1,14 +1,15 @@
# This Makefile builds the dependency (libdb) needed by bdberl_drv.so
ERL ?=erl
ERL_FLAGS ?=+A10
ERL ?= erl
ERL_FLAGS ?= +A10
TAR ?= tar
GUNZIP ?= gunzip
CURL ?= curl
BDB_VER := 5.2.36
BDB_DIR := $(CURDIR)/db-$(BDB_VER)
BDB_DIST := db-$(BDB_VER).tar.gz
#BDB_DIST_URL := http://download.oracle.com/berkeley-db/$(BDB_DIST)
BDB_DIST_URL := https://github.com/downloads/gburd/libdb/$(BDB_DIST)
BDB_DIST := db-$(BDB_VER)
#BDB_DIST_URL := http://download.oracle.com/berkeley-db/$(BDB_DIST).tar.gz
BDB_DIST_URL := https://github.com/downloads/gburd/libdb/$(BDB_DIST).tar.gz
SYSTEM_DIR := $(CURDIR)/system
LIB_DIR := $(SYSTEM_DIR)/lib
@ -18,7 +19,6 @@ INC_DIR := $(SYSTEM_DIR)/include
db: $(LIB_DIR)/libdb.a
$(LIB_DIR)/libdb.a: $(BDB_DIST)
$(GUNZIP) -c db-$(BDB_VER).tar.gz | $(TAR) xf -
@for I in patches/*.patch; do \
(patch -p0 < $${I} || echo "Skipping patch"); \
done
@ -29,6 +29,6 @@ clean:
@rm -rf ./*.o $(SYSTEM_DIR) $(BDB_DIR)
$(BDB_DIST):
$(REBAR_FETCH) $(BDB_DIST_URL)
$(CURL) -L $(BDB_DIST_URL) | $(GUNZIP) | $(TAR) xf -
.EXPORT_ALL_VARIABLES: