diff options
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_5.9p1.bb')
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh_5.9p1.bb | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh_5.9p1.bb b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb new file mode 100644 index 0000000000..f9493d7224 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh_5.9p1.bb | |||
@@ -0,0 +1,119 @@ | |||
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 | LICENSE = "BSD" | ||
8 | LIC_FILES_CHKSUM = "file://LICENCE;md5=bae9a689be41581503bcf95d8fb42c4e" | ||
9 | |||
10 | PR = "r2" | ||
11 | |||
12 | DEPENDS = "zlib openssl" | ||
13 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
14 | |||
15 | RPROVIDES = "ssh sshd" | ||
16 | |||
17 | CONFLICTS_${PN} = "dropbear" | ||
18 | RCONFLICTS_${PN}-sshd = "dropbear" | ||
19 | RCONFLICTS_${PN}-keygen = "ssh-keygen" | ||
20 | |||
21 | SRC_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 | ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)}" | ||
27 | |||
28 | PAM_SRC_URI = "file://sshd" | ||
29 | SRC_URI[md5sum] = "afe17eee7e98d3b8550cc349834a85d0" | ||
30 | SRC_URI[sha256sum] = "8d3e8b6b6ff04b525a6dfa6fdeb6a99043ccf6c3310cc32eba84c939b07777d5" | ||
31 | |||
32 | inherit useradd update-rc.d | ||
33 | |||
34 | USERADD_PACKAGES = "${PN}-sshd" | ||
35 | USERADD_PARAM_${PN}-sshd = "--system --no-create-home --home-dir /var/run/sshd --shell /bin/false --user-group sshd" | ||
36 | INITSCRIPT_PACKAGES = "${PN}-sshd" | ||
37 | INITSCRIPT_NAME_${PN}-sshd = "sshd" | ||
38 | INITSCRIPT_PARAMS_${PN}-sshd = "defaults 9" | ||
39 | |||
40 | inherit autotools | ||
41 | |||
42 | # LFS support: | ||
43 | CFLAGS += "-D__FILE_OFFSET_BITS=64" | ||
44 | export LD = "${CC}" | ||
45 | |||
46 | EXTRA_OECONF = "--with-rand-helper=no \ | ||
47 | ${@base_contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ | ||
48 | --without-zlib-version-check \ | ||
49 | --with-privsep-path=/var/run/sshd \ | ||
50 | --sysconfdir=${sysconfdir}/ssh \ | ||
51 | --with-xauth=/usr/bin/xauth" | ||
52 | |||
53 | # This is a workaround for uclibc because including stdio.h | ||
54 | # pulls in pthreads.h and causes conflicts in function prototypes. | ||
55 | # This results in compilation failure, so unless this is fixed, | ||
56 | # disable pam for uclibc. | ||
57 | EXTRA_OECONF_append_libc-uclibc=" --without-pam" | ||
58 | |||
59 | do_configure_prepend () { | ||
60 | if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then | ||
61 | cp aclocal.m4 acinclude.m4 | ||
62 | fi | ||
63 | } | ||
64 | |||
65 | do_compile_append () { | ||
66 | install -m 0644 ${WORKDIR}/sshd_config ${S}/ | ||
67 | install -m 0644 ${WORKDIR}/ssh_config ${S}/ | ||
68 | } | ||
69 | |||
70 | do_install_append () { | ||
71 | for i in ${DISTRO_FEATURES}; | ||
72 | do | ||
73 | if [ ${i} = "pam" ]; then | ||
74 | install -d ${D}${sysconfdir}/pam.d | ||
75 | install -m 0755 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd | ||
76 | fi | ||
77 | done | ||
78 | install -d ${D}${sysconfdir}/init.d | ||
79 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd | ||
80 | mv ${D}${bindir}/scp ${D}${bindir}/scp.${PN} | ||
81 | mv ${D}${bindir}/ssh ${D}${bindir}/ssh.${PN} | ||
82 | rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin | ||
83 | rmdir ${D}/var/run/sshd ${D}/var/run ${D}/var | ||
84 | } | ||
85 | |||
86 | ALLOW_EMPTY_${PN} = "1" | ||
87 | |||
88 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" | ||
89 | FILES_${PN}-scp = "${bindir}/scp.${PN}" | ||
90 | FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" | ||
91 | FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" | ||
92 | FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" | ||
93 | FILES_${PN}-sftp = "${bindir}/sftp" | ||
94 | FILES_${PN}-sftp-server = "${libexecdir}/sftp-server" | ||
95 | FILES_${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" | ||
96 | FILES_${PN}-keygen = "${bindir}/ssh-keygen" | ||
97 | |||
98 | RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" | ||
99 | DEPENDS_${PN}-sshd += "update-rc.d" | ||
100 | RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen" | ||
101 | |||
102 | pkg_postinst_${PN}-scp () { | ||
103 | update-alternatives --install ${bindir}/scp scp scp.${PN} 90 | ||
104 | } | ||
105 | |||
106 | pkg_postinst_${PN}-ssh () { | ||
107 | update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90 | ||
108 | } | ||
109 | |||
110 | pkg_postrm_${PN}-ssh () { | ||
111 | update-alternatives --remove ${bindir}/ssh ssh.${PN} | ||
112 | } | ||
113 | |||
114 | pkg_postrm_${PN}-scp () { | ||
115 | update-alternatives --remove ${bindir}/scp scp.${PN} | ||
116 | } | ||
117 | |||
118 | CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" | ||
119 | CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" | ||