2002-08-10 10:51:42 +02:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# berkeley db
|
|
|
|
#
|
|
|
|
#############################################################
|
2007-07-11 16:06:06 +02:00
|
|
|
DB_VERSION:=4.3.29
|
|
|
|
DB_SO_VERSION:=4.3
|
2006-04-19 20:36:02 +02:00
|
|
|
DB_SITE:=ftp://ftp.sleepycat.com/releases
|
2007-07-11 16:06:06 +02:00
|
|
|
DB_SOURCE:=db-$(DB_VERSION).NC.tar.gz
|
|
|
|
DB_DIR:=$(BUILD_DIR)/db-$(DB_VERSION).NC
|
|
|
|
DB_SHARLIB:=libdb-$(DB_SO_VERSION).so
|
2005-05-16 19:30:25 +02:00
|
|
|
|
2002-08-10 10:51:42 +02:00
|
|
|
$(DL_DIR)/$(DB_SOURCE):
|
2002-11-21 00:16:10 +01:00
|
|
|
$(WGET) -P $(DL_DIR) $(DB_SITE)/$(DB_SOURCE)
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2003-03-01 23:00:42 +01:00
|
|
|
berkeleydb-source: $(DL_DIR)/$(DB_SOURCE)
|
2002-08-10 10:51:42 +02:00
|
|
|
|
|
|
|
$(DB_DIR)/.dist: $(DL_DIR)/$(DB_SOURCE)
|
2006-10-01 17:17:52 +02:00
|
|
|
$(ZCAT) $(DL_DIR)/$(DB_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(DB_DIR)/.dist
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2003-01-17 09:03:59 +01:00
|
|
|
$(DB_DIR)/.configured: $(DB_DIR)/.dist
|
|
|
|
(cd $(DB_DIR)/build_unix; rm -rf config.cache; \
|
2003-03-04 20:16:19 +01:00
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2007-06-27 14:01:27 +02:00
|
|
|
$(TARGET_CONFIGURE_ARGS) \
|
2003-01-17 09:03:59 +01:00
|
|
|
../dist/configure \
|
|
|
|
--target=$(GNU_TARGET_NAME) \
|
2003-03-04 20:16:19 +01:00
|
|
|
--host=$(GNU_TARGET_NAME) \
|
|
|
|
--build=$(GNU_HOST_NAME) \
|
2003-01-17 09:03:59 +01:00
|
|
|
--prefix=/usr \
|
|
|
|
--exec-prefix=/usr \
|
|
|
|
--bindir=/usr/bin \
|
|
|
|
--sbindir=/usr/sbin \
|
2007-01-14 04:52:21 +01:00
|
|
|
--libdir=/lib \
|
2003-01-17 09:03:59 +01:00
|
|
|
--libexecdir=/usr/lib \
|
|
|
|
--sysconfdir=/etc \
|
|
|
|
--datadir=/usr/share \
|
|
|
|
--localstatedir=/var \
|
2007-08-12 00:26:56 +02:00
|
|
|
--includedir=/usr/include \
|
2003-01-17 09:03:59 +01:00
|
|
|
--mandir=/usr/man \
|
|
|
|
--infodir=/usr/info \
|
2003-03-01 23:00:42 +01:00
|
|
|
--with-gnu-ld \
|
2003-01-17 09:03:59 +01:00
|
|
|
--enable-shared \
|
2003-03-01 23:00:42 +01:00
|
|
|
--disable-cxx \
|
|
|
|
--disable-java \
|
|
|
|
--disable-rpc \
|
|
|
|
--disable-tcl \
|
|
|
|
--disable-compat185 \
|
|
|
|
--with-pic \
|
2007-08-12 00:26:56 +02:00
|
|
|
$(DISABLE_LARGEFILE) \
|
2007-08-21 21:20:18 +02:00
|
|
|
)
|
2003-11-19 18:17:56 +01:00
|
|
|
$(SED) 's/\.lo/.o/g' $(DB_DIR)/build_unix/Makefile
|
2005-11-24 07:53:24 +01:00
|
|
|
touch $(DB_DIR)/.configured
|
2003-01-17 09:03:59 +01:00
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
$(DB_DIR)/build_unix/.libs/$(DB_SHARLIB): $(DB_DIR)/.configured
|
2003-01-19 07:07:22 +01:00
|
|
|
$(MAKE) CC=$(TARGET_CC) -C $(DB_DIR)/build_unix
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
$(STAGING_DIR)/lib/$(DB_SHARLIB): $(DB_DIR)/build_unix/.libs/$(DB_SHARLIB)
|
2007-01-14 04:52:21 +01:00
|
|
|
$(MAKE) DESTDIR=$(STAGING_DIR) -C $(DB_DIR)/build_unix install
|
2003-03-01 23:00:42 +01:00
|
|
|
chmod a-x $(STAGING_DIR)/lib/libdb*so*
|
|
|
|
rm -f $(STAGING_DIR)/bin/db_*
|
|
|
|
rm -rf $(STAGING_DIR)/share/locale $(STAGING_DIR)/info \
|
|
|
|
$(STAGING_DIR)/man $(STAGING_DIR)/share/doc
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
$(TARGET_DIR)/lib/$(DB_SHARLIB): $(STAGING_DIR)/lib/$(DB_SHARLIB)
|
2002-08-10 10:51:42 +02:00
|
|
|
rm -rf $(TARGET_DIR)/lib/libdb*
|
2007-08-22 14:35:41 +02:00
|
|
|
cp -a $(STAGING_DIR)/lib/libdb*so* $(TARGET_DIR)/lib/
|
2003-03-01 23:00:42 +01:00
|
|
|
rm -f $(TARGET_DIR)/lib/libdb.so $(TARGET_DIR)/lib/libdb.la $(TARGET_DIR)/lib/libdb.a
|
2004-10-14 11:39:25 +02:00
|
|
|
(cd $(TARGET_DIR)/usr/lib; ln -fs /lib/$(DB_SHARLIB) libdb.so)
|
2007-08-21 03:53:57 +02:00
|
|
|
-$(STRIP) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/lib/libdb*so*
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2007-07-11 16:06:06 +02:00
|
|
|
$(TARGET_DIR)/usr/lib/libdb.a: $(STAGING_DIR)/lib/libdb-$(DB_SO_VERSION).a
|
2007-08-12 00:26:56 +02:00
|
|
|
cp -dpf $(STAGING_DIR)/usr/include/db.h $(TARGET_DIR)/usr/include/
|
2003-03-01 23:00:42 +01:00
|
|
|
cp -dpf $(STAGING_DIR)/lib/libdb*.a $(TARGET_DIR)/usr/lib/
|
|
|
|
cp -dpf $(STAGING_DIR)/lib/libdb*.la $(TARGET_DIR)/usr/lib/
|
|
|
|
touch -c $(TARGET_DIR)/usr/lib/libdb.a
|
|
|
|
|
|
|
|
berkeleydb-headers: $(TARGET_DIR)/usr/lib/libdb.a
|
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
berkeleydb-clean:
|
2003-01-17 09:03:59 +01:00
|
|
|
$(MAKE) -C $(DB_DIR)/build_unix clean
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
berkeleydb-dirclean:
|
|
|
|
rm -rf $(DB_DIR)
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2004-10-14 11:39:25 +02:00
|
|
|
berkeleydb: uclibc $(TARGET_DIR)/lib/$(DB_SHARLIB)
|
2002-08-10 10:51:42 +02:00
|
|
|
|
2005-02-10 04:06:39 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
ifeq ($(strip $(BR2_PACKAGE_BERKELEYDB)),y)
|
|
|
|
TARGETS+=berkeleydb
|
|
|
|
endif
|