Makefile 2.0 KB

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