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 \
23 export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
25 CFLAGS_prepend = "-I${S} "
26 CFLAGS_append = " -D__FILE_OFFSET_BITS=64"
27 LDFLAGS_prepend = "-L${S} -L${S}/openbsd-compat "
28 EXTRA_OECONF = "--disable-suid-ssh --with-ssl=${STAGING_LIBDIR}/ssl \
29 --with-rand-helper=no --without-pam \
30 --without-zlib-version-check \
31 --with-privsep-path=/var/run/sshd \
32 --sysconfdir=${sysconfdir}/ssh"
34 EXTRA_OEMAKE = "'STRIP_OPT='"
36 do_configure_prepend () {
37 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
38 cp aclocal.m4 acinclude.m4
42 do_compile_append () {
43 install -m 0644 ${WORKDIR}/sshd_config ${S}/
47 install -d ${D}${sysconfdir}/init.d
48 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
49 mv ${D}${bindir}/scp ${D}${bindir}/scp.openssh
50 mv ${D}${bindir}/ssh ${D}${bindir}/ssh.openssh
53 PACKAGES =+ " openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc"
54 FILES_openssh-scp = "${bindir}/scp.${PN}"
55 FILES_openssh-ssh = "${bindir}/ssh.${PN} ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
56 FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd ${bindir}/ssh-keygen"
57 FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config /var/run/sshd"
58 FILES_openssh-sftp = "${bindir}/sftp ${libdir}exec/sftp-server"
59 FILES_openssh-misc = "${bindir} ${libdir}exec/"
60 RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd"
61 DEPENDS_openssh-sshd += " update-rc.d"
62 RDEPENDS_openssh-sshd += " update-rc.d"
64 pkg_postinst_openssh-sshd() {
65 if test "x$D" != "x"; then
69 adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
70 update-rc.d sshd defaults 9
74 pkg_postinst_openssh-scp() {
75 update-alternatives --install ${bindir}/scp scp scp.${PN} 90
78 pkg_postinst_openssh-ssh() {
79 update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
82 pkg_postrm_openssh-ssh() {
83 update-alternatives --remove ${bindir}/ssh ssh.${PN}
86 pkg_postrm_openssh-scp() {
87 update-alternatives --remove ${bindir}/scp scp.${PN}
90 pkg_postrm_openssh-sshd() {
91 if test "x$D" != "x"; then
94 ${sysconfdir}/init.d/sshd stop
97 update-rc.d -f sshd remove
101 CONFFILES_openssh-sshd_nylon = "${sysconfdir}/ssh/sshd_config"
102 CONFFILES_openssh-ssh_nylon = "${sysconfdir}/ssh/ssh_config"