73e322333a1191026caeaabaa29c1c568e695e8b
[packages.git] / libs / db47 / Makefile
1 #
2 # Copyright (C) 2009-2012 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 include $(INCLUDE_DIR)/uclibc++.mk
10
11 PKG_NAME:=db47
12 PKG_VERSION:=4.7.25.NC
13 PKG_RELEASE:=6
14
15 PKG_BUILD_DIR:=$(BUILD_DIR)/db-$(PKG_VERSION)
16 PKG_SOURCE:=db-$(PKG_VERSION).tar.gz
17 PKG_SOURCE_URL:=http://download.oracle.com/berkeley-db/
18 PKG_MD5SUM:=073ab7f20d24b3872a51ca762f5090e7
19
20 PKG_FIXUP:=autoreconf
21 PKG_LIBTOOL_PATHS:=. build_unix
22 PKG_BUILD_PARALLEL:=1
23
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/libdb47
27   SECTION:=libs
28   CATEGORY:=Libraries
29   DEPENDS:=+libxml2
30   TITLE:=Berkeley DB library (4.7)
31   URL:=http://www.sleepycat.com/products/db.shtml
32   MAINTAINER:=W. Michael Petullo <mike@flyn.org>
33 endef
34
35 define Package/libdb47/description
36   Berkeley DB library (4.7).
37 endef
38
39 define Package/libdb47xx
40   SECTION:=libs
41   CATEGORY:=Libraries
42   DEPENDS:=+libdb47 $(CXX_DEPENDS)
43   TITLE:=Berkeley DB library (4.7) for C++
44   URL:=http://www.sleepycat.com/products/db.shtml
45   MAINTAINER:=W. Michael Petullo <mike@flyn.org>
46 endef
47
48 define Package/libdb47xx/description
49   Berkeley DB library (4.7).  C++ wrapper.
50 endef
51
52 define Build/Configure
53         (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
54                 $(TARGET_CONFIGURE_OPTS) \
55                 CFLAGS="$(TARGET_CFLAGS)" \
56                 CPPFLAGS="$(TARGET_CPPFLAGS)" \
57                 LDFLAGS="$(TARGET_LDFLAGS)" \
58                 ../dist/configure \
59                         --target=$(GNU_TARGET_NAME) \
60                         --host=$(GNU_TARGET_NAME) \
61                         --build=$(GNU_HOST_NAME) \
62                         --program-prefix="" \
63                         --program-suffix="" \
64                         --prefix=/usr \
65                         --exec-prefix=/usr \
66                         --bindir=/usr/bin \
67                         --datadir=/usr/share \
68                         --includedir=/usr/include \
69                         --infodir=/usr/share/info \
70                         --libdir=/usr/lib \
71                         --libexecdir=/usr/lib \
72                         --localstatedir=/var \
73                         --mandir=/usr/share/man \
74                         --sbindir=/usr/sbin \
75                         --sysconfdir=/etc \
76                         $(DISABLE_NLS) \
77                         --enable-shared \
78                         --enable-static \
79                         --disable-java \
80                         --enable-cxx \
81                         --with-mutex=UNIX/fcntl \
82                         --disable-tcl \
83                         --disable-rpc \
84                         --enable-compat185 \
85                         --enable-smallbuild \
86                         --disable-debug \
87                         --enable-cryptography \
88         );
89 endef
90
91 TARGET_CFLAGS += $(FPIC)
92
93 define Build/Compile
94         +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
95                 DESTDIR="$(PKG_INSTALL_DIR)" all
96         $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
97                 DESTDIR="$(PKG_INSTALL_DIR)" install
98 endef
99
100 define Package/libdb47/install
101         $(INSTALL_DIR) $(1)/usr/lib
102         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
103 endef
104
105 define Package/libdb47xx/install
106         $(INSTALL_DIR) $(1)/usr/lib
107         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
108 endef
109
110 define Build/InstallDev
111         $(INSTALL_DIR) $(1)/usr/include
112         $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
113         $(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.h $(1)/usr/include/
114         $(INSTALL_DIR) $(1)/usr/lib/
115         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
116 endef
117
118 $(eval $(call BuildPackage,libdb47))
119 $(eval $(call BuildPackage,libdb47xx))
120