aboutsummaryrefslogtreecommitdiff
path: root/extra/sftp/build
diff options
context:
space:
mode:
Diffstat (limited to 'extra/sftp/build')
-rwxr-xr-xextra/sftp/build29
1 files changed, 29 insertions, 0 deletions
diff --git a/extra/sftp/build b/extra/sftp/build
new file mode 100755
index 00000000..d2a9aa39
--- /dev/null
+++ b/extra/sftp/build
@@ -0,0 +1,29 @@
+#!/bin/sh -e
+
+# Standalone sftp client crashes without
+# libedit, so it is mandatory.
+
+./configure \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --datadir=/usr/share/openssh \
+ --sysconfdir=/etc/ssh \
+ --without-selinux \
+ --with-privsep-user=nobody \
+ --with-mantype=doc \
+ --without-rpath \
+ --disable-strip \
+ --with-ssl-engine \
+ --with-pid-dir=/run \
+ --disable-wtmp \
+ --disable-utmp \
+ --with-libedit \
+
+make sftp sftp-server
+
+mkdir -p "$1/usr/bin" "$1/usr/libexec"
+
+cp sftp "$1/usr/bin"
+cp sftp-server "$1/usr/libexec"
+
+chmod 755 "$1/usr/bin/sftp" "$1/usr/libexec/sftp-server"