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