[package] add mxml library (#7396)
[openwrt/svn-archive/archive.git] / libs / db47 / Makefile
1 #
2 # Copyright (C) 2009-2010 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:=db47
11 PKG_VERSION:=4.7.25.NC
12 PKG_RELEASE:=6
13
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
18
19 PKG_FIXUP:=libtool
20 PKG_LIBTOOL_PATHS:=. build_unix
21
22 include $(INCLUDE_DIR)/package.mk
23
24 define Package/libdb47
25 SECTION:=libs
26 CATEGORY:=Libraries
27 DEPENDS:=+libxml2
28 TITLE:=Berkeley DB library (4.7)
29 URL:=http://www.sleepycat.com/products/db.shtml
30 endef
31
32 define Package/libdb47/description
33 Berkeley DB library (4.7).
34 endef
35
36 define Build/Configure
37 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS)" \
40 CPPFLAGS="$(TARGET_CPPFLAGS)" \
41 LDFLAGS="$(TARGET_LDFLAGS)" \
42 ../dist/configure \
43 --target=$(GNU_TARGET_NAME) \
44 --host=$(GNU_TARGET_NAME) \
45 --build=$(GNU_HOST_NAME) \
46 --program-prefix="" \
47 --program-suffix="" \
48 --prefix=/usr \
49 --exec-prefix=/usr \
50 --bindir=/usr/bin \
51 --datadir=/usr/share \
52 --includedir=/usr/include \
53 --infodir=/usr/share/info \
54 --libdir=/usr/lib \
55 --libexecdir=/usr/lib \
56 --localstatedir=/var \
57 --mandir=/usr/share/man \
58 --sbindir=/usr/sbin \
59 --sysconfdir=/etc \
60 $(DISABLE_NLS) \
61 $(DISABLE_LARGEFILE) \
62 --enable-shared \
63 --enable-static \
64 --disable-java \
65 --disable-cxx \
66 --with-mutex=UNIX/fcntl \
67 --disable-tcl \
68 --disable-rpc \
69 --enable-compat185 \
70 --enable-smallbuild \
71 --disable-debug \
72 --enable-cryptography \
73 );
74 endef
75
76 TARGET_CFLAGS += $(FPIC)
77
78 define Build/Compile
79 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
80 DESTDIR="$(PKG_INSTALL_DIR)" install
81 endef
82
83 define Package/libdb47/install
84 $(INSTALL_DIR) $(1)/usr/lib
85 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
86 endef
87
88 define Build/InstallDev
89 $(INSTALL_DIR) $(1)/usr/include
90 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
91 $(INSTALL_DIR) $(1)/usr/lib/
92 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
93 endef
94
95 $(eval $(call BuildPackage,libdb47))