# 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

# XDG autostart entry -- see debian/postinst / resources/linux/privacyfence.desktop and
# the now-removed docs/linux-local-deb-packaging-plan.md Phase 3 for why this is the packaged default instead of
# the --user systemd unit privacyfence.service (repo root) already documents for a bare pip/pipx
# install.
resources/linux/privacyfence.desktop etc/xdg/autostart/

# #428 Phase 3 (ADR 0002): the companion app's own wrapper and application-menu entry -- a
# separate .desktop file from the autostart one above (see its own comment for why one file can't
# serve both roles).
resources/linux/privacyfence-companion-wrapper usr/bin/privacyfence-companion
resources/linux/privacyfence-companion.desktop usr/share/applications/

# #428 Phase 4 (B5b): the opt-in 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/

# 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
