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.

92 lines
2.6 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.3.16
  10. PKG_RELEASE:=1
  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:=6a3fc2616567f23993984ada3cea97d953a27669ffd1bfbbe961f26e0cf96cc5
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. # for $(LINUX_VERSION)
  18. include $(INCLUDE_DIR)/kernel.mk
  19. # for $(VERSION_DIST)
  20. include $(INCLUDE_DIR)/version.mk
  21. define Package/tdb
  22. SUBMENU:=database
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Trivial Database
  26. DEPNEDS:=+libattr
  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. --target=$(GNU_TARGET_NAME) \
  44. --build=$(GNU_HOST_NAME) \
  45. --cross-compile \
  46. --cross-answers="$(PKG_BUILD_DIR)/cache.txt" \
  47. --program-prefix="" \
  48. --prefix=$(CONFIGURE_PREFIX) \
  49. --exec-prefix=$(CONFIGURE_PREFIX) \
  50. --bindir=$(CONFIGURE_PREFIX)/bin \
  51. --sbindir=$(CONFIGURE_PREFIX)/sbin \
  52. --libexecdir=$(CONFIGURE_PREFIX)/lib \
  53. --sysconfdir=/etc \
  54. --datadir=$(CONFIGURE_PREFIX)/share \
  55. --localstatedir=/var \
  56. --mandir=$(CONFIGURE_PREFIX)/man \
  57. --infodir=$(CONFIGURE_PREFIX)/info \
  58. $(DISABLE_IPV6)
  59. CONFIGURE_ARGS += \
  60. --disable-python \
  61. --disable-rpath \
  62. --disable-rpath-install \
  63. --disable-rpath-private-install
  64. define Build/Configure
  65. $(CP) ./files/tdb.cache.txt $(PKG_BUILD_DIR)/cache.txt
  66. echo -e "\nChecking uname sysname type: \"$(VERSION_DIST)\" \
  67. \nChecking uname release type: \"$(LINUX_VERSION)-$(GNU_TARGET_NAME)\" \
  68. \nChecking uname machine type: \"$(ARCH)\" \
  69. \nChecking uname version type: \"$(VERSION_DIST) Linux-$(LINUX_VERSION) $(shell date +%Y-%m-%d)\"\n" >> $(PKG_BUILD_DIR)/cache.txt;
  70. $(call Build/Configure/Default)
  71. endef
  72. define Package/tdb/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
  75. $(INSTALL_DIR) $(1)/usr/bin
  76. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  77. endef
  78. $(eval $(call BuildPackage,tdb))