gupnp: add package
[openwrt/svn-archive/archive.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_LICENSE:=BSD-2c
21 PKG_LICENSE_FILES:=LICENSE
22
23 PKG_FIXUP:=autoreconf
24 PKG_LIBTOOL_PATHS:=. build_unix
25 PKG_BUILD_PARALLEL:=1
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define Package/libdb47
30 SECTION:=libs
31 CATEGORY:=Libraries
32 DEPENDS:=+libxml2
33 TITLE:=Berkeley DB library (4.7)
34 URL:=http://www.sleepycat.com/products/db.shtml
35 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
36 endef
37
38 define Package/libdb47/description
39 Berkeley DB library (4.7).
40 endef
41
42 define Package/libdb47xx
43 SECTION:=libs
44 CATEGORY:=Libraries
45 DEPENDS:=+libdb47 $(CXX_DEPENDS)
46 TITLE:=Berkeley DB library (4.7) for C++
47 URL:=http://www.sleepycat.com/products/db.shtml
48 MAINTAINER:=W. Michael Petullo <mike@flyn.org>
49 endef
50
51 define Package/libdb47xx/description
52 Berkeley DB library (4.7). C++ wrapper.
53 endef
54
55 CONFIGURE_PATH = build_unix
56 CONFIGURE_CMD = ../dist/configure
57
58 CONFIGURE_ARGS += \
59 --enable-shared \
60 --enable-static \
61 --disable-java \
62 --with-mutex=UNIX/fcntl \
63 --disable-tcl \
64 --disable-rpc \
65 --enable-compat185 \
66 --enable-smallbuild \
67 --disable-debug \
68 --enable-cryptography \
69 $(if $(CONFIG_PACKAGE_libdb47xx),--enable-cxx,--disable-cxx)
70
71 TARGET_CFLAGS += $(FPIC)
72
73 define Build/Compile
74 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
75 DESTDIR="$(PKG_INSTALL_DIR)" all
76 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
77 DESTDIR="$(PKG_INSTALL_DIR)" install
78 endef
79
80 define Package/libdb47/install
81 $(INSTALL_DIR) $(1)/usr/lib
82 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
83 endef
84
85 define Package/libdb47xx/install
86 $(INSTALL_DIR) $(1)/usr/lib
87 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
88 endef
89
90 define Build/InstallDev
91 $(INSTALL_DIR) $(1)/usr/include
92 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
93 $(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.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))
99 $(eval $(call BuildPackage,libdb47xx))
100