2012-02-28 21:05:38 +00:00
|
|
|
# Maintainer: Pierre Schmitz <pierre@archlinux.de>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2017-04-28 02:07:57 +00:00
|
|
|
# - set ARM architecture targets
|
|
|
|
# Oleg Rakhmanov <oleg@archlinuxarm.org>
|
|
|
|
# - cryptodev enabled version
|
2013-12-16 21:01:27 +00:00
|
|
|
|
2020-06-13 04:16:59 +00:00
|
|
|
buildarch=14
|
2012-02-28 21:05:38 +00:00
|
|
|
|
|
|
|
pkgname=openssl-cryptodev
|
|
|
|
_pkgname=openssl
|
2020-06-13 04:16:59 +00:00
|
|
|
_ver=1.1.1g
|
2012-02-28 21:05:38 +00:00
|
|
|
# use a pacman compatible version scheme
|
|
|
|
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
|
2020-06-13 04:16:59 +00:00
|
|
|
pkgrel=1
|
2012-02-28 21:05:38 +00:00
|
|
|
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
|
2020-06-13 04:16:59 +00:00
|
|
|
arch=('arm' 'armv7h' 'aarch64')
|
2012-02-28 21:05:38 +00:00
|
|
|
url='https://www.openssl.org'
|
|
|
|
license=('custom:BSD')
|
2014-04-05 16:26:56 +00:00
|
|
|
depends=('perl')
|
2012-02-28 21:05:38 +00:00
|
|
|
optdepends=('ca-certificates')
|
|
|
|
backup=('etc/ssl/openssl.cnf')
|
2017-04-28 02:07:57 +00:00
|
|
|
conflicts=('openssl')
|
|
|
|
provides=("openssl=${pkgver}")
|
2019-03-09 23:37:31 +00:00
|
|
|
_cryptodevver=1.10
|
2015-01-25 20:04:52 +00:00
|
|
|
|
2012-04-19 18:35:55 +00:00
|
|
|
source=("https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz"
|
2013-12-16 08:15:32 +00:00
|
|
|
'ca-dir.patch'
|
2017-04-28 02:07:57 +00:00
|
|
|
"https://github.com/cryptodev-linux/cryptodev-linux/archive/cryptodev-linux-${_cryptodevver}.tar.gz")
|
2020-06-13 04:16:59 +00:00
|
|
|
sha256sums=('ddb04774f1e32f0c49751e21b67216ac87852ceb056b75209af2443400636d46'
|
2018-12-03 19:22:32 +00:00
|
|
|
'0938c8d68110768db4f350a7ec641070686904f2fe7ba630ac94399d7dc8cc5e'
|
2019-03-09 23:37:31 +00:00
|
|
|
'833ab7c5c88d2b700a7c702a151254c089a3058886a63cc7d12630e364b8ea83')
|
2013-10-23 14:09:06 +00:00
|
|
|
|
|
|
|
prepare() {
|
2017-09-21 01:56:49 +00:00
|
|
|
cd "$srcdir/$_pkgname-$_ver"
|
2013-12-16 10:28:41 +00:00
|
|
|
|
2017-04-28 02:07:57 +00:00
|
|
|
# set ca dir to /etc/ssl by default
|
2017-09-21 01:56:49 +00:00
|
|
|
patch -p0 -i "$srcdir/ca-dir.patch"
|
2013-12-16 10:28:41 +00:00
|
|
|
|
2017-04-28 02:07:57 +00:00
|
|
|
# Copy the header file
|
|
|
|
cp -u ${srcdir}/cryptodev-linux-cryptodev-linux-${_cryptodevver}/crypto/cryptodev.h ${srcdir}/openssl-${_ver}/crypto/
|
2013-10-23 14:09:06 +00:00
|
|
|
}
|
2012-02-28 21:05:38 +00:00
|
|
|
|
|
|
|
build() {
|
2017-09-21 01:56:49 +00:00
|
|
|
cd "$srcdir/$_pkgname-$_ver"
|
2014-04-05 16:26:56 +00:00
|
|
|
|
|
|
|
if [ "${CARCH}" == 'x86_64' ]; then
|
|
|
|
openssltarget='linux-x86_64'
|
2017-04-28 02:07:57 +00:00
|
|
|
optflags='enable-ec_nistp_64_gcc_128'
|
2014-04-05 16:26:56 +00:00
|
|
|
elif [ "${CARCH}" == 'i686' ]; then
|
|
|
|
openssltarget='linux-elf'
|
2017-04-28 02:07:57 +00:00
|
|
|
optflags=''
|
|
|
|
elif [ "${CARCH}" == 'arm' -o "${CARCH}" == 'armv6h' -o "${CARCH}" == 'armv7h' ]; then
|
2014-04-05 16:26:56 +00:00
|
|
|
openssltarget='linux-armv4'
|
2017-04-28 02:07:57 +00:00
|
|
|
optflags=''
|
|
|
|
elif [ "${CARCH}" == 'aarch64' ]; then
|
|
|
|
openssltarget='linux-aarch64'
|
|
|
|
optflags='no-afalgeng'
|
2014-04-05 16:26:56 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# mark stack as non-executable: http://bugs.archlinux.org/task/12434
|
2017-04-28 02:07:57 +00:00
|
|
|
./Configure --prefix=/usr --openssldir=/etc/ssl --libdir=lib \
|
2019-02-12 14:41:55 +00:00
|
|
|
enable-devcryptoeng -DHASH_MAX_LEN=64 \
|
2017-04-28 02:07:57 +00:00
|
|
|
shared no-ssl3-method ${optflags} \
|
2014-04-05 16:26:56 +00:00
|
|
|
"${openssltarget}" \
|
2014-07-05 07:26:46 +00:00
|
|
|
"-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
|
2014-04-05 16:26:56 +00:00
|
|
|
|
|
|
|
make depend
|
|
|
|
make
|
2012-02-28 21:05:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2017-09-21 01:56:49 +00:00
|
|
|
cd "$srcdir/$_pkgname-$_ver"
|
2014-04-05 16:26:56 +00:00
|
|
|
# the test fails due to missing write permissions in /etc/ssl
|
|
|
|
# revert this patch for make test
|
2017-09-21 01:56:49 +00:00
|
|
|
patch -p0 -R -i "$srcdir/ca-dir.patch"
|
2014-07-05 07:26:46 +00:00
|
|
|
make test
|
2017-09-21 01:56:49 +00:00
|
|
|
patch -p0 -i "$srcdir/ca-dir.patch"
|
2020-06-13 04:16:59 +00:00
|
|
|
# re-run make to re-generate CA.pl from th patched .in file.
|
|
|
|
make apps/CA.pl
|
2012-02-28 21:05:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2017-09-21 01:56:49 +00:00
|
|
|
cd "$srcdir/$_pkgname-$_ver"
|
2017-04-28 02:07:57 +00:00
|
|
|
make DESTDIR=$pkgdir MANDIR=/usr/share/man MANSUFFIX=ssl install_sw install_ssldirs install_man_docs
|
|
|
|
install -D -m644 LICENSE $pkgdir/usr/share/licenses/$_pkgname/LICENSE
|
2012-02-28 21:05:38 +00:00
|
|
|
}
|