2 # Copyright (C) 2009-2012 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
9 include $(INCLUDE_DIR)/uclibc++.mk
12 PKG_VERSION:=4.7.25.NC
15 PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
16 PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
18 PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
21 PKG_LICENSE_FILES:=LICENSE
24 PKG_LIBTOOL_PATHS:=. build_unix
27 include $(INCLUDE_DIR)/package.mk
29 define Package/libdb47
33 TITLE:=Berkeley DB library (4.7)
34 URL:=http://www.sleepycat.com/products/db.shtml
35 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
38 define Package/libdb47/description
39 Berkeley DB library (4.7).
42 define Package/libdb47xx
45 DEPENDS:=+libdb47 $(CXX_DEPENDS)
46 TITLE:=Berkeley DB library (4.7) for C++
47 URL:=http://www.sleepycat.com/products/db.shtml
48 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
51 define Package/libdb47xx/description
52 Berkeley DB library (4.7). C++ wrapper.
55 define Build/Configure
56 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
57 $(TARGET_CONFIGURE_OPTS) \
58 CFLAGS="$(TARGET_CFLAGS)" \
59 CPPFLAGS="$(TARGET_CPPFLAGS)" \
60 LDFLAGS="$(TARGET_LDFLAGS)" \
62 --target=$(GNU_TARGET_NAME) \
63 --host=$(GNU_TARGET_NAME) \
64 --build=$(GNU_HOST_NAME) \
70 --datadir=/usr/share \
71 --includedir=/usr/include \
72 --infodir=/usr/share/info \
74 --libexecdir=/usr/lib \
75 --localstatedir=/var \
76 --mandir=/usr/share/man \
84 --with-mutex=UNIX/fcntl \
90 --enable-cryptography \
94 TARGET_CFLAGS += $(FPIC)
97 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
98 DESTDIR="$(PKG_INSTALL_DIR)" all
99 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
100 DESTDIR="$(PKG_INSTALL_DIR)" install
103 define Package/libdb47/install
104 $(INSTALL_DIR) $(1)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
108 define Package/libdb47xx/install
109 $(INSTALL_DIR) $(1)/usr/lib
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
113 define Build/InstallDev
114 $(INSTALL_DIR) $(1)/usr/include
115 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
116 $(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.h $(1)/usr/include/
117 $(INSTALL_DIR) $(1)/usr/lib/
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
121 $(eval $(call BuildPackage,libdb47))
122 $(eval $(call BuildPackage,libdb47xx))