You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
2.5 KiB

  1. #
  2. # Copyright (C) 2007-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=tdb
  9. PKG_VERSION:=1.4.3
  10. PKG_RELEASE:=2
  11. PKG_LICENSE:=GPL-2.0
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://www.samba.org/ftp/tdb/
  14. PKG_HASH:=c8058393dfa15f47e11ebd2f1d132693f0b3b3b8bf22d0201bfb305026f88a1b
  15. PKG_BUILD_DEPENDS:=python3/host
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. # for $(LINUX_VERSION)
  19. include $(INCLUDE_DIR)/kernel.mk
  20. # for $(VERSION_DIST)
  21. include $(INCLUDE_DIR)/version.mk
  22. define Package/tdb
  23. SUBMENU:=Database
  24. SECTION:=libs
  25. CATEGORY:=Libraries
  26. TITLE:=Trivial Database
  27. URL:=http://sourceforge.net/projects/tdb/
  28. MAINTAINER:=Dmitry V. Zimin <pfzim@mail.ru>
  29. endef
  30. define Package/tdb/description
  31. TDB is a Trivial Database. In concept, it is very much like GDBM,
  32. and BSD's DB except that it allows multiple simultaneous writers
  33. and uses locking internally to keep writers from trampling on
  34. each other. TDB is also extremely small.
  35. endef
  36. define Build/InstallDev
  37. $(INSTALL_DIR) $(1)/usr/include
  38. $(CP) $(PKG_INSTALL_DIR)/usr/include/tdb.h $(1)/usr/include/
  39. $(INSTALL_DIR) $(1)/usr/lib
  40. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  41. endef
  42. CONFIGURE_ARGS:= \
  43. --cross-compile \
  44. --cross-answers="$(PKG_BUILD_DIR)/cache.txt" \
  45. --prefix=$(CONFIGURE_PREFIX) \
  46. --exec-prefix=$(CONFIGURE_PREFIX) \
  47. --bindir=$(CONFIGURE_PREFIX)/bin \
  48. --sbindir=$(CONFIGURE_PREFIX)/sbin \
  49. --libexecdir=$(CONFIGURE_PREFIX)/lib \
  50. --sysconfdir=/etc \
  51. --datadir=$(CONFIGURE_PREFIX)/share \
  52. --localstatedir=/var \
  53. --mandir=$(CONFIGURE_PREFIX)/man \
  54. --infodir=$(CONFIGURE_PREFIX)/info \
  55. --disable-python \
  56. --disable-rpath \
  57. --disable-rpath-install \
  58. --disable-rpath-private-install
  59. define Build/Configure
  60. $(CP) ./files/tdb.cache.txt $(PKG_BUILD_DIR)/cache.txt
  61. echo -e "\nChecking uname sysname type: \"$(VERSION_DIST)\" \
  62. \nChecking uname release type: \"$(LINUX_VERSION)-$(GNU_TARGET_NAME)\" \
  63. \nChecking uname machine type: \"$(ARCH)\" \
  64. \nChecking uname version type: \"$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)\"\n" >> $(PKG_BUILD_DIR)/cache.txt;
  65. $(call Build/Configure/Default)
  66. endef
  67. define Package/tdb/install
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  72. endef
  73. $(eval $(call BuildPackage,tdb))