1 DESCRIPTION = "Secure Shell Client and Server (Remote Login Program)"
2 HOMEPAGE = "http://www.openssh.com/"
3 SECTION = "System/Network"
4 LICENSE = "BSD-3-Clause and MIT"
14 RPROVIDES_openssh += "openssh"
17 #RDEPENDS of openssh (${PN})
18 RDEPENDS_${PN} += "coreutils"
19 RDEPENDS_${PN} += "pam-modules-extra"
20 RDEPENDS_${PN} += "/usr/bin/netstat"
21 RDEPENDS_${PN} += "pwdutils"
27 DEPENDS += "autoconf-native"
28 DEPENDS += "pam-devel"
29 DEPENDS += "openssl-devel"
32 chmod -Rf a+rX,u+w,g-w,o-w ${S}
34 cp ${S}/packaging/openssh.manifest .
46 CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables" ; export CFLAGS ;
47 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
48 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
49 LD_AS_NEEDED=1; export LD_AS_NEEDED ;
53 export CFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables $PIEFLAGS -fstack-protector"
54 export CXXFLAGS="-O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables $PIEFLAGS -fstack-protector"
57 CFLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CFLAGS ;
58 CXXFLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables}" ; export CXXFLAGS ;
59 FFLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -I%_fmoddir}" ; export FFLAGS ;
60 autotools_do_configure --build=${TARGET_SYS} --host=${HOST_SYS} \
61 --target=x86_64-tizen-linux \
68 --datadir=/usr/share \
69 --includedir=/usr/include \
71 --libexecdir=/usr/libexec \
72 --localstatedir=/var \
73 --sharedstatedir=/usr/com \
74 --mandir=/usr/share/man \
75 --infodir=/usr/share/info \
77 --sysconfdir=/etc/ssh \
78 --libexecdir=/usr/libexec/ssh \
80 --with-privsep-path=/var/lib/empty \
81 --with-sandbox=rlimit \
83 --with-xauth=/usr/bin/xauth \
84 --target=x86_64-tizen-linux
92 echo export RPM_BUILD_ROOT=${D}
99 make DESTDIR=${D}/ install
100 install -d -m 755 ${D}/etc/pam.d
101 install -d -m 755 ${D}/var/lib/sshd
102 install -m 644 ${S}/packaging/sshd.pamd ${D}/etc/pam.d/sshd
103 # install shell script to automate the process of adding your public key to a remote machine
104 install -m 755 contrib/ssh-copy-id ${D}/usr/bin
105 install -m 644 contrib/ssh-copy-id.1 ${D}/usr/share/man/man1
106 sed -e "s,@LIBEXEC@,/usr/libexec,g" < ${S}/packaging/ssh-askpass > ${D}/usr/libexec/ssh/ssh-askpass
107 rm -f ${D}/usr/share/Ssh.bin
108 sed -i -e s@/usr/libexec@/usr/libexec@g ${D}/etc/ssh/sshd_config
110 install -D -m 0755 ${S}/packaging/sshd-gen-keys-start ${D}/usr/sbin/sshd-gen-keys-start
112 install -D -m 0644 ${S}/packaging/sshd.service ${D}/lib/systemd/system/sshd.service
113 install -D -m 0644 ${S}/packaging/sshd.socket ${D}/lib/systemd/system/sshd.socket
114 install -D -m 0644 ${S}/packaging/sshd@.service ${D}/lib/systemd/system/sshd@.service
116 mkdir -p ${D}//lib/systemd/system/sockets.target.wants
117 ln -s ../sshd.socket ${D}//lib/systemd/system/sockets.target.wants/sshd.socket
119 rm -rf ${D}//usr/share/man/cat*
120 rm -rf ${D}//usr/share/man/man*
128 PACKAGES += "openssh"
131 openssh_files += "openssh.manifest"
132 #Remove rpm attribut "%attr(755,root,root)"
133 openssh_files += "/var/lib/sshd"
134 openssh_files += "/usr/bin/scp"
135 openssh_files += "/usr/bin/sftp"
136 openssh_files += "/usr/bin/slogin"
137 openssh_files += "/usr/bin/ssh-*"
138 openssh_files += "/usr/sbin/*"
139 openssh_files += "/usr/sbin/sshd-gen-keys-start"
140 openssh_files += "/lib/systemd/system/sshd.service"
141 openssh_files += "/lib/systemd/system/sshd@.service"
142 openssh_files += "/lib/systemd/system/sockets.target.wants/*.socket"
143 openssh_files += "/lib/systemd/system/sshd.socket"
145 FILES_${PN} = "${openssh_files}"
147 PKG_openssh= "openssh"
149 require openssh-extraconf.inc