remove UninstallDev
[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
21 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libdb
26 SECTION:=libs
27 CATEGORY:=Libraries
28 DEPENDS:=+libxml2
29 TITLE:=Berkeley DB library
30 URL:=http://www.sleepycat.com/products/db.shtml
31 endef
32
33 define Package/libdb/description
34 Berkeley DB library.
35 endef
36
37 define Build/Configure
38 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CFLAGS)" \
41 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
42 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
43 ../dist/configure \
44 --target=$(GNU_TARGET_NAME) \
45 --host=$(GNU_TARGET_NAME) \
46 --build=$(GNU_HOST_NAME) \
47 --program-prefix="" \
48 --program-suffix="" \
49 --prefix=/usr \
50 --exec-prefix=/usr \
51 --bindir=/usr/bin \
52 --datadir=/usr/share \
53 --includedir=/usr/include \
54 --infodir=/usr/share/info \
55 --libdir=/usr/lib \
56 --libexecdir=/usr/lib \
57 --localstatedir=/var \
58 --mandir=/usr/share/man \
59 --sbindir=/usr/sbin \
60 --sysconfdir=/etc \
61 $(DISABLE_NLS) \
62 $(DISABLE_LARGEFILE) \
63 --enable-shared \
64 --enable-static \
65 --disable-java \
66 --enable-cxx \
67 --disable-posixmutexes \
68 --disable-uimutexes \
69 --disable-tcl \
70 --disable-rpc \
71 --enable-compat185 \
72 --enable-debug \
73 --enable-statistics \
74 --enable-replication \
75 --enable-cryptography \
76 );
77 endef
78
79 define Build/Compile
80 rm -rf $(PKG_INSTALL_DIR)
81 mkdir -p $(PKG_INSTALL_DIR)
82 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
83 DESTDIR="$(PKG_INSTALL_DIR)" install
84 endef
85
86 define Package/libdb/install
87 $(INSTALL_DIR) $(1)/usr/lib
88 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
89 endef
90
91 define Build/InstallDev
92 mkdir -p $(1)/usr/include
93 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
94 mkdir -p $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib/
96 endef
97
98 $(eval $(call BuildPackage,libdb))