summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh/openssh_5.8p2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_5.8p2.bb')
-rw-r--r--meta/recipes-connectivity/openssh/openssh_5.8p2.bb125
1 files changed, 125 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_5.8p2.bb b/meta/recipes-connectivity/openssh/openssh_5.8p2.bb
new file mode 100644
index 0000000000..04d99d97b0
--- /dev/null
+++ b/meta/recipes-connectivity/openssh/openssh_5.8p2.bb
@@ -0,0 +1,125 @@
1SUMMARY = "Secure rlogin/rsh/rcp/telnet replacement"
2DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
3Ssh (Secure Shell) is a program for logging into a remote machine \
4and for executing commands on a remote machine."
5HOMEPAGE = "http://openssh.org"
6SECTION = "console/network"
7PRIORITY = "optional"
8LICENSE = "BSD"
9LIC_FILES_CHKSUM = "file://LICENCE;md5=bae9a689be41581503bcf95d8fb42c4e"
10
11PR = "r0"
12
13DEPENDS = "zlib openssl"
14DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
15
16PROVIDES = "ssh sshd"
17RPROVIDES = "ssh sshd"
18
19CONFLICTS_${PN} = "dropbear"
20RCONFLICTS_${PN}-sshd = "dropbear"
21RCONFLICTS_${PN}-keygen = "ssh-keygen"
22
23SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
24 file://nostrip.patch \
25 file://sshd_config \
26 file://ssh_config \
27 file://init \
28 "
29SRC_URI[md5sum] = "0541579adf9d55abb15ef927048d372e"
30SRC_URI[sha256sum] = "5c35ec7c966ce05cc4497ac59c0b54a556e55ae7368165cc8c4129694654f314"
31
32inherit autotools
33
34# LFS support:
35CFLAGS += "-D__FILE_OFFSET_BITS=64"
36export LD = "${CC}"
37
38EXTRA_OECONF = "--with-rand-helper=no \
39 ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
40 --without-zlib-version-check \
41 --with-privsep-path=/var/run/sshd \
42 --sysconfdir=${sysconfdir}/ssh \
43 --with-xauth=/usr/bin/xauth"
44
45# This is a workaround for uclibc because including stdio.h
46# pulls in pthreads.h and causes conflicts in function prototypes.
47# This results in compilation failure, so unless this is fixed,
48# disable pam for uclibc.
49EXTRA_OECONF_append_libc-uclibc=" --without-pam"
50
51do_configure_prepend () {
52 if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
53 cp aclocal.m4 acinclude.m4
54 fi
55}
56
57do_compile_append () {
58 install -m 0644 ${WORKDIR}/sshd_config ${S}/
59 install -m 0644 ${WORKDIR}/ssh_config ${S}/
60}
61
62do_install_append () {
63 install -d ${D}${sysconfdir}/init.d
64 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
65 mv ${D}${bindir}/scp ${D}${bindir}/scp.${PN}
66 mv ${D}${bindir}/ssh ${D}${bindir}/ssh.${PN}
67 rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin
68 rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var
69}
70
71ALLOW_EMPTY_${PN} = "1"
72
73PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server"
74FILES_${PN}-scp = "${bindir}/scp.${PN}"
75FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config"
76FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd"
77FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config"
78FILES_${PN}-sftp = "${bindir}/sftp"
79FILES_${PN}-sftp-server = "${libexecdir}/sftp-server"
80FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
81FILES_${PN}-keygen = "${bindir}/ssh-keygen"
82
83RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen"
84DEPENDS_${PN}-sshd += "update-rc.d"
85RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen"
86
87pkg_postinst_${PN}-sshd () {
88 if [ "x$D" != "x" ]; then
89 exit 1
90 else
91 addgroup sshd
92 adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
93 update-rc.d sshd defaults 9
94 fi
95}
96
97pkg_postinst_${PN}-scp () {
98 update-alternatives --install ${bindir}/scp scp scp.${PN} 90
99}
100
101pkg_postinst_${PN}-ssh () {
102 update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90
103}
104
105pkg_postrm_${PN}-ssh () {
106 update-alternatives --remove ${bindir}/ssh ssh.${PN}
107}
108
109pkg_postrm_${PN}-scp () {
110 update-alternatives --remove ${bindir}/scp scp.${PN}
111}
112
113pkg_postrm_${PN}-sshd () {
114 if [ "x$D" != "x" ]; then
115 exit 1
116 else
117 ${sysconfdir}/init.d/sshd stop
118 deluser sshd
119 delgroup sshd
120 update-rc.d -f sshd remove
121 fi
122}
123
124CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config"
125CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config"