Makefile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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:= 0.9.8l
  6. PKG_RELEASE:= 1
  7. PKG_BUILDDEP+= zlib
  8. PKG_MD5SUM:= 05a0ece1372392a2cf310ebb96333025
  9. PKG_DESCR:= OpenSSL (Secure Socket Layer) libraries
  10. PKG_SECTION:= libs
  11. PKG_DEPENDS:= zlib
  12. PKG_URL:= http://www.openssl.org
  13. PKG_SITES:= http://www.openssl.org/source/ \
  14. ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \
  15. ftp://ftp.webmonster.de/pub/openssl/source/ \
  16. ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/
  17. PKG_DESCR_UTIL:= OpenSSL (Secure Socket Layer) command line tool
  18. PKG_SECTION_UTIL:= admin
  19. PKG_DEPENDS_UTIL:= libopenssl
  20. PKG_DEPENDS_DEV:= libopenssl
  21. include ${TOPDIR}/mk/package.mk
  22. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  23. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_DEV},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_UTIL},${PKG_DESCR_UTIL},${PKG_SECTION_UTIL}))
  25. BUILD_STYLE:= manual
  26. INSTALL_STYLE:= auto
  27. INSTALL_TARGET:= install_sw
  28. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  29. OPENSSL_OPTIONS = shared no-ec no-err no-hw 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
  30. post-extract:
  31. @find ${WRKBUILD} -name *.rej -delete
  32. do-configure:
  33. (cd $(WRKBUILD); \
  34. PATH=$(TARGET_PATH) \
  35. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  36. ./Configure linux-embedded \
  37. --prefix=/usr \
  38. --openssldir=/etc/ssl \
  39. --with-cryptodev \
  40. -I$(STAGING_DIR)/usr/include \
  41. -L$(STAGING_DIR)/usr/lib -ldl \
  42. -DOPENSSL_SMALL_FOOTPRINT \
  43. $(OPENSSL_OPTIONS) \
  44. );
  45. do-build:
  46. $(MAKE) -C $(WRKBUILD) \
  47. MAKEDEPPROG="$(TARGET_CC)" \
  48. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  49. depend
  50. $(MAKE) -C $(WRKBUILD) \
  51. CC="$(TARGET_CC)" \
  52. AR="$(TARGET_CROSS)ar r" \
  53. RANLIB="$(TARGET_CROSS)ranlib" \
  54. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  55. all build-shared
  56. post-install:
  57. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  58. ${CP} ${WRKINST}/usr/lib/lib*.so* ${IDIR_LIBOPENSSL}/usr/lib
  59. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so*
  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. ${INSTALL_DIR} ${IDIR_LIBOPENSSL_DEV}/usr/include
  66. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBOPENSSL_DEV}/usr/include
  67. include ${TOPDIR}/mk/pkg-bottom.mk