1
0

Makefile 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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.0d
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 40b6ea380cc8a5bf9734c2f8bf7e701e
  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_SUBPKGS:= LIBOPENSSL LIBOPENSSL_DEV OPENSSL_UTIL
  15. PKGSD_OPENSSL_UTIL:= OpenSSL command line tool
  16. PKGSC_OPENSSL_UTIL:= crypto
  17. PKGSS_OPENSSL_UTIL:= libopenssl
  18. PKGSD_LIBOPENSSL_DEV:= development files for openssl
  19. PKGSC_LIBOPENSSL_DEV:= devel
  20. PKGSS_LIBOPENSSL_DEV:= libopenssl
  21. PKG_FLAVOURS_LIBOPENSSL:= WITH_EC
  22. PKGFD_WITH_EC:= enable Elliptic Curve crypto
  23. include ${TOPDIR}/mk/package.mk
  24. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  25. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENSSL_DEV},${PKGSD_LIBOPENSSL_DEV},${PKGSC_LIBOPENSSL_DEV}))
  26. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_OPENSSL_UTIL},${PKGSD_OPENSSL_UTIL},${PKGSC_OPENSSL_UTIL}))
  27. CONFIG_STYLE:= manual
  28. BUILD_STYLE:= manual
  29. INSTALL_TARGET:= install_sw
  30. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  31. 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
  32. ifeq ($(ADK_PACKAGE_LIBOPENSSL_WITH_EC),)
  33. OPENSSL_OPTIONS+= no-ec
  34. endif
  35. do-configure:
  36. (cd $(WRKBUILD); \
  37. PATH=$(TARGET_PATH) \
  38. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  39. ./Configure linux-embedded \
  40. --prefix=/usr \
  41. --openssldir=/etc/ssl \
  42. -I$(STAGING_TARGET_DIR)/usr/include \
  43. -L$(STAGING_TARGET_DIR)/usr/lib -ldl \
  44. -DHAVE_CRYPTODEV \
  45. -DOPENSSL_SMALL_FOOTPRINT \
  46. $(OPENSSL_OPTIONS) \
  47. );
  48. do-build:
  49. $(MAKE) -C $(WRKBUILD) \
  50. CC="$(TARGET_CC)" \
  51. AR="$(TARGET_CROSS)ar r" \
  52. RANLIB="$(TARGET_CROSS)ranlib" \
  53. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  54. all build-shared
  55. post-install:
  56. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  57. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  58. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  59. openssl-util-install:
  60. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  61. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  62. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  63. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  64. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  65. libopenssl-dev-install:
  66. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  67. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  68. include ${TOPDIR}/mk/pkg-bottom.mk