# File mappings for the privacyfence .deb -- read by dh_install if this package is ever built
# through the full `dh $@` / dpkg-buildpackage pipeline (see debian/rules's own note on why
# scripts/build_deb.sh normally takes a more direct route instead, staging the same mappings by
# hand). Each line is "<source, relative to the source package root> <destination dir, relative
# to the package root, no leading />".
#
# dist/PrivacyFenceApp/ is Phase 1's PyInstaller onedir output -- build it first with
# `pyinstaller PrivacyFenceApp.linux.spec` (gitignored; not part of the source tree itself).
dist/PrivacyFenceApp/* opt/privacyfence/

# Debian policy §9.1.2: a self-contained third-party bundle that doesn't integrate with the
# system package management for its internals belongs under /opt, not /usr/lib.
resources/linux/privacyfence-app-wrapper usr/bin/privacyfence-app

# The companion app's own wrapper and application-menu entry (ADR 0002). No autostart entry ships
# with the package: the daemon is a system unit, and the companion's autostart entry is rendered by
# the separation tool below at `enable` time.
resources/linux/privacyfence-companion-wrapper usr/bin/privacyfence-companion
resources/linux/privacyfence-companion.desktop usr/share/applications/

# The privilege-separation tool, plus the systemd unit and XDG autostart templates it renders at
# `enable` time. /usr/sbin because it refuses to run without root; the
# templates under /usr/share because a packaged install has no source checkout for the script to
# find them next to (see the script's own TEMPLATE_DIR comment). scripts/build_deb.sh additionally
# renames the script to /usr/sbin/privacyfence-privilege-separation, which dh_install cannot express
# here.
scripts/linux_privilege_separation.sh usr/sbin/
installer/linux/privacyfence-daemon.service.tmpl usr/share/privacyfence/installer/linux/
installer/linux/privacyfence-companion.desktop.tmpl usr/share/privacyfence/installer/linux/

# #428 Phase 2: the polkit action that lets the companion's tray menu run
# `daemon start`/`stop`/`restart` elevated via pkexec, with one
# authentication prompt, instead of asking a human to open a terminal --
# see the policy file's own comment for the trust reasoning.
installer/linux/eu.privacyfence.daemon-control.policy usr/share/polkit-1/actions/

# Icon-theme locations, referenced by name (Icon=privacyfence) rather than absolute path from the
# .desktop entry above.
src/privacyfence/resources/icon_512.png usr/share/icons/hicolor/512x512/apps/privacyfence.png
src/privacyfence/resources/icon_64.png usr/share/icons/hicolor/64x64/apps/privacyfence.png
src/privacyfence/resources/icon_32.png usr/share/icons/hicolor/32x32/apps/privacyfence.png

LICENSE usr/share/doc/privacyfence/
NOTICE usr/share/doc/privacyfence/
debian/copyright usr/share/doc/privacyfence/

# Documents the "key decision" trade-offs (self-contained /opt bundle, no python3-* deps) that
# lintian's default tags would otherwise flag as policy violations -- see the overrides file's own
# comments for why each is expected, not a defect.
debian/privacyfence.lintian-overrides usr/share/lintian/overrides/privacyfence
