#!/bin/bash

## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

#version_numbers_by_upstream=true

## Symlink based man pages.
genmkfile_lintian_post_opts+=" --suppress-tags spare-manual-page"

make_helper() {
   printf '%s\n' "$0: Not implemented!" >&2
   exit 1
}

make_all() {
   printf '%s\n' "$0: Not required, skipping."
}

make_install() {
   make_function_run make_get_destdir

   make -f Makefile \
      PREFIX="/usr" \
      DESTDIR="$DESTDIR" \
      ETC="/etc" \
      SBIN="/usr/sbin" \
      SYSTEM="/usr/lib/systemd/system" \
      MAN="/usr/share/man" \
      install install-systemd install-qubes
}

make_deb-cleanup_hook_pre() {
   ## Get rid of systemd/corridor-data.service etc.
   make -f Makefile clean
}

make_clean_hook_pre() {
   make_deb-cleanup_hook_pre
}
