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