]> pilppa.org Git - familiar-h63xx-build.git/blob - org.handhelds.familiar/packages/openssh/openssh_3.8p1.bb
OE tree imported from monotone branch org.openembedded.oz354fam083 at revision 8b12e3...
[familiar-h63xx-build.git] / org.handhelds.familiar / packages / openssh / openssh_3.8p1.bb
1 DEPENDS = "zlib openssl"
2 SECTION = "console/network"
3 DESCRIPTION = "Secure rlogin/rsh/rcp/telnet replacement (OpenSSH) \
4 Ssh (Secure Shell) is a program for logging into a remote machine \
5 and for executing commands on a remote machine. \
6 It provides secure encrypted communications between two untrusted \
7 hosts over an insecure network.  X11 connections and arbitrary TCP/IP \
8 ports can also be forwarded over the secure channel. \
9 It is intended as a replacement for rlogin, rsh and rcp, and can be \
10 used to provide applications with a secure communication channel."
11 HOMEPAGE = "http://www.openssh.org/"
12 LICENSE = "BSD"
13 MAINTAINER = "Bruno Randolf <bruno.randolf@4g-systems.biz>"
14 PR = "r2"
15
16 SRC_URI = "ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \
17            file://configure.patch;patch=1 \
18            file://scp-nossl.patch;patch=1 \
19            file://sshd_config \
20            file://init"
21
22 inherit autotools
23
24 export ASKPASS_PROGRAM = "${bindir}/ssh-askpass"
25 export LD = "${CC}"
26 CFLAGS_prepend = "-I${S} "
27 CFLAGS_append = " -D__FILE_OFFSET_BITS=64"
28 LDFLAGS_prepend = "-L${S} -L${S}/openbsd-compat "
29 EXTRA_OECONF = "--disable-suid-ssh --with-ssl=${STAGING_LIBDIR}/ssl \
30                 --with-rand-helper=no --without-pam \
31                 --without-zlib-version-check \
32                 --with-privsep-path=/var/run/sshd \
33                 --sysconfdir=${sysconfdir}/ssh"
34                 
35 EXTRA_OEMAKE = "'STRIP_OPT='"
36
37 do_configure_prepend () {
38         if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
39                 cp aclocal.m4 acinclude.m4
40         fi
41 }
42
43 do_compile_append () {
44         install -m 0644 ${WORKDIR}/sshd_config ${S}/
45 }
46
47 do_install_append() {
48         install -d ${D}${sysconfdir}/init.d
49         install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd
50 }
51
52 PACKAGES =+ " openssh-scp openssh-ssh openssh-sshd openssh-sftp openssh-misc"
53 FILES_openssh-scp = "${bindir}/scp"
54 FILES_openssh-ssh = "${bindir}/ssh ${bindir}/slogin /${sysconfdir}/ssh/ssh_config"
55 FILES_openssh-sshd = "${sbindir}/sshd /${sysconfdir}/init.d/sshd ${bindir}/ssh-keygen"
56 FILES_openssh-sshd += " /${sysconfdir}/ssh/moduli /${sysconfdir}/ssh/sshd_config /var/run/sshd"
57 FILES_openssh-sftp = "${bindir}/sftp ${libdir}exec/sftp-server"
58 FILES_openssh-misc = "${bindir} ${libdir}exec/"
59 RDEPENDS_openssh += " openssh-scp openssh-ssh openssh-sshd"
60 DEPENDS_openssh-sshd += " update-rc.d"
61 RDEPENDS_openssh-sshd += " update-rc.d"
62
63 pkg_postinst_openssh-sshd() {
64 if test "x$D" != "x"; then
65         exit 1
66 else
67         addgroup sshd
68         adduser --system --home /var/run/sshd --no-create-home --disabled-password --ingroup sshd -s /bin/false sshd
69         update-rc.d sshd defaults
70 fi
71 }
72
73 pkg_postrm_openssh-sshd() {
74 if test "x$D" != "x"; then
75         exit 1
76 else
77         ${sysconfdir}/init.d/sshd stop
78         deluser sshd
79         delgroup sshd
80         update-rc.d -f sshd remove
81 fi
82 }
83
84 CONFFILES_openssh-sshd = "${sysconfdir}/ssh/sshd_config"
85 CONFFILES_openssh-ssh = "${sysconfdir}/ssh/ssh_config"