diff options
author | Scott Garman <scott.a.garman@intel.com> | 2010-08-31 11:33:01 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-02 09:52:31 +0100 |
commit | 436d590c4a5b7b5942bac5b51af128bcdd30621f (patch) | |
tree | ceea9b9d54c51221fbe1555747bfadae8bfdb92d /meta/recipes-connectivity/openssh/openssh_5.6p1.bb | |
parent | a206fce2baac86c36aaf22755578d7b557f72b05 (diff) | |
download | poky-436d590c4a5b7b5942bac5b51af128bcdd30621f.tar.gz |
openssh: new recipe addition
OpenSSH v5.6p1, derived from OpenEmbedded's recipe.
Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'meta/recipes-connectivity/openssh/openssh_5.6p1.bb')
-rw-r--r-- | meta/recipes-connectivity/openssh/openssh_5.6p1.bb | 121 |
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 @@ | |||
1 | DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \ | ||
2 | Ssh (Secure Shell) is a program for logging into a remote machine \ | ||
3 | and for executing commands on a remote machine." | ||
4 | HOMEPAGE = "http://openssh.org" | ||
5 | SECTION = "console/network" | ||
6 | LICENSE = "BSD" | ||
7 | LIC_FILES_CHKSUM = "file://LICENCE;md5=7ae09218173be1643c998a4b71027f9b" | ||
8 | |||
9 | PR = "r0" | ||
10 | |||
11 | DEPENDS = "zlib openssl" | ||
12 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | ||
13 | |||
14 | PROVIDES = "ssh sshd" | ||
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 | " | ||
27 | SRC_URI[md5sum] = "e6ee52e47c768bf0ec42a232b5d18fb0" | ||
28 | SRC_URI[sha256sum] = "538af53b2b8162c21a293bb004ae2bdb141abd250f61b4cea55244749f3c6c2b" | ||
29 | |||
30 | inherit autotools | ||
31 | |||
32 | # LFS support: | ||
33 | CFLAGS += "-D__FILE_OFFSET_BITS=64" | ||
34 | export LD = "${CC}" | ||
35 | |||
36 | EXTRA_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. | ||
47 | EXTRA_OECONF_append_libc-uclibc=" --without-pam" | ||
48 | |||
49 | do_configure_prepend () { | ||
50 | if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then | ||
51 | cp aclocal.m4 acinclude.m4 | ||
52 | fi | ||
53 | } | ||
54 | |||
55 | do_compile_append () { | ||
56 | install -m 0644 ${WORKDIR}/sshd_config ${S}/ | ||
57 | install -m 0644 ${WORKDIR}/ssh_config ${S}/ | ||
58 | } | ||
59 | |||
60 | do_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 | |||
69 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" | ||
70 | FILES_${PN}-scp = "${bindir}/scp.${PN}" | ||
71 | FILES_${PN}-ssh = "${bindir}/ssh.${PN} ${sysconfdir}/ssh/ssh_config" | ||
72 | FILES_${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd" | ||
73 | FILES_${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config" | ||
74 | FILES_${PN}-sftp = "${bindir}/sftp" | ||
75 | FILES_${PN}-sftp-server = "${libdir}exec/sftp-server" | ||
76 | FILES_${PN}-misc = "${bindir}/ssh* ${libdir}exec/ssh*" | ||
77 | FILES_${PN}-keygen = "${bindir}/ssh-keygen" | ||
78 | |||
79 | RDEPENDS_${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" | ||
80 | DEPENDS_${PN}-sshd += "update-rc.d" | ||
81 | RDEPENDS_${PN}-sshd += "update-rc.d ${PN}-keygen" | ||
82 | |||
83 | pkg_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 | |||
93 | pkg_postinst_${PN}-scp () { | ||
94 | update-alternatives --install ${bindir}/scp scp scp.${PN} 90 | ||
95 | } | ||
96 | |||
97 | pkg_postinst_${PN}-ssh () { | ||
98 | update-alternatives --install ${bindir}/ssh ssh ssh.${PN} 90 | ||
99 | } | ||
100 | |||
101 | pkg_postrm_${PN}-ssh () { | ||
102 | update-alternatives --remove ${bindir}/ssh ssh.${PN} | ||
103 | } | ||
104 | |||
105 | pkg_postrm_${PN}-scp () { | ||
106 | update-alternatives --remove ${bindir}/scp scp.${PN} | ||
107 | } | ||
108 | |||
109 | pkg_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 | |||
120 | CONFFILES_${PN}-sshd = "${sysconfdir}/ssh/sshd_config" | ||
121 | CONFFILES_${PN}-ssh = "${sysconfdir}/ssh/ssh_config" | ||