PKGBUILDs/core/openssl-cryptodev/PKGBUILD

91 lines
2.6 KiB
Bash
Raw Normal View History

# $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
buildarch=6
pkgname=openssl-cryptodev
_pkgname=openssl
2017-04-28 02:07:57 +00:00
_ver=1.1.0e
# use a pacman compatible version scheme
pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
2012-04-19 14:31:02 +00:00
#pkgver=$_ver
2017-04-28 02:07:57 +00:00
pkgrel=1
pkgdesc='The Open Source toolkit for Secure Sockets Layer and Transport Layer Security'
arch=('arm' 'armv7h')
url='https://www.openssl.org'
license=('custom:BSD')
depends=('perl')
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"
2017-04-28 02:07:57 +00:00
"https://www.openssl.org/source/${_pkgname}-${_ver}.tar.gz.asc"
'ca-dir.patch'
2017-04-28 02:07:57 +00:00
"https://github.com/cryptodev-linux/cryptodev-linux/archive/cryptodev-linux-${_cryptodevver}.tar.gz")
md5sums=('51c42d152122e474754aea96f66928c6'
'SKIP'
'02b53865fb70faef763e262b4971aa4b'
'e5aacd2293cea9c94f71ca2e0b4dea57')
2015-01-25 20:04:52 +00:00
validpgpkeys=('8657ABB260F056B1E5190839D9C4D26D0E604491')
2013-10-23 14:09:06 +00:00
prepare() {
2017-04-28 02:07:57 +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
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
}
build() {
2017-04-28 02:07:57 +00:00
cd $srcdir/$_pkgname-$_ver
if [ "${CARCH}" == 'x86_64' ]; then
openssltarget='linux-x86_64'
2017-04-28 02:07:57 +00:00
optflags='enable-ec_nistp_64_gcc_128'
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
openssltarget='linux-armv4'
2017-04-28 02:07:57 +00:00
optflags=''
elif [ "${CARCH}" == 'aarch64' ]; then
openssltarget='linux-aarch64'
optflags='no-afalgeng'
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 \
-DHAVE_CRYPTODEV -DHASH_MAX_LEN=64 \
2017-04-28 02:07:57 +00:00
shared no-ssl3-method ${optflags} \
"${openssltarget}" \
2014-07-05 07:26:46 +00:00
"-Wa,--noexecstack ${CPPFLAGS} ${CFLAGS} ${LDFLAGS}"
make depend
make
}
check() {
cd $srcdir/$_pkgname-$_ver
# the test fails due to missing write permissions in /etc/ssl
# revert this patch for make test
patch -p0 -R -i $srcdir/ca-dir.patch
2014-07-05 07:26:46 +00:00
make test
patch -p0 -i $srcdir/ca-dir.patch
}
package() {
2017-04-28 02:07:57 +00:00
cd $srcdir/$_pkgname-$_ver
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
}