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.3 KiB

  1. #
  2. # Copyright (C) 2019 rosysong@rosinson.com
  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:=botan
  9. PKG_VERSION:=2.10.0
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>
  12. PKG_SOURCE:=Botan-$(PKG_VERSION).tgz
  13. PKG_BUILD_DIR:=$(BUILD_DIR)/Botan-$(PKG_VERSION)
  14. PKG_SOURCE_URL:=https://botan.randombit.net/releases/
  15. PKG_HASH:=88481997578c27924724fea76610d43d9f59c99edfe561d41803bbc98871ad31
  16. PKG_USE_MIPS16:=0
  17. PKG_LICENSE:=BSD-2-Clause
  18. PKG_LICENSE_FILE:=license.txt
  19. PKG_INSTALL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/botan/Default
  22. SUBMENU:=SSL
  23. TITLE:=Crypto and TLS for C++11
  24. URL:=https://botan.randombit.net
  25. endef
  26. define Package/botan/Default/description
  27. Botan (Japanese for peony) is a cryptography library written in C++11 and
  28. released under the permissive Simplified BSD license.
  29. endef
  30. define Package/libbotan
  31. $(call Package/botan/Default)
  32. SECTION:=libs
  33. CATEGORY:=Libraries
  34. TITLE+= (library)
  35. ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
  36. DEPENDS:=+libstdcpp +libpthread
  37. endef
  38. define Package/libbotan/description
  39. $(call Package/botan/Default/description)
  40. This package contains the botan library.
  41. endef
  42. CONFIGURE_CMD = ./configure.py
  43. CONFIGURE_ARGS = \
  44. --cpu="$(ARCH)" \
  45. --cc-bin="$(TOOLCHAIN_DIR)/bin/$(TARGET_CXX)" \
  46. --program-suffix="" \
  47. --prefix=$(CONFIGURE_PREFIX) \
  48. --exec-prefix=$(CONFIGURE_PREFIX) \
  49. --bindir=$(CONFIGURE_PREFIX)/bin \
  50. --sbindir=$(CONFIGURE_PREFIX)/sbin \
  51. --libexecdir=$(CONFIGURE_PREFIX)/lib \
  52. --sysconfdir=/etc \
  53. --datadir=$(CONFIGURE_PREFIX)/share \
  54. --localstatedir=/var \
  55. --mandir=$(CONFIGURE_PREFIX)/man \
  56. --infodir=$(CONFIGURE_PREFIX)/info \
  57. --optimize-for-size \
  58. $(DISABLE_IPV6)
  59. ifeq ($(CONFIG_SOFT_FLOAT),y)
  60. CONFIGURE_ARGS += --disable-neon
  61. endif
  62. TARGET_LDFLAGS += \
  63. -Wl,--gc-sections,--as-needed \
  64. -lpthread
  65. define Build/InstallDev
  66. $(INSTALL_DIR) $(1)/usr/include
  67. $(CP) $(PKG_INSTALL_DIR)/usr/include/botan* $(1)/usr/include/
  68. $(INSTALL_DIR) $(1)/usr/lib
  69. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  70. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
  71. endef
  72. define Package/libbotan/install
  73. $(INSTALL_DIR) $(1)/usr/lib
  74. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  75. endef
  76. $(eval $(call BuildPackage,libbotan))