2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
15 PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=ftp://ftp.sleepycat.com/releases/ \
17 http://downloads.sleepycat.com/
18 PKG_MD5SUM:=8b5cff6eb83972afdd8e0b821703c33c
20 include $(INCLUDE_DIR)/package.mk
26 TITLE:=Berkeley DB library
27 URL:=http://www.sleepycat.com/products/db.shtml
30 define Package/libdb/description
34 define Build/Configure
35 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
36 $(TARGET_CONFIGURE_OPTS) \
37 CFLAGS="$(TARGET_CFLAGS)" \
38 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
39 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
59 $(DISABLE_LARGEFILE) \
64 --disable-posixmutexes \
71 --enable-replication \
72 --enable-cryptography \
76 TARGET_CFLAGS += $(FPIC)
79 rm -rf $(PKG_INSTALL_DIR)
80 mkdir -p $(PKG_INSTALL_DIR)
81 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
82 DESTDIR="$(PKG_INSTALL_DIR)" install
85 define Package/libdb/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
90 define Build/InstallDev
91 mkdir -p $(1)/usr/include
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib/
97 $(eval $(call BuildPackage,libdb))