post_install() {
  # Enable socket by default. Skip silently when systemctl is absent: in an
  # isolated build root speech-dispatcher can be installed before systemd, and
  # ALPM treats a failing scriptlet as fatal, which aborts root provisioning.
  command -v systemctl >/dev/null 2>&1 || return 0
  systemctl --global enable speech-dispatcher.socket
}

# No pre-Devario socket migration is needed.
post_upgrade() { :; }

pre_remove() {
  command -v systemctl >/dev/null 2>&1 || return 0
  systemctl --global disable speech-dispatcher.socket
}
