Commit b0e8cf1a authored by lyxell's avatar lyxell Committed by GitHub

Merge pull request #714 from jam7/update/openssl

Update openssl to 1.0.2l and distribute with pre-built arm binaries
parents 78be5b61 e8773426
......@@ -3,13 +3,21 @@ 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'
binary_url ({
aarch64: 'https://github.com/jam7/chromebrew/releases/download/binaries/openssl-1.0.2l-chromeos-armv7l.tar.xz',
armv7l: 'https://github.com/jam7/chromebrew/releases/download/binaries/openssl-1.0.2l-chromeos-armv7l.tar.xz',
})
binary_sha1 ({
aarch64: '4c9eb37df898e9495a8f53e3aa7f6058063fa8ce',
armv7l: '4c9eb37df898e9495a8f53e3aa7f6058063fa8ce',
})
depends_on 'perl'
depends_on 'zlibpkg'
depends_on 'perl' => :build
depends_on 'zlibpkg' => :build
def self.build
options="shared zlib-dynamic"
......@@ -18,14 +26,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