| 1 | # $FreeWRT$
|
|---|
| 2 | #-
|
|---|
| 3 | # This file is part of the FreeWRT project. FreeWRT is copyrighted
|
|---|
| 4 | # material, please see the LICENCE file in the top-level directory
|
|---|
| 5 | # or at http://www.freewrt.org/licence for details.
|
|---|
| 6 |
|
|---|
| 7 | include $(TOPDIR)/rules.mk
|
|---|
| 8 |
|
|---|
| 9 | PKG_NAME:= libdb
|
|---|
| 10 | PKG_VERSION:= 4.2.52
|
|---|
| 11 | PKG_RELEASE:= 1
|
|---|
| 12 | PKG_MD5SUM:= 8b5cff6eb83972afdd8e0b821703c33c
|
|---|
| 13 |
|
|---|
| 14 | PKG_SOURCE_URL:= ftp://ftp.sleepycat.com/releases/ \
|
|---|
| 15 | http://downloads.sleepycat.com/
|
|---|
| 16 | PKG_SOURCE:= db-$(PKG_VERSION).tar.gz
|
|---|
| 17 |
|
|---|
| 18 | WRKSRC= ${WRKDIR}/db-$(PKG_VERSION)
|
|---|
| 19 |
|
|---|
| 20 | include $(TOPDIR)/mk/package.mk
|
|---|
| 21 |
|
|---|
| 22 | $(eval $(call PKG_template,LIBDB,libdb,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
|---|
| 23 |
|
|---|
| 24 | $(WRKBUILD)/.configured:
|
|---|
| 25 | (cd $(WRKBUILD)/build_unix ; \
|
|---|
| 26 | $(TARGET_CONFIGURE_OPTS) \
|
|---|
| 27 | CFLAGS="$(TARGET_CFLAGS)" \
|
|---|
| 28 | CPPFLAGS="-I$(STAGING_DIR)/usr/include" \
|
|---|
| 29 | LDFLAGS="-L$(STAGING_DIR)/usr/lib" \
|
|---|
| 30 | ../dist/configure \
|
|---|
| 31 | --target=$(GNU_TARGET_NAME) \
|
|---|
| 32 | --host=$(GNU_TARGET_NAME) \
|
|---|
| 33 | --build=$(GNU_HOST_NAME) \
|
|---|
| 34 | --program-prefix="" \
|
|---|
| 35 | --program-suffix="" \
|
|---|
| 36 | --prefix=/usr \
|
|---|
| 37 | --exec-prefix=/usr \
|
|---|
| 38 | --bindir=/usr/bin \
|
|---|
| 39 | --datadir=/usr/share \
|
|---|
| 40 | --includedir=/usr/include \
|
|---|
| 41 | --infodir=/usr/share/info \
|
|---|
| 42 | --libdir=/usr/lib \
|
|---|
| 43 | --libexecdir=/usr/lib \
|
|---|
| 44 | --localstatedir=/var \
|
|---|
| 45 | --mandir=/usr/share/man \
|
|---|
| 46 | --sbindir=/usr/sbin \
|
|---|
| 47 | --sysconfdir=/etc \
|
|---|
| 48 | --disable-nls \
|
|---|
| 49 | --enable-shared \
|
|---|
| 50 | --enable-static \
|
|---|
| 51 | --disable-java \
|
|---|
| 52 | --enable-cxx \
|
|---|
| 53 | --disable-posixmutexes \
|
|---|
| 54 | --disable-uimutexes \
|
|---|
| 55 | --disable-tcl \
|
|---|
| 56 | --disable-rpc \
|
|---|
| 57 | --enable-compat185 \
|
|---|
| 58 | --enable-debug \
|
|---|
| 59 | --enable-statistics \
|
|---|
| 60 | --enable-replication \
|
|---|
| 61 | --enable-cryptography \
|
|---|
| 62 | );
|
|---|
| 63 | touch $@
|
|---|
| 64 |
|
|---|
| 65 | $(WRKBUILD)/.built:
|
|---|
| 66 | rm -rf $(WRKINST)
|
|---|
| 67 | mkdir -p $(WRKINST)
|
|---|
| 68 | $(MAKE) -C $(WRKBUILD)/build_unix \
|
|---|
| 69 | DESTDIR="$(WRKINST)" install
|
|---|
| 70 | touch $@
|
|---|
| 71 |
|
|---|
| 72 | $(IPKG_LIBDB):
|
|---|
| 73 | install -m0755 -d $(IDIR_LIBDB)/usr/lib
|
|---|
| 74 | $(CP) $(WRKINST)/usr/lib/libdb*.so $(IDIR_LIBDB)/usr/lib/
|
|---|
| 75 | $(RSTRIP) $(IDIR_LIBDB)
|
|---|
| 76 | $(IPKG_BUILD) $(IDIR_LIBDB) $(PACKAGE_DIR)
|
|---|
| 77 |
|
|---|
| 78 | $(STAGING_DIR)/usr/lib/libdb.so: $(WRKBUILD)/.built
|
|---|
| 79 | mkdir -p $(STAGING_DIR)/usr/include
|
|---|
| 80 | $(CP) $(WRKINST)/usr/include/db.h $(STAGING_DIR)/usr/include/
|
|---|
| 81 | mkdir -p $(STAGING_DIR)/usr/lib
|
|---|
| 82 | $(CP) $(WRKINST)/usr/lib/libdb*.{a,so} $(STAGING_DIR)/usr/lib/
|
|---|
| 83 | touch $(STAGING_DIR)/usr/lib/libdb.so
|
|---|
| 84 |
|
|---|
| 85 | install-dev: $(STAGING_DIR)/usr/lib/libdb.so
|
|---|
| 86 |
|
|---|
| 87 | uninstall-dev:
|
|---|
| 88 | rm -rf $(STAGING_DIR)/usr/include/db.h
|
|---|
| 89 | rm -rf $(STAGING_DIR)/usr/lib/libdb*.{a,so}
|
|---|
| 90 |
|
|---|
| 91 | compile-targets: install-dev
|
|---|
| 92 | clean-targets: uninstall-dev
|
|---|