[packages] libtiff: don't include dev shared lib symlinks in package, bump release...
[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 include $(INCLUDE_DIR)/package.mk
22
23 define Package/libdb
24 SECTION:=libs
25 CATEGORY:=Libraries
26 DEPENDS:=+libxml2
27 TITLE:=Berkeley DB library
28 URL:=http://www.sleepycat.com/products/db.shtml
29 endef
30
31 define Package/libdb/description
32 Berkeley DB library.
33 endef
34
35 define Build/Configure
36 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
37 $(TARGET_CONFIGURE_OPTS) \
38 CFLAGS="$(TARGET_CFLAGS)" \
39 CPPFLAGS="-I$(STAGING_DIR)/usr/include -I$(STAGING_DIR)/include" \
40 LDFLAGS="-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib" \
41 ../dist/configure \
42 --target=$(GNU_TARGET_NAME) \
43 --host=$(GNU_TARGET_NAME) \
44 --build=$(GNU_HOST_NAME) \
45 --program-prefix="" \
46 --program-suffix="" \
47 --prefix=/usr \
48 --exec-prefix=/usr \
49 --bindir=/usr/bin \
50 --datadir=/usr/share \
51 --includedir=/usr/include \
52 --infodir=/usr/share/info \
53 --libdir=/usr/lib \
54 --libexecdir=/usr/lib \
55 --localstatedir=/var \
56 --mandir=/usr/share/man \
57 --sbindir=/usr/sbin \
58 --sysconfdir=/etc \
59 $(DISABLE_NLS) \
60 $(DISABLE_LARGEFILE) \
61 --enable-shared \
62 --enable-static \
63 --disable-java \
64 --enable-cxx \
65 --disable-posixmutexes \
66 --disable-uimutexes \
67 --disable-tcl \
68 --disable-rpc \
69 --enable-compat185 \
70 --enable-debug \
71 --enable-statistics \
72 --enable-replication \
73 --enable-cryptography \
74 );
75 endef
76
77 TARGET_CFLAGS += $(FPIC)
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))