Files
haikuports/dev-libs/softhsm/softhsm2-2.3.0.recipe
2018-01-16 12:18:56 +00:00

100 lines
2.7 KiB
Bash

SUMMARY="An implementation of a cryptographic store"
DESCRIPTION="SoftHSM is an implementation of a cryptographic store accessible \
through a PKCS #11 interface. You can use it to explore PKCS #11 without \
having a Hardware Security Module. It is being developed as a part of the \
OpenDNSSEC project. SoftHSM uses Botan for its cryptographic operations."
HOMEPAGE="https://www.opendnssec.org/softhsm/"
COPYRIGHT="2010 .SE, The Internet Infrastructure Foundation
2010 SURFnet bv"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://dist.opendnssec.org/source/softhsm-$portVersion.tar.gz"
CHECKSUM_SHA256="5ed604c89a3a6ef9d7d1ee92c28a2c4b3cd1f86f302c808e2d12c8f39aa2c127"
SOURCE_DIR="softhsm-$portVersion"
PATCHES="softhsm-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
commandBinDir=$binDir
commandSuffix=$secondaryArchSuffix
if [ "$targetArchitecture" = x86_gcc2 ]
then
commandBinDir=$prefix/bin
commandSuffix=
fi
majorVersion="${portVersion%%.*}"
PROVIDES="
softhsm$majorVersion$secondaryArchSuffix = $portVersion
cmd:softhsm${majorVersion}_dump_file$commandSuffix = $portVersion
cmd:softhsm${majorVersion}_keyconv$commandSuffix = $portVersion
cmd:softhsm${majorVersion}_util$commandSuffix = $portVersion
lib:libsofthsm$majorVersion$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:botan$commandSuffix
# lib:libbotan_2$secondaryArchSuffix
lib:libssl$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbotan_2$secondaryArchSuffix
devel:libssl$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:diff
cmd:find
cmd:g++$secondaryArchSuffix
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:makeinfo
cmd:pkg_config$secondaryArchSuffix
"
USER_SETTINGS_FILES="
settings/softhsm${majorVersion}.conf template data/softhsm/softhsm${majorVersion}.conf.sample
"
GLOBAL_WRITABLE_FILES="
settings/softhsm${majorVersion}.conf keep-old
var/lib/softhsm directory keep-old
"
defineDebugInfoPackage softhsm${majorVersion}$secondaryArchSuffix \
$commandBinDir/softhsm${majorVersion}-dump-file \
$commandBinDir/softhsm${majorVersion}-keyconv \
$commandBinDir/softhsm${majorVersion}-util \
$libDir/softhsm/libsofthsm${majorVersion}.so
BUILD()
{
runConfigure --omit-dirs binDir ./configure --bindir=$commandBinDir
make $jobArgs
}
INSTALL()
{
make install
sed -i -e "/^directories\.tokendir/ \
s|$prefix/|`finddir B_SYSTEM_DIRECTORY`/|;" \
$settingsDir/softhsm${majorVersion}.conf \
$settingsDir/softhsm${majorVersion}.conf.sample
rm -f $libDir/softhsm/*.la
mkdir -p $dataDir/softhsm
mv $settingsDir/softhsm${majorVersion}.conf.sample $dataDir/softhsm
}
TEST()
{
make check
}