d74f56284ca04e8cb1ab50f72ce1cdc33253f7b8
[packages.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:=autoreconf
20 PKG_LIBTOOL_PATHS:=. build_unix
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/libdb47
26   SECTION:=libs
27   CATEGORY:=Libraries
28   DEPENDS:=+libxml2
29   TITLE:=Berkeley DB library (4.7)
30   URL:=http://www.sleepycat.com/products/db.shtml
31   MAINTAINER:=W. Michael Petullo <mike@flyn.org>
32 endef
33
34 define Package/libdb47/description
35   Berkeley DB library (4.7).
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="$(TARGET_CPPFLAGS)" \
43                 LDFLAGS="$(TARGET_LDFLAGS)" \
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                         --enable-shared \
64                         --enable-static \
65                         --disable-java \
66                         --disable-cxx \
67                         --with-mutex=UNIX/fcntl \
68                         --disable-tcl \
69                         --disable-rpc \
70                         --enable-compat185 \
71                         --enable-smallbuild \
72                         --disable-debug \
73                         --enable-cryptography \
74         );
75 endef
76
77 TARGET_CFLAGS += $(FPIC)
78
79 define Build/Compile
80         $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
81                 DESTDIR="$(PKG_INSTALL_DIR)" all
82         $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
83                 DESTDIR="$(PKG_INSTALL_DIR)" install
84 endef
85
86 define Package/libdb47/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         $(INSTALL_DIR) $(1)/usr/include
93         $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
94         $(INSTALL_DIR) $(1)/usr/lib/
95         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
96 endef
97
98 $(eval $(call BuildPackage,libdb47))