Makefile 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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.0c
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= ff8fb85610aef328315a9decbb2712e4
  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:= WITH_EC
  22. PKGFD_WITH_EC:= enable Elliptic Curve crypto
  23. PKGSUB_WITH_EC:= libopenssl
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBOPENSSL_DEV},${PKGSD_LIBOPENSSL_DEV},${PKGSC_LIBOPENSSL_DEV}))
  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. ifeq ($(ADK_PACKAGE_OPENSSL_WITH_EC),)
  34. OPENSSL_OPTIONS+= no-ec
  35. endif
  36. do-configure:
  37. (cd $(WRKBUILD); \
  38. PATH=$(TARGET_PATH) \
  39. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  40. ./Configure linux-embedded \
  41. --prefix=/usr \
  42. --openssldir=/etc/ssl \
  43. -I$(STAGING_TARGET_DIR)/usr/include \
  44. -L$(STAGING_TARGET_DIR)/usr/lib -ldl \
  45. -DHAVE_CRYPTODEV \
  46. -DOPENSSL_SMALL_FOOTPRINT \
  47. $(OPENSSL_OPTIONS) \
  48. );
  49. do-build:
  50. $(MAKE) -C $(WRKBUILD) \
  51. MAKEDEPPROG="$(TARGET_CC)" \
  52. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  53. depend
  54. $(MAKE) -C $(WRKBUILD) \
  55. CC="$(TARGET_CC)" \
  56. AR="$(TARGET_CROSS)ar r" \
  57. RANLIB="$(TARGET_CROSS)ranlib" \
  58. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  59. all build-shared
  60. post-install:
  61. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  62. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  63. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  64. openssl-util-install:
  65. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  66. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  67. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  68. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  69. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  70. libopenssl-dev-install:
  71. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  72. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  73. include ${TOPDIR}/mk/pkg-bottom.mk