Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= openssl
  5. PKG_VERSION:= 1.0.1e
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 66bf6f10f060d561929de96f9dfe5b8c
  8. PKG_DESCR:= OpenSSL (Secure Socket Layer) libraries
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= zlib
  11. PKG_BUILDDEP:= zlib
  12. PKG_URL:= http://www.openssl.org/
  13. PKG_SITES:= http://www.openssl.org/source/
  14. PKG_LIBNAME:= libopenssl
  15. PKG_OPTS:= dev
  16. PKG_SUBPKGS:= LIBOPENSSL OPENSSL_UTIL
  17. PKGSD_OPENSSL_UTIL:= OpenSSL command line tool
  18. PKGSC_OPENSSL_UTIL:= crypto
  19. PKGSS_OPENSSL_UTIL:= libopenssl
  20. PKG_FLAVOURS_LIBOPENSSL:= WITH_CRYPTODEV
  21. PKGFD_WITH_CRYPTODEV:= enable support for cryptodev-linux
  22. ifeq ($(ADK_STATIC),y)
  23. PKG_OPTS+= libmix
  24. endif
  25. include ${TOPDIR}/mk/package.mk
  26. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},$(PKG_OPTS)))
  27. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL}))
  28. CONFIG_STYLE:= manual
  29. BUILD_STYLE:= manual
  30. INSTALL_TARGET:= install_sw
  31. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  32. OPENSSL_OPTIONS:= shared no-err no-krb5 no-threads zlib-dynamic no-engines no-camellia no-idea no-rc5 no-mdc2 no-sha0 no-smime no-aes192 no-ripemd no-cast
  33. ifneq ($(ADK_PACKAGE_LIBOPENSSL_WITH_CRYPTODEV),)
  34. OPENSSL_OPTIONS+= -DHAVE_CRYPTODEV -DUSE_CRYPTODEV_DIGESTS
  35. endif
  36. ifeq ($(ADK_LINUX_X86_64),y)
  37. CONFIG:= linux-embedded-x86_64
  38. else
  39. CONFIG:= linux-embedded
  40. endif
  41. post-extract:
  42. -mkdir -p $(STAGING_DIR)/usr/include/crypto
  43. cp ./files/cryptodev.h $(STAGING_DIR)/usr/include/crypto/
  44. do-configure:
  45. (cd $(WRKBUILD); \
  46. PATH='$(TARGET_PATH)' \
  47. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  48. ./Configure $(CONFIG) \
  49. --prefix=/usr \
  50. --openssldir=/etc/ssl \
  51. -I$(STAGING_TARGET_DIR)/usr/include \
  52. -L$(STAGING_TARGET_DIR)/usr/lib -ldl \
  53. -DOPENSSL_SMALL_FOOTPRINT \
  54. $(OPENSSL_OPTIONS) \
  55. );
  56. do-build:
  57. $(MAKE) -C $(WRKBUILD) \
  58. CC="$(TARGET_CC)" \
  59. AR="$(TARGET_CROSS)ar r" \
  60. RANLIB="$(TARGET_CROSS)ranlib" \
  61. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  62. all build-shared
  63. libopenssl-install:
  64. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  65. ${CP} ${WRKINST}/usr/lib*/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  66. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  67. openssl-util-install:
  68. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  69. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  70. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  71. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  72. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  73. include ${TOPDIR}/mk/pkg-bottom.mk