mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
openssh: add recipe for version 7.4p1.
This commit is contained in:
162
net-misc/openssh/openssh-7.4p1.recipe
Normal file
162
net-misc/openssh/openssh-7.4p1.recipe
Normal file
@@ -0,0 +1,162 @@
|
||||
SUMMARY="Secure Shell client and server (remote login program)"
|
||||
DESCRIPTION="OpenSSH is a free version of the SSH connectivity tools that \
|
||||
technical users of the Internet rely on. Users of telnet, rlogin, and ftp may \
|
||||
not realize that their password is transmitted across the Internet \
|
||||
unencrypted, but it is.
|
||||
|
||||
OpenSSH encrypts all traffic (including passwords) to effectively eliminate \
|
||||
eavesdropping, connection hijacking, and other attacks. Additionally, OpenSSH \
|
||||
provides secure tunneling capabilities and several authentication methods, and \
|
||||
supports all SSH protocol versions.
|
||||
|
||||
The OpenSSH suite replaces rlogin and telnet with the ssh program, rcp with \
|
||||
scp, and ftp with sftp. Also included is sshd (the server side of the \
|
||||
package), and the other utilities like ssh-add, ssh-agent, ssh-keysign, \
|
||||
ssh-keyscan, ssh-keygen and sftp-server."
|
||||
HOMEPAGE="http://www.openssh.com/"
|
||||
COPYRIGHT="2005-2016 Tatu Ylonen et al."
|
||||
LICENSE="OpenSSH"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://ftp.fr.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="1b1fc4a14e2024293181924ed24872e6f2e06293f3e8926a376b8aec481f19d1"
|
||||
PATCHES="sshd_config.patch
|
||||
pathnames.patch
|
||||
bzero.patch"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
|
||||
ADDITIONAL_FILES="
|
||||
sshd_keymaker.sh
|
||||
fix_openssh_config_paths.sh
|
||||
"
|
||||
|
||||
PROVIDES="
|
||||
openssh = $portVersion compat >= 5
|
||||
cmd:scp = $portVersion compat >= 5
|
||||
cmd:sftp = $portVersion compat >= 5
|
||||
cmd:sftp_server = $portVersion compat >= 5
|
||||
cmd:ssh = $portVersion compat >= 5
|
||||
cmd:ssh_add = $portVersion compat >= 5
|
||||
cmd:ssh_agent = $portVersion compat >= 5
|
||||
cmd:ssh_keygen = $portVersion compat >= 5
|
||||
cmd:ssh_keyscan = $portVersion compat >= 5
|
||||
cmd:ssh_keysign = $portVersion compat >= 5
|
||||
cmd:ssh_pkcs11_helper = $portVersion compat >= 5
|
||||
cmd:sshd = $portVersion compat >= 5
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:grep
|
||||
cmd:login
|
||||
cmd:passwd
|
||||
cmd:sed
|
||||
lib:libcrypto
|
||||
lib:libedit
|
||||
lib:libncurses
|
||||
lib:libssl
|
||||
lib:libz
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:libcrypto
|
||||
devel:libedit
|
||||
devel:libncurses
|
||||
devel:libssl
|
||||
devel:libz
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:libtoolize
|
||||
cmd:make
|
||||
cmd:pkg_config
|
||||
"
|
||||
|
||||
GLOBAL_WRITABLE_FILES="
|
||||
settings/ssh directory keep-old
|
||||
settings/ssh/ssh_config keep-old
|
||||
settings/ssh/sshd_config keep-old
|
||||
"
|
||||
USER_SETTINGS_FILES="
|
||||
settings/ssh directory
|
||||
settings/ssh/ssh_config template data/openssh/ssh_config.default
|
||||
settings/ssh/sshd_config template data/openssh/sshd_config.default
|
||||
"
|
||||
POST_INSTALL_SCRIPTS="
|
||||
$relativePostInstallDir/sshd_keymaker.sh
|
||||
$relativePostInstallDir/fix_openssh_config_paths.sh
|
||||
"
|
||||
sshdUserHomeDir="/packages/$portVersionedName-$REVISION/.self/$relativeDataDir/openssh/empty"
|
||||
PACKAGE_USERS="
|
||||
sshd real-name \"sshd user\" home \"$sshdUserHomeDir\" shell \"/bin/true\"
|
||||
"
|
||||
PACKAGE_GROUPS="sshd"
|
||||
|
||||
PATCH()
|
||||
{
|
||||
echo 'AC_CONFIG_MACRO_DIR([m4])' >> configure.ac
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
mkdir -p m4
|
||||
aclocal --install -I m4
|
||||
libtoolize --force --copy
|
||||
aclocal -I m4
|
||||
autoconf
|
||||
defaultPath=".:/boot/home/config/non-packaged/bin:/boot/home/config/bin"
|
||||
defaultPath+=":/boot/system/non-packaged/bin:/boot/system/bin:/bin"
|
||||
defaultPath+=":/boot/system/apps:/boot/system/preferences"
|
||||
|
||||
# Note: override sysconfdir and libexecdir since ssh doesn't create
|
||||
# subdirectories as it should.
|
||||
PATH_PASSWD_PROG=$portPackageLinksDir/cmd~passwd/bin/passwd \
|
||||
LOGIN_PROGRAM=$portPackageLinksDir/cmd~login/bin/login \
|
||||
runConfigure ./configure \
|
||||
--sysconfdir=$sysconfDir/ssh \
|
||||
--libexecdir=$libExecDir/openssh \
|
||||
--with-privsep-path=$dataDir/openssh/empty \
|
||||
--with-pid-dir=$prefix/var/run \
|
||||
--with-default-path="$defaultPath" \
|
||||
--with-md5-passwords \
|
||||
--disable-utmpx \
|
||||
--with-libedit \
|
||||
--without-zlib-version-check \
|
||||
--without-stackprotect
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install-nokeys
|
||||
mkdir -p $postInstallDir
|
||||
cp -f $portDir/additional-files/sshd_keymaker.sh $postInstallDir
|
||||
cp -f $portDir/additional-files/fix_openssh_config_paths.sh $postInstallDir
|
||||
|
||||
local USER_SETTINGS_DIR="`finddir B_USER_SETTINGS_DIRECTORY`"
|
||||
sed -i \
|
||||
-e "s| ~/\.ssh/| $USER_SETTINGS_DIR/ssh/|" \
|
||||
$sysconfDir/ssh/ssh_config
|
||||
|
||||
local SYSTEM_SETTINGS_DIR="`finddir B_SYSTEM_SETTINGS_DIRECTORY`"
|
||||
local VAR_DIR="`finddir B_SYSTEM_VAR_DIRECTORY`"
|
||||
local LIB_DIR="`finddir B_SYSTEM_LIB_DIRECTORY`"
|
||||
sed -i \
|
||||
-e "s|$sysconfDir/ssh/|$SYSTEM_SETTINGS_DIR/ssh/|" \
|
||||
-e "s|$prefix/var/run/|$VAR_DIR/run/|" \
|
||||
-e "s|$libExecDir/openssh/|$LIB_DIR/openssh/|" \
|
||||
$sysconfDir/ssh/sshd_config
|
||||
|
||||
mkdir -p $dataDir/openssh
|
||||
cp $sysconfDir/ssh/ssh_config $dataDir/openssh/ssh_config.default
|
||||
cp $sysconfDir/ssh/sshd_config $dataDir/openssh/sshd_config.default
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make tests
|
||||
}
|
||||
Reference in New Issue
Block a user