SUMMARY="A commandline-tool to manage SSH and GPG agents"
DESCRIPTION="Keychain helps you to manage SSH and GPG keys in a convenient \
and secure manner. It acts as a frontend to ssh-agent and ssh-add, but allows \
you to easily have one long running ssh-agent process per system, rather than \
the norm of one ssh-agent per login session."
HOMEPAGE="https://www.funtoo.org/Keychain"
COPYRIGHT="2002-2006 Gentoo Foundation
   2007 Aron Griffis
   2009-2017 Funtoo Solutions, Inc
   lockfile() 2009 Parallels, Inc."
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://github.com/funtoo/keychain/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="dcce703e5001211c8ebc0528f45b523f84d2bceeb240600795b4d80cb8475a0b"
PATCHES="keychain-$portVersion.patchset"
ADDITIONAL_FILES="keychain.sh"

ARCHITECTURES="any"

PROVIDES="
	keychain = $portVersion
	cmd:keychain = $portVersion
	"

REQUIRES="
	haiku
	cmd:sh
	cmd:ssh_agent
	cmd:ssh_add
	"

BUILD_REQUIRES="
	cmd:sh
	cmd:gzip
	"

INSTALL()
{
	mkdir -p $binDir
	cp -af keychain $binDir

	mkdir -p $manDir/man1
	gzip -9 keychain.1
	cp -af keychain.1.gz $manDir/man1

	mkdir -p $dataDir/profile.d
	cp -af $portDir/additional-files/keychain.sh $dataDir/profile.d
}
