aboutsummaryrefslogtreecommitdiff
path: root/extra/dropbear/build
blob: eb926ca38e6bd5f5b89b4471706cec96c04949ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh -e

kinstall() {
    mkdir -p "${3%/*}"; cp "$2" "$3"
    chmod "$1" "$3"
}

export LDFLAGS="$LDFLAGS -static"

./configure \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --enable-static

make
make DESTDIR="$1" install

ln -s dbclient "$1/usr/bin/ssh"

# Install user services
kinstall 755 run "$1/etc/sv/dropbear/run"
kinstall 755 run "$1/etc/sysmgr/dropbear"
ln -sf /run/runit/supervise.dropbear "$1/etc/sv/dropbear/supervise"