Files
2026-03-10 19:14:51 -07:00

49 lines
1.3 KiB
Makefile
Executable File

#!/usr/bin/make -f
# Debian rules for age-verification-services
# Builds:
# 1. age-verification-daemon (C, CMake)
# 2. age-verification-sync (Rust, Cargo)
export DH_VERBOSE = 1
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@
# ---------------------------------------------------------------------------
# C daemon (CMake)
# ---------------------------------------------------------------------------
override_dh_auto_configure:
cmake \
-S daemon \
-B debian/build-daemon \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=ON
override_dh_auto_build:
cmake --build debian/build-daemon
# Build Rust sync client
cd sync-client && cargo build --release
override_dh_auto_install:
DESTDIR=$(CURDIR)/debian/tmp \
cmake --install debian/build-daemon
# Install Rust binary
install -Dm755 sync-client/target/release/age-verification-sync \
$(CURDIR)/debian/tmp/usr/bin/age-verification-sync
# Install server public key placeholder dir
install -dm755 \
$(CURDIR)/debian/tmp/etc/age-verification
# Install device keystore dir (empty, created at runtime)
install -dm700 \
$(CURDIR)/debian/tmp/var/lib/age-verification/device
override_dh_auto_clean:
rm -rf debian/build-daemon
cd sync-client && cargo clean || true
override_dh_auto_test:
# No automated tests yet — skip