default_install &&

if [[ $INIT_INSTALLED ]]; then
  install_config_file "$SPELL_DIRECTORY/init.d/acpid.conf" \
                      "$INSTALL_ROOT/etc/sysconfig/acpid"
fi &&

if [[ ! -d "$INSTALL_ROOT/etc/acpi/events" ]]; then
  install -vm 755 -d "$INSTALL_ROOT/etc/acpi/events"
fi &&

if [[ ! -d "$INSTALL_ROOT/etc/acpi/actions" ]]; then
  install -vm 755 -d "$INSTALL_ROOT/etc/acpi/actions"
fi &&

if is_depends_enabled $SPELL systemd; then
  install -m644 -o root -g root \
    "$SPELL_DIRECTORY"/systemd/acpid.service \
    "$INSTALL_ROOT"/lib/systemd/system/
fi
