OpenSSH 6.2p2 をAndroid NDKでクロスコンパイルする

以前の記事「OpenSSL 0.9.8yをAndroid NDKでクロスコンパイルする」および「ldns 1.6.16 をAndroid NDKでクロスコンパイルする」を前提にしています。

http://ftp.jaist.ac.jp/pub/OpenBSD/OpenSSH/portable/ から openssh-6.2p2.tar.gz をダウンロードします。

$ tar xvzf openssh-6.2p2.tar.gz
$ cd openssh-6.2p2
$ curl https://gist.github.com/hnw/6265015/raw/f19d3a3a0e60497cef81d4f2e9ceef20029bc79d/openssh-6.2p1-android-patch.txt | patch -p1
$ autoreconf
$ CFLAGS=-O2 LDFLAGS=-s ./configure --host=arm-linux-androideabi --prefix=$ANDROID_APP_ROOT/openssh-6.2p2 --with-ssl-dir=$ANDROID_APP_ROOT/openssl-0.9.8y --with-ldns=$ANDROID_APP_ROOT/ldns-1.6.16 --disable-utmpx
$ make -j4 AR=arm-linux-androideabi-ar
$ make install-nokeys STRIP_OPT=

installed files

bin/scp
bin/sftp
bin/slogin
bin/ssh
bin/ssh-add
bin/ssh-agent
bin/ssh-keygen
bin/ssh-keyscan
etc/moduli
etc/ssh_config
etc/sshd_config
libexec/sftp-server
libexec/ssh-keysign
libexec/ssh-pkcs11-helper
sbin/sshd
share/man/man?/*.1