Update openssl to 1.0.2l.

Change openssl.rb to strip binary and libraries and prepare to install man correctly.
Also add check method to check the correctness.
parent a33a99c3
......@@ -3,13 +3,13 @@ require 'package'
class Openssl < Package
description 'OpenSSL is an open source project that provides a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols.'
homepage 'https://www.openssl.org/'
version '1.0.2k'
version '1.0.2l'
source_url 'ftp://openssl.org/source/openssl-1.0.2k.tar.gz'
source_sha1 '5f26a624479c51847ebd2f22bb9f84b3b44dcb44'
source_url 'https://github.com/openssl/openssl/archive/OpenSSL_1_0_2l.tar.gz'
source_sha1 '5bea0957b371627e8ebbee5bef221519e94d547c'
depends_on 'perl'
depends_on 'zlibpkg'
depends_on 'perl' => :build
depends_on 'zlibpkg' => :build
def self.build
options="shared zlib-dynamic"
......@@ -18,14 +18,23 @@ class Openssl < Package
end
system "./config --prefix=/usr/local --openssldir=/etc/ssl #{options}"
system "make"
system "find . -name '*.so' -print | xargs strip -S"
system "find . -name '*.so.*' -print | xargs strip -S"
end
def self.install
# installing using multi cores may cause empty libssl.so.1.0.0 or libcrypto.so.1.0.0 problem
system "make", "-j1", "INSTALL_PREFIX=#{CREW_DEST_DIR}", "install"
system "make", "INSTALL_PREFIX=#{CREW_DEST_DIR}", "install"
system "strip", "#{CREW_DEST_DIR}/usr/local/bin/openssl"
system "find #{CREW_DEST_DIR}/usr/local -name 'lib*.a' -print | xargs rm"
# move man to /usr/local/man
system "mv", "#{CREW_DEST_DIR}/etc/ssl/man", "#{CREW_DEST_DIR}/usr/local/man"
# remove all files pretended to install /etc/ssl (use system's /etc/ssl as is)
system "rm", "-rf", "#{CREW_DEST_DIR}/etc"
end
def self.check
system "make", "test"
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment