summaryrefslogtreecommitdiff
path: root/elements/foundation/openssh.bst
blob: 610ad58606b5a8268c4d62ced22861fda9bb6dde (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
kind: manual
depends:
- coreutils-common.bst
- foundation/groff.bst
sources:
- kind: git
  url: upstream:openssh-git
  track: baserock/morph
  ref: 782fe9e725243eeb5ad6ab9a1783b5d6bedfe0d7
config:
  configure-commands:
  - autoreconf -if
  - |
    OPENSSL_SEEDS_ITSELF=yes ./configure \
        --prefix="%{prefix}" --sysconfdir=/etc/ssh \
        --datadir="%{prefix}/share/sshd" \
        --libexecdir="%{prefix}/lib/openssh" \
        --with-privsep-path=/var/lib/sshd	 \
        --with-pam
  build-commands:
  - make
  - |
    sed -e "s|@prefix@|%{prefix}|g" \
        -e 's|@STARTUP_SCRIPT_SHELL@|/bin/sh|g' \
        -e 's|@sysconfdir@|/etc/ssh|g' \
        -e 's|@COMMENT_OUT_ECC@||g' \
        sshd-keygen.in >sshd-keygen
  - sed -e "s|@prefix@|%{prefix}|g" opensshd.service.in >opensshd.service
  install-commands:
  - make DESTDIR="%{install-root}" install
  - mkdir -p "%{install-root}/%{prefix}/sbin"
  - chmod go= "%{install-root}"/var/lib/sshd
  - install -m 744 sshd-keygen "%{install-root}/%{prefix}/sbin/sshd-keygen"
  - install -m 755 contrib/ssh-copy-id "%{install-root}/%{prefix}/bin/ssh-copy-id"
  - mkdir -p "%{install-root}%{prefix}/lib/systemd/system/"
  - install -m 644 opensshd.service "%{install-root}%{prefix}/lib/systemd/system/opensshd.service"
public:
  bst:
    integration-commands:
    - systemctl enable opensshd