1 DEPENDS = "zlib openssl"
2 SECTION = "console/network"
3 DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
4 Ssh (Secure Shell) is a program for logging into a remote machine \
5 and for executing commands on a remote machine. \
6 It provides secure encrypted communications between two untrusted \
7 hosts over an insecure network. X11 connections and arbitrary TCP/IP \
8 ports can also be forwarded over the secure channel. \
9 It is intended as a replacement for rlogin, rsh and rcp, and can be \
10 used to provide applications with a secure communication channel."
11 HOMEPAGE = "http://www.openssh.org/"
13 MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>"
16 SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
17 file://configure.patch;patch=1 \
18 file://scp-nossl.patch;patch=1 \
24 export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
26 CFLAGS_prepend = "-I${S} "
27 CFLAGS_append = " -D__FILE_OFFSET_BITS=64"
28 LDFLAGS_prepend = "-L${S} -L${S}/openbsd-compat "
29 EXTRA_OECONF = "--disable-suid-ssh --with-ssl=${STAGING_LIBDIR}/ssl \
30 --with-rand-helper=no --without-pam \
31 --without-zlib-version-check \
32 --with-privsep-path=/var/run/sshd \
33 --sysconfdir=${sysconfdir}/ssh"
35 EXTRA_OEMAKE = "'STRIP_OPT='"
37 do_configure_prepend () {
38 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
39 cp aclocal.m4 acinclude.m4
43 do_compile_append () {
44 install -m 0644 ${WORKDIR}/sshd_config ${S}/
48 install -d ${D}${sysconfdir}/init.d
49 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
52 PACKAGES =+ " openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc"
53 FILES_openssh-scp = "${bindir}/scp"
54 FILES_openssh-ssh = "${bindir}/ssh ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
55 FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd ${bindir}/ssh-keygen"
56 FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config /var/run/sshd"
57 FILES_openssh-sftp = "${bindir}/sftp ${libdir}exec/sftp-server"
58 FILES_openssh-misc = "${bindir} ${libdir}exec/"
59 RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd"
60 DEPENDS_openssh-sshd += " update-rc.d"
61 RDEPENDS_openssh-sshd += " update-rc.d"
63 pkg_postinst_openssh-sshd() {
64 if test "x$D" != "x"; then
68 adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
69 update-rc.d sshd defaults
73 pkg_postrm_openssh-sshd() {
74 if test "x$D" != "x"; then
77 ${sysconfdir}/init.d/sshd stop
80 update-rc.d -f sshd remove
84 CONFFILES_openssh-sshd = "${sysconfdir}/ssh/sshd_config"
85 CONFFILES_openssh-ssh = "${sysconfdir}/ssh/ssh_config"