[packages] licensing: Licensing metadata added to many packages
[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 define Build/Configure
56 (cd $(PKG_BUILD_DIR)/build_unix; rm -f config.cache; \
57 $(TARGET_CONFIGURE_OPTS) \
58 CFLAGS="$(TARGET_CFLAGS)" \
59 CPPFLAGS="$(TARGET_CPPFLAGS)" \
60 LDFLAGS="$(TARGET_LDFLAGS)" \
61 ../dist/configure \
62 --target=$(GNU_TARGET_NAME) \
63 --host=$(GNU_TARGET_NAME) \
64 --build=$(GNU_HOST_NAME) \
65 --program-prefix="" \
66 --program-suffix="" \
67 --prefix=/usr \
68 --exec-prefix=/usr \
69 --bindir=/usr/bin \
70 --datadir=/usr/share \
71 --includedir=/usr/include \
72 --infodir=/usr/share/info \
73 --libdir=/usr/lib \
74 --libexecdir=/usr/lib \
75 --localstatedir=/var \
76 --mandir=/usr/share/man \
77 --sbindir=/usr/sbin \
78 --sysconfdir=/etc \
79 $(DISABLE_NLS) \
80 --enable-shared \
81 --enable-static \
82 --disable-java \
83 --enable-cxx \
84 --with-mutex=UNIX/fcntl \
85 --disable-tcl \
86 --disable-rpc \
87 --enable-compat185 \
88 --enable-smallbuild \
89 --disable-debug \
90 --enable-cryptography \
91 );
92 endef
93
94 TARGET_CFLAGS += $(FPIC)
95
96 define Build/Compile
97 +$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/build_unix \
98 DESTDIR="$(PKG_INSTALL_DIR)" all
99 $(MAKE) -C $(PKG_BUILD_DIR)/build_unix \
100 DESTDIR="$(PKG_INSTALL_DIR)" install
101 endef
102
103 define Package/libdb47/install
104 $(INSTALL_DIR) $(1)/usr/lib
105 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb-*.so $(1)/usr/lib/
106 endef
107
108 define Package/libdb47xx/install
109 $(INSTALL_DIR) $(1)/usr/lib
110 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb_cxx-*.so $(1)/usr/lib/
111 endef
112
113 define Build/InstallDev
114 $(INSTALL_DIR) $(1)/usr/include
115 $(CP) $(PKG_INSTALL_DIR)/usr/include/db.h $(1)/usr/include/
116 $(CP) $(PKG_INSTALL_DIR)/usr/include/db_cxx.h $(1)/usr/include/
117 $(INSTALL_DIR) $(1)/usr/lib/
118 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdb*.{a,so} $(1)/usr/lib
119 endef
120
121 $(eval $(call BuildPackage,libdb47))
122 $(eval $(call BuildPackage,libdb47xx))
123