2012-02-28 21:05:38 +00:00
|
|
|
# $Id$
|
|
|
|
# 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
|
|
|
|
2012-11-12 18:26:11 +00:00
|
|
|
buildarch=6
|
2012-02-28 21:05:38 +00:00
|
|
|
|
|
|
|
pkgname=openssl-cryptodev
|
|
|
|
_pkgname=openssl
|
2018-04-07 00:07:36 +00:00
|
|
|
_ver=1.1.0h
|
2012-02-28 21:05:38 +00:00
|
|
|
# use a pacman compatible version scheme
|
|
|
|
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
|
2012-04-19 14:31:02 +00:00
|
|
|
#pkgver=$_ver
|
2018-04-07 00:07:36 +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'
|
2012-11-12 18:26:11 +00:00
|
|
|
arch=('arm' 'armv7h')
|
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}")
|
|
|
|
_cryptodevver=1.9
|
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")
|
2018-04-07 00:07:36 +00:00
|
|
|
md5sums=('5271477e4d93f4ea032b665ef095ff24'
|
2017-04-28 02:07:57 +00:00
|
|
|
'02b53865fb70faef763e262b4971aa4b'
|
|
|
|
'e5aacd2293cea9c94f71ca2e0b4dea57')
|
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 \
|
2015-06-10 02:32:39 +00:00
|
|
|
-DHAVE_CRYPTODEV -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"
|
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
|
|
|
}
|