post_install() {
  # Enable service by default
  # WantedBy=pipewire.service, which is itself socket-activated
  systemctl --global enable pipewire-media-session.service
}

post_upgrade() {
  if (( $(vercmp $2 0.3.23-1) < 0)); then
    systemctl --global enable pipewire-media-session.service
  fi
}

pre_remove() {
  systemctl --global disable pipewire-media-session.service
}
