sys-auth/oath_toolkit: new recipe for version 2.6.11 (#13217)

* sys-auth/oath_toolkit: new recipe for version 2.6.11

OATH Toolkit provides components for one-time password authentication,
including the oathtool command-line utility for HOTP and TOTP algorithms
as defined in RFC 4226 and RFC 6238.

* oath_toolkit: use --disable-static instead of removing .a file

* Apply suggestion from @jmairboeck

Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>

---------

Co-authored-by: Schrijvers Luc <begasus@gmail.com>
Co-authored-by: Joachim Mairböck <j.mairboeck@gmail.com>
This commit is contained in:
solresol
2025-12-01 22:14:03 +11:00
committed by GitHub
parent e2f9df280a
commit bae1e3e5c7

View File

@@ -0,0 +1,86 @@
SUMMARY="Toolkit for HOTP/TOTP one-time password authentication"
DESCRIPTION="OATH Toolkit provides components to build one-time password \
authentication systems. It contains shared C libraries, command line tools \
and a PAM module. Supported technologies include the event-based HOTP \
algorithm (RFC 4226), the time-based TOTP algorithm (RFC 6238), and \
Portable Symmetric Key Container (PSKC, RFC 6030) to manage secret key data."
HOMEPAGE="https://www.nongnu.org/oath-toolkit/"
COPYRIGHT="2009-2024 Simon Josefsson"
LICENSE="GNU GPL v3
GNU LGPL v2.1"
REVISION="1"
SOURCE_URI="https://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-$portVersion.tar.gz"
CHECKSUM_SHA256="fc512a4a5b46f4c43ab0586c3189fece4d54f7e649397d6fa1e23428431e2cb4"
SOURCE_DIR="oath-toolkit-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi
libVersion="0.1.3"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
oath_toolkit$secondaryArchSuffix = $portVersion
cmd:oathtool$commandSuffix = $portVersion
lib:liboath$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
oath_toolkit${secondaryArchSuffix}_devel = $portVersion
devel:liboath$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
oath_toolkit$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:awk
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
defineDebugInfoPackage oath_toolkit$secondaryArchSuffix \
"$commandBinDir"/oathtool \
"$libDir"/liboath.so.$libVersion
BUILD()
{
runConfigure --omit-dirs binDir ./configure \
--bindir=$commandBinDir \
--disable-pam \
--disable-pskc \
--disable-static
make $jobArgs
}
INSTALL()
{
make install
rm -f "$libDir"/liboath.la
prepareInstalledDevelLib liboath
fixPkgconfig
packageEntries devel \
"$developDir"
}
TEST()
{
make check
}