distribution/packages/network/openssh/package.mk

59 lines
2 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
PKG_NAME="openssh"
PKG_VERSION="9.5p1"
2022-02-05 14:23:32 +00:00
PKG_LICENSE="OSS"
PKG_SITE="https://www.openssh.com/"
PKG_URL="https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/${PKG_NAME}-${PKG_VERSION}.tar.gz"
2022-02-05 14:23:32 +00:00
PKG_DEPENDS_TARGET="toolchain openssl zlib"
PKG_LONGDESC="An open re-implementation of the SSH package."
PKG_TOOLCHAIN="autotools"
PKG_BUILD_FLAGS="+lto"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_header_rpc_types_h=no \
--sysconfdir=/etc/ssh \
--libexecdir=/usr/lib/openssh \
--disable-strip \
--disable-lastlog \
--with-sandbox=no \
--disable-utmp \
--disable-utmpx \
--disable-wtmp \
--disable-wtmpx \
--without-rpath \
--with-ssl-engine \
--with-privsep-user=nobody \
--disable-pututline \
--disable-pututxline \
--disable-etc-default-login \
--with-keydir=/storage/.cache/ssh \
--without-pam"
pre_configure_target() {
2023-02-24 13:53:43 +00:00
export LD="${CC}"
export LDFLAGS="${TARGET_CFLAGS} ${TARGET_LDFLAGS}"
2022-02-05 14:23:32 +00:00
}
post_makeinstall_target() {
2023-02-24 13:53:43 +00:00
rm -rf ${INSTALL}/usr/lib/openssh/ssh-keysign
rm -rf ${INSTALL}/usr/lib/openssh/ssh-pkcs11-helper
if [ ! ${SFTP_SERVER} = "yes" ]; then
2023-02-24 13:53:43 +00:00
rm -rf ${INSTALL}/usr/lib/openssh/sftp-server
2022-02-05 14:23:32 +00:00
fi
2023-02-24 13:53:43 +00:00
rm -rf ${INSTALL}/usr/bin/ssh-add
rm -rf ${INSTALL}/usr/bin/ssh-agent
rm -rf ${INSTALL}/usr/bin/ssh-keyscan
2022-02-05 14:23:32 +00:00
sed -e "s|^#PermitRootLogin.*|PermitRootLogin yes|g" \
-e "s|^#StrictModes.*|StrictModes no|g" \
2023-02-24 13:53:43 +00:00
-i ${INSTALL}/etc/ssh/sshd_config
2022-02-05 14:23:32 +00:00
2023-02-24 13:53:43 +00:00
debug_strip ${INSTALL}/usr
2022-02-05 14:23:32 +00:00
}
post_install() {
enable_service sshd.service
}