Makefile 2.4 KB

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