Makefile 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #
  2. # Copyright (C) 2011-2013 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:=polarssl
  9. PKG_VERSION:=1.2.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
  12. PKG_SOURCE_URL:=https://polarssl.org/code/releases
  13. PKG_MD5SUM:=e00d55ddda1e68a16af766dd92d69ce6
  14. include $(INCLUDE_DIR)/package.mk
  15. include $(INCLUDE_DIR)/cmake.mk
  16. define Package/polarssl/Default
  17. SUBMENU:=SSL
  18. TITLE:=Embedded SSL
  19. URL:=http://polarssl.org/
  20. endef
  21. define Package/polarssl/Default/description
  22. The aim of the PolarSSL project is to provide a quality, open-source
  23. cryptographic library written in C and targeted at embedded systems.
  24. endef
  25. define Package/libpolarssl
  26. $(call Package/polarssl/Default)
  27. SECTION:=libs
  28. CATEGORY:=Libraries
  29. TITLE+= (library)
  30. endef
  31. define Package/libpolarssl/description
  32. $(call Package/polarssl/Default/description)
  33. This package contains the PolarSSL library.
  34. endef
  35. define Package/polarssl-progs
  36. $(call Package/polarssl/Default)
  37. SECTION:=utils
  38. CATEGORY:=Utilities
  39. DEPENDS:=+libpolarssl
  40. TITLE+= (programs)
  41. endef
  42. define Package/polarssl-progs/description
  43. $(call Package/polarssl/Default/description)
  44. This package contains the PolarSSL programs.
  45. endef
  46. PKG_INSTALL:=1
  47. CMAKE_OPTIONS += \
  48. -DCMAKE_BUILD_TYPE:String="Release" \
  49. -DUSE_SHARED_POLARSSL_LIBRARY:Bool=ON \
  50. define Build/InstallDev
  51. $(INSTALL_DIR) $(1)/usr/include
  52. $(CP) $(PKG_INSTALL_DIR)/usr/include/polarssl $(1)/usr/include/
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
  55. endef
  56. define Package/libpolarssl/install
  57. $(INSTALL_DIR) $(1)/usr/lib
  58. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpolarssl.so* $(1)/usr/lib/
  59. endef
  60. define Package/polarssl-progs/install
  61. $(INSTALL_DIR) $(1)/usr/bin
  62. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
  63. endef
  64. $(eval $(call BuildPackage,libpolarssl))
  65. $(eval $(call BuildPackage,polarssl-progs))