2 # Copyright (C) 2009 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
11 PKG_VERSION
:=4.7.25.NC
14 PKG_BUILD_DIR
:=$(BUILD_DIR
)/db-
$(PKG_VERSION
)
15 PKG_SOURCE
:=db-
$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://download.oracle.com
/berkeley-db
/
17 PKG_MD5SUM
:=073ab7f20d24b3872a51ca762f5090e7
19 include $(INCLUDE_DIR
)/package.mk
21 define Package
/libdb47
25 TITLE
:=Berkeley DB library
(4.7)
26 URL
:=http
://www.sleepycat.com
/products
/db.shtml
29 define Package
/libdb47
/description
30 Berkeley DB library
(4.7).
33 define Build
/Configure
34 (cd
$(PKG_BUILD_DIR
)/build_unix
; rm -f config.cache
; \
35 $(TARGET_CONFIGURE_OPTS
) \
36 CFLAGS
="$(TARGET_CFLAGS)" \
37 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
38 LDFLAGS
="$(TARGET_LDFLAGS)" \
40 --target
=$(GNU_TARGET_NAME
) \
41 --host
=$(GNU_TARGET_NAME
) \
42 --build
=$(GNU_HOST_NAME
) \
48 --datadir=/usr
/share \
49 --includedir=/usr
/include \
50 --infodir=/usr
/share
/info \
52 --libexecdir
=/usr
/lib \
53 --localstatedir
=/var \
54 --mandir=/usr
/share
/man \
58 $(DISABLE_LARGEFILE
) \
63 --with-mutex
=UNIX
/fcntl \
69 --enable-cryptography \
73 TARGET_CFLAGS
+= $(FPIC
)
76 $(MAKE
) -C
$(PKG_BUILD_DIR
)/build_unix \
77 DESTDIR
="$(PKG_INSTALL_DIR)" install
80 define Package
/libdb47
/install
81 $(INSTALL_DIR
) $(1)/usr
/lib
82 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdb-
*.so
$(1)/usr
/lib
/
85 define Build
/InstallDev
86 $(INSTALL_DIR
) $(1)/usr
/include
87 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/db.h
$(1)/usr
/include/
88 $(INSTALL_DIR
) $(1)/usr
/lib
/
89 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdb
*.
{a
,so
} $(1)/usr
/lib
92 $(eval
$(call BuildPackage
,libdb47
))