DESCRIPTION:= is obselete
[openwrt/svn-archive/archive.git] / libs / db / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id$
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=db
12 PKG_VERSION:=4.2.52
13 PKG_RELEASE:=1
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
16 PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=ftp://ftp.sleepycat.com/releases/ \
18 http://downloads.sleepycat.com/
19 PKG_MD5SUM:=8b5cff6eb83972afdd8e0b821703c33c
20 PKG_CAT:=zcat
21
22 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libdb
27 SECTION:=libs
28 CATEGORY:=Libraries
29 DEPENDS:=+libxml2
30 TITLE:=Berkeley DB library
31 URL:=http://www.sleepycat.com/products/db.shtml
32 endef
33
34 define Package/libdb/description
35 Berkeley DB library.
36 endef
37
38 define Build/Configure
39 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
40 $(TARGET_CONFIGURE_OPTS) \
41 CFLAGS="$(TARGET_CFLAGS)" \
42 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
43 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
44 ../dist/configure \
45 --target=$(GNU_TARGET_NAME) \
46 --host=$(GNU_TARGET_NAME) \
47 --build=$(GNU_HOST_NAME) \
48 --program-prefix="" \
49 --program-suffix="" \
50 --prefix=/usr \
51 --exec-prefix=/usr \
52 --bindir=/usr/bin \
53 --datadir=/usr/share \
54 --includedir=/usr/include \
55 --infodir=/usr/share/info \
56 --libdir=/usr/lib \
57 --libexecdir=/usr/lib \
58 --localstatedir=/var \
59 --mandir=/usr/share/man \
60 --sbindir=/usr/sbin \
61 --sysconfdir=/etc \
62 $(DISABLE_NLS) \
63 $(DISABLE_LARGEFILE) \
64 --enable-shared \
65 --enable-static \
66 --disable-java \
67 --enable-cxx \
68 --disable-posixmutexes \
69 --disable-uimutexes \
70 --disable-tcl \
71 --disable-rpc \
72 --enable-compat185 \
73 --enable-debug \
74 --enable-statistics \
75 --enable-replication \
76 --enable-cryptography \
77 );
78 endef
79
80 define Build/Compile
81 rm -rf $(PKG_INSTALL_DIR)
82 mkdir -p $(PKG_INSTALL_DIR)
83 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
84 DESTDIR="$(PKG_INSTALL_DIR)" install
85 endef
86
87 define Package/libdb/install
88 $(INSTALL_DIR) $(1)/usr/lib
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
90 endef
91
92 define Build/InstallDev
93 mkdir -p $(1)/usr/include
94 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
95 mkdir -p $(1)/usr/lib
96 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib/
97 endef
98
99 define Build/UninstallDev
100 rm -rf \
101 $(STAGING_DIR)/usr/include/db.h \
102 $(STAGING_DIR)/usr/lib/libdb*.{a,so}
103 endef
104
105 $(eval $(call BuildPackage,libdb))