Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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.0a
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e3873edfffc783624cfbdb65e2249cbd
  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_DESCR_UTIL:= OpenSSL command line tool
  15. PKG_SECTION_UTIL:= crypto
  16. PKG_DEPENDS_UTIL:= libopenssl
  17. PKG_DESCR_DEV:= development files for openssl
  18. PKG_SECTION_DEV:= devel
  19. PKG_DEPENDS_DEV:= libopenssl
  20. include ${TOPDIR}/mk/package.mk
  21. $(eval $(call PKG_template,LIBOPENSSL,libopenssl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  22. $(eval $(call PKG_template,LIBOPENSSL_DEV,libopenssl-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_DEV},${PKG_DESCR_DEV},${PKG_SECTION_DEV}))
  23. $(eval $(call PKG_template,OPENSSL_UTIL,openssl-util,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_UTIL},${PKG_DESCR_UTIL},${PKG_SECTION_UTIL}))
  24. SUB_INSTALLS-y:=
  25. SUB_INSTALLS-m:=
  26. SUB_INSTALLS-${ADK_PACKAGE_LIBOPENSSL_DEV}+= libopenssl-dev-install
  27. CONFIG_STYLE:= manual
  28. BUILD_STYLE:= manual
  29. INSTALL_TARGET:= install_sw
  30. FAKE_FLAGS+= INSTALL_PREFIX=${WRKINST}
  31. OPENSSL_OPTIONS = shared no-ec 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. do-configure:
  33. (cd $(WRKBUILD); \
  34. PATH=$(TARGET_PATH) \
  35. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  36. bash -x ./Configure linux-embedded \
  37. --prefix=/usr \
  38. --openssldir=/etc/ssl \
  39. -I$(STAGING_DIR)/usr/include \
  40. -L$(STAGING_DIR)/usr/lib -ldl \
  41. -DOPENSSL_SMALL_FOOTPRINT \
  42. $(OPENSSL_OPTIONS) \
  43. );
  44. do-build:
  45. $(MAKE) -C $(WRKBUILD) \
  46. MAKEDEPPROG="$(TARGET_CC)" \
  47. OPTIMIZATION_FLAGS="$(TARGET_CFLAGS) -fPIC" \
  48. depend
  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: ${SUB_INSTALLS-m} ${SUB_INSTALLS-y}
  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. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/usr/bin
  60. ${CP} ${WRKINST}/usr/bin/openssl ${IDIR_OPENSSL_UTIL}/usr/bin
  61. ${INSTALL_DIR} ${IDIR_OPENSSL_UTIL}/etc/ssl/{,certs,private}
  62. ${CP} ${WRKSRC}/apps/openssl.cnf ${IDIR_OPENSSL_UTIL}/etc/ssl/
  63. chmod 0700 ${IDIR_OPENSSL_UTIL}/etc/ssl/private
  64. libopenssl-dev-install:
  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