Files
haikuports/dev-libs/openssl/openssl11-1.1.0f.recipe
fbrosson 48adfbdd60 openssl: allow co-installation of 1.0.2 and 1.1.0. (#1793)
The changes detailed below allow to co-install the base
packages of 1.0.2 and 1.1.0 (as well as their debuginfo).
The _devel (or _man) packages cannot be co-installed.

* Define a debuginfo package for openssl11.
* Fix typo in call to defineDebugInfoPackage for openssl,
  which was producing an incorrect debuginfo on 2nd arch.
* Also add cmd:openssl{,-1.1} to their debuginfo packages.
* Move $docDir/html/man3 to openssl11_devel.
* Add a "-1.1" suffix to each cmd:{openssl,c_rehash} for
  openssl11 to allow the co-installation of 1.0.2 & 1.1.
* Create new _man sub-packages for openssl and openssl11 and
  move all man pages (other than the man3 section) there to
  avoid overlaps when the 2 base packages are installed.
* Add symetric (openssl vs openssl11) CONFLICTS for their
  _devel and _man sup-packages.
* openssl{,11}_man REQUIRES and SUPPLEMENTS openssl{,11}.

* Introduce 4 custom variables (after portVersion):
    portVersion  1.0.2*  1.1.0*
    libVersion   1.0.0   1.1
    cmdSuffix            -1.1
    mySuffix             11
    altSuffix    11
  These are used inside both recipes at the same places to make
  it easier to spot the real differences between 1.0.2 & 1.1.0.
2017-12-05 01:13:13 +01:00

160 lines
4.1 KiB
Bash

SUMMARY="Full-strength general purpose cryptography library (with SSL/TLS)"
DESCRIPTION="The OpenSSL Project is a collaborative effort to develop a \
robust, commercial-grade, full-featured, and Open Source toolkit implementing \
the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) \
protocols as well as a full-strength general purpose cryptography library. The \
project is managed by a worldwide community of volunteers that use the \
Internet to communicate, plan, and develop the OpenSSL toolkit and its related \
documentation.
OpenSSL is based on the excellent SSLeay library developed by Eric A. Young \
and Tim J. Hudson. The OpenSSL toolkit is licensed under an Apache-style \
licence, which basically means that you are free to get and use it for \
commercial and non-commercial purposes subject to some simple license \
conditions."
HOMEPAGE="https://www.openssl.org/"
COPYRIGHT="1995-1998 Eric Young
1998-2017 The OpenSSL Project."
LICENSE="OpenSSL"
REVISION="2"
SOURCE_URI="https://www.openssl.org/source/openssl-$portVersion.tar.gz"
CHECKSUM_SHA256="12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765"
SOURCE_DIR="openssl-$portVersion"
PATCHES="openssl-$portVersion.patchset"
ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64 ?arm ?ppc"
SECONDARY_ARCHITECTURES="?x86_gcc2 ?x86"
libVersion=1.1
cmdSuffix="-1.1"
mySuffix=11
altSuffix=
PROVIDES="
openssl$mySuffix$secondaryArchSuffix = $portVersion compat >= 1.1.0
lib:libcrypto$secondaryArchSuffix = $libVersion compat >= $libVersion
lib:libssl$secondaryArchSuffix = $libVersion compat >= $libVersion
"
if [ -z "$secondaryArchSuffix" ]; then
PROVIDES="$PROVIDES
cmd:c_rehash${cmdSuffix/-/_} = $portVersion compat >= 1
cmd:openssl${cmdSuffix/-/_} = $portVersion compat >= 1
"
fi
REQUIRES="
haiku$secondaryArchSuffix
lib:libz$secondaryArchSuffix >= 1.2.3
ca_root_certificates
"
if [ -z "$secondaryArchSuffix" ]; then
SUMMARY_man="Manual pages for openssl $portVersion"
ARCHITECTURES_man="any"
PROVIDES_man="
openssl${mySuffix}_man = $portVersion
"
REQUIRES_man="
openssl$mySuffix == $portVersion
"
SUPPLEMENTS_man="
openssl$mySuffix == $portVersion
"
CONFLICTS_man="
openssl${altSuffix}_man
"
fi
PROVIDES_devel="
openssl$mySuffix${secondaryArchSuffix}_devel = $portVersion
devel:libcrypto$secondaryArchSuffix = $libVersion compat >= $libVersion
devel:libssl$secondaryArchSuffix = $libVersion compat >= $libVersion
"
REQUIRES_devel="
openssl$mySuffix$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
openssl$altSuffix${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
devel:libz$secondaryArchSuffix >= 1.2.3
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:perl >= 5
cmd:sed
"
if [ -n "$secondaryArchSuffix" ]; then
maybe_binDir_runtimes=
else
maybe_binDir_runtimes="
$binDir/openssl$cmdSuffix \
"
fi
defineDebugInfoPackage openssl$mySuffix$secondaryArchSuffix \
$libDir/engines-1.1/capi.so \
$libDir/engines-1.1/padlock.so \
$libDir/libcrypto.so.$libVersion \
$libDir/libssl.so.$libVersion \
$maybe_binDir_runtimes
BUILD()
{
./config --prefix=$prefix --libdir=$relativeLibDir \
--openssldir=$dataRootDir/ssl \
zlib shared no-asm -g
make $jobArgs
}
INSTALL()
{
make MANDIR=$manDir DOCDIR=$docDir install
# move include dir to correct location
mkdir -p $(dirname $includeDir)
mv $prefix/include $includeDir
# prepare develop/lib
prepareInstalledDevelLibs libcrypto libssl
fixPkgconfig
if [ -n "$secondaryArchSuffix" ]; then
maybe_docDir_html_man3=
maybe_manDir_man3=
else
maybe_docDir_html_man3=$docDir/html/man3
maybe_manDir_man3=$manDir/man3
fi
# devel package
packageEntries devel \
$developDir \
$maybe_docDir_html_man3 \
$maybe_manDir_man3
# Remove stuff we don't need in the secondary architecture base package
if [ -n "$secondaryArchSuffix" ]; then
rm -rf $prefix/bin
rm -rf $dataRootDir/ssl
rm -rf $documentationDir
else
if [ -n "$cmdSuffix" ]; then
mv $binDir/openssl $binDir/openssl$cmdSuffix
mv $binDir/c_rehash $binDir/c_rehash$cmdSuffix
fi
# man package
packageEntries man \
$manDir
fi
}
TEST()
{
make test
}