kind: autotools
depends:
- coreutils-common.bst
- foundation/dbus-pre.bst
- foundation/kmod.bst
- foundation/libgcrypt.bst
- foundation/libgpg-error.bst
sources:
- kind: git
  url: upstream:systemd
  track: v232
  ref: a1e2ef7ec912902d8142e7cb5830cbfb47dba86c
config:
  configure-commands:
  - ./autogen.sh
  - ./configure --prefix="%{prefix}" --sysconfdir=/etc --localstatedir=/var --disable-manpages
    --disable-tests --libexecdir="%{prefix}/libexec" --enable-split-usr
  install-commands:
    (>):
    - mkdir -p "%{install-root}"/sbin
    - ln -s "%{prefix}"/lib/systemd/systemd "%{install-root}"/sbin/init
    - for f in telinit runlevel shutdown poweroff reboot halt; do ln -s "%{prefix}"/bin/systemctl
      "%{install-root}/sbin/$f"; done
    - touch "%{install-root}/etc/machine-id"
    - |
      cat > "%{install-root}/etc/systemd/network/10-dhcp.network" << "EOF"
      [Match]
      Name=e*

      [Network]
      DHCP=yes
      EOF
    - cp -a "%{install-root}/%{prefix}"/share/factory/etc/pam.d/* "%{install-root}/etc/pam.d"
    - echo 'auth     requisite  pam_deny.so' >> "%{install-root}"/etc/pam.d/system-auth
