Makefile 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # $Id$
  2. #-
  3. # This file is part of the OpenADK project. OpenADK is copyrighted
  4. # material, please see the LICENCE file in the top-level directory.
  5. include ${TOPDIR}/rules.mk
  6. PKG_NAME:= openssl
  7. PKG_VERSION:= 0.9.8k
  8. PKG_RELEASE:= 2
  9. CACERT_VER:= 12
  10. PKG_MD5SUM:= e555c6d58d276aec7fdc53363e338ab3
  11. PKG_DESCR:= OpenSSL (Secure Socket Layer) libraries
  12. PKG_SECTION:= libs
  13. PKG_DEPENDS:= zlib
  14. PKG_URL:= http://www.openssl.org
  15. PKG_SITES:= http://www.openssl.org/source/ \
  16. ftp://ftp.funet.fi/pub/crypt/cryptography/libs/openssl/source/ \
  17. ftp://ftp.webmonster.de/pub/openssl/source/ \
  18. ftp://ftp.sunet.se/pub/security/tools/net/openssl/source/
  19. PKG_DESCR_1:= OpenSSL (Secure Socket Layer) command line tool
  20. PKG_SECTION_1:= admin
  21. PKG_DEPENDS_1:= libopenssl
  22. PKG_DESCR_2:= X.509v3 Root CA Certificates
  23. PKG_SECTION_2:= base
  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,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION_1}))
  27. $(eval $(call PKG_template,CA_CERTS,ca-certificates,${PKG_VERSION}-${CACERT_VER},,${PKG_DESCR_2},${PKG_SECTION_2}))
  28. BUILD_STYLE:= manual
  29. INSTALL_STYLE:= auto confprog
  30. INSTALL_TARGET:= install_sw
  31. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  32. 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
  33. do-configure:
  34. (cd $(WRKBUILD); \
  35. PATH=$(TARGET_PATH) \
  36. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  37. ./Configure linux-embedded \
  38. --prefix=/usr \
  39. --openssldir=/etc/ssl \
  40. --with-cryptodev \
  41. -I$(STAGING_DIR)/usr/include \
  42. -L$(STAGING_DIR)/usr/lib -ldl \
  43. -DOPENSSL_SMALL_FOOTPRINT \
  44. $(OPENSSL_OPTIONS) \
  45. );
  46. do-build:
  47. $(MAKE) -C $(WRKBUILD) \
  48. MAKEDEPPROG="$(TARGET_CC)" \
  49. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  50. depend
  51. $(MAKE) -C $(WRKBUILD) \
  52. CC="$(TARGET_CC)" \
  53. AR="$(TARGET_CROSS)ar r" \
  54. RANLIB="$(TARGET_CROSS)ranlib" \
  55. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  56. all build-shared
  57. post-install:
  58. ${INSTALL_DIR} ${IDIR_LIBOPENSSL}/usr/lib
  59. ${CP} ${WRKINST}/usr/lib/lib*.so.* ${IDIR_LIBOPENSSL}/usr/lib
  60. chmod 644 ${IDIR_LIBOPENSSL}/usr/lib/lib*.so.*
  61. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  62. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  63. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  64. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  65. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  66. ${INSTALL_DIR} ${IDIR_CA_CERTS}/etc/ssl
  67. ${INSTALL_DATA} cert.pem ${IDIR_CA_CERTS}/etc/ssl/
  68. include ${TOPDIR}/mk/pkg-bottom.mk