[packages] tar: Update to v1.22 (closes #5667)
[openwrt/svn-archive/archive.git] / libs / db / Makefile
1 #
2 # Copyright (C) 2006-2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=db
11 PKG_VERSION:=4.2.52
12 PKG_RELEASE:=1
13
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
19
20 include $(INCLUDE_DIR)/package.mk
21
22 define Package/libdb
23 SECTION:=libs
24 CATEGORY:=Libraries
25 DEPENDS:=+libxml2
26 TITLE:=Berkeley DB library
27 URL:=http://www.sleepycat.com/products/db.shtml
28 endef
29
30 define Package/libdb/description
31 Berkeley DB library.
32 endef
33
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="$(TARGET_CPPFLAGS)" \
39 LDFLAGS="$(TARGET_LDFLAGS)" \
40 ../dist/configure \
41 --target=$(GNU_TARGET_NAME) \
42 --host=$(GNU_TARGET_NAME) \
43 --build=$(GNU_HOST_NAME) \
44 --program-prefix="" \
45 --program-suffix="" \
46 --prefix=/usr \
47 --exec-prefix=/usr \
48 --bindir=/usr/bin \
49 --datadir=/usr/share \
50 --includedir=/usr/include \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --libexecdir=/usr/lib \
54 --localstatedir=/var \
55 --mandir=/usr/share/man \
56 --sbindir=/usr/sbin \
57 --sysconfdir=/etc \
58 $(DISABLE_NLS) \
59 $(DISABLE_LARGEFILE) \
60 --enable-shared \
61 --enable-static \
62 --disable-java \
63 --enable-cxx \
64 --disable-posixmutexes \
65 --disable-uimutexes \
66 --disable-tcl \
67 --disable-rpc \
68 --enable-compat185 \
69 --enable-debug \
70 --enable-statistics \
71 --enable-replication \
72 --enable-cryptography \
73 );
74 endef
75
76 TARGET_CFLAGS += $(FPIC)
77
78 define Build/Compile
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
83 endef
84
85 define Package/libdb/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
88 endef
89
90 define Build/InstallDev
91 mkdir -p $(1)/usr/include
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
93 mkdir -p $(1)/usr/lib
94 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib/
95 endef
96
97 $(eval $(call BuildPackage,libdb))