diff options
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_5.8p2.bb')
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh_5.8p2.bb | 125 |
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 @@ | |||
1 | SUMMARY = "Secure rlogin/rsh/rcp/telnet replacement" | ||
2 | DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ | ||
3 | Ssh (Secure Shell) is a program for logging into a remote machine \ | ||
4 | and for executing commands on a remote machine." | ||
5 | HOMEPAGE = "http://openssh.org" | ||
6 | SECTION = "console/network" | ||
7 | PRIORITY = "optional" | ||
8 | LICENSE = "BSD" | ||
9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=bae9a689be41581503bcf95d8fb42c4e" | ||
10 | |||
11 | PR = "r0" | ||
12 | |||
13 | DEPENDS = "zlib openssl" | ||
14 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
15 | |||
16 | PROVIDES = "ssh sshd" | ||
17 | RPROVIDES = "ssh sshd" | ||
18 | |||
19 | CONFLICTS_${PN} = "dropbear" | ||
20 | RCONFLICTS_${PN}-sshd = "dropbear" | ||
21 | RCONFLICTS_${PN}-keygen = "ssh-keygen" | ||
22 | |||
23 | SRC_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 | " | ||
29 | SRC_URI[md5sum] = "0541579adf9d55abb15ef927048d372e" | ||
30 | SRC_URI[sha256sum] = "5c35ec7c966ce05cc4497ac59c0b54a556e55ae7368165cc8c4129694654f314" | ||
31 | |||
32 | inherit autotools | ||
33 | |||
34 | # LFS support: | ||
35 | CFLAGS += "-D__FILE_OFFSET_BITS=64" | ||
36 | export LD = "${CC}" | ||
37 | |||
38 | EXTRA_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. | ||
49 | EXTRA_OECONF_append_libc-uclibc=" --without-pam" | ||
50 | |||
51 | do_configure_prepend () { | ||
52 | if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then | ||
53 | cp aclocal.m4 acinclude.m4 | ||
54 | fi | ||
55 | } | ||
56 | |||
57 | do_compile_append () { | ||
58 | install -m 0644 ${WORKDIR}/sshd_config ${S}/ | ||
59 | install -m 0644 ${WORKDIR}/ssh_config ${S}/ | ||
60 | } | ||
61 | |||
62 | do_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 | |||
71 | ALLOW_EMPTY_${PN} = "1" | ||
72 | |||
73 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" | ||
74 | FILES_${PN}-scp = "${bindir}/scp.${PN}" | ||
75 | FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" | ||
76 | FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" | ||
77 | FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" | ||
78 | FILES_${PN}-sftp = "${bindir}/sftp" | ||
79 | FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" | ||
80 | FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" | ||
81 | FILES_${PN}-keygen = "${bindir}/ssh-keygen" | ||
82 | |||
83 | RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" | ||
84 | DEPENDS_${PN}-sshd += "update-rc.d" | ||
85 | RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen" | ||
86 | |||
87 | pkg_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 | |||
97 | pkg_postinst_${PN}-scp () { | ||
98 | update-alternatives --install ${bindir}/scp scp scp.${PN} 90 | ||
99 | } | ||
100 | |||
101 | pkg_postinst_${PN}-ssh () { | ||
102 | update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90 | ||
103 | } | ||
104 | |||
105 | pkg_postrm_${PN}-ssh () { | ||
106 | update-alternatives --remove ${bindir}/ssh ssh.${PN} | ||
107 | } | ||
108 | |||
109 | pkg_postrm_${PN}-scp () { | ||
110 | update-alternatives --remove ${bindir}/scp scp.${PN} | ||
111 | } | ||
112 | |||
113 | pkg_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 | |||
124 | CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" | ||
125 | CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" | ||