diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-10-23 15:03:28 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-10-23 15:25:37 +0000 |
commit | 9baff37cf70ea9e97da84ee105ceccfd73df3c8c (patch) | |
tree | 08d06c2ca69531feda0861f0fab682a763e9f1ee /testing | |
parent | 38631c582795887b6305924143b52e930ba0fd58 (diff) | |
download | aports-9baff37cf70ea9e97da84ee105ceccfd73df3c8c.tar.bz2 aports-9baff37cf70ea9e97da84ee105ceccfd73df3c8c.tar.xz |
testing/openssl: add openssl 1.1 for testing
Diffstat (limited to 'testing')
-rw-r--r-- | testing/openssl/APKBUILD | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/testing/openssl/APKBUILD b/testing/openssl/APKBUILD new file mode 100644 index 0000000000..dfbadc1541 --- /dev/null +++ b/testing/openssl/APKBUILD @@ -0,0 +1,86 @@ +# Maintainer: Timo Teras <timo.teras@iki.fi> +pkgname=openssl +pkgver=1.1.1 +_abiver=${pkgver%.*} +pkgrel=0 +pkgdesc="Toolkit for SSL v2/v3 and TLS v1" +url="https://www.openssl.org" +arch="all" +license="OpenSSL" +depends_dev="zlib-dev" +makedepends_build="perl" +makedepends_host="zlib-dev linux-headers" +makedepends="$makedepends_host $makedepends_build" +subpackages="$pkgname-dbg $pkgname-dev $pkgname-doc libcrypto$_abiver:libcrypto libssl$_abiver:libssl" +source="http://www.openssl.org/source/$pkgname-$pkgver.tar.gz + " +builddir="$srcdir/$pkgname-$pkgver" + +build() { + local _target _optflags + cd "$builddir" + + # openssl will prepend crosscompile always core CC et al + CC=${CC#${CROSS_COMPILE}} + CXX=${CXX#${CROSS_COMPILE}} + CPP=${CPP#${CROSS_COMPILE}} + + # determine target OS for openssl + case "$CARCH" in + aarch64*) _target="linux-aarch64" ;; + arm*) _target="linux-armv4" ;; + ppc64le) _target="linux-ppc64le" ;; + x86) _target="linux-elf" ;; + x86_64) _target="linux-x86_64"; _optflags="enable-ec_nistp_64_gcc_128" ;; + s390x) _target="linux64-s390x";; + *) msg "Unable to determine architecture from (CARCH=$CARCH)" ; return 1 ;; + esac + + # Configure assumes --options are for it, so can't use + # gcc's --sysroot fake this by overriding CC + [ -n "$CBUILDROOT" ] && CC="$CC --sysroot=${CBUILDROOT}" + + perl ./Configure $_target --prefix=/usr \ + --libdir=lib \ + --openssldir=/etc/ssl \ + shared zlib enable-md2 $_optflags \ + -DOPENSSL_NO_BUF_FREELISTS \ + $CPPFLAGS $CFLAGS $LDFLAGS -Wa,--noexecstack \ + no-async no-mdc2 no-ec2m no-sm2 no-sm4 no-ssl2 no-weak-ssl-ciphers + make +} + +check() { + cd "$builddir" + make test +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install + # remove the script c_rehash + rm "$pkgdir"/usr/bin/c_rehash +} + +libcrypto() { + pkgdesc="Crypto library from openssl" + + mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib + for i in "$pkgdir"/usr/lib/libcrypto*; do + mv $i "$subpkgdir"/lib/ + ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} + done + mv "$pkgdir"/usr/lib/engines* "$subpkgdir"/usr/lib/ +} + +libssl() { + pkgdesc="SSL shared libraries" + + mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib + for i in "$pkgdir"/usr/lib/libssl*; do + mv $i "$subpkgdir"/lib/ + ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} + done +} + +sha512sums="c0284a4fe84bdf765ca5bc5148da4441ffc36392cfecaf9d372af00cf93b6de5681cab1248b6f8246474532155dc205da5ad49549ad7c61c07c917145e7c9c71 openssl-1.1.1.tar.gz" |