1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
include /usr/share/rustc/architecture.mk
CARGO_BASE_ARGS=--verbose --release --target $(DEB_HOST_RUST_TYPE)
RUNTIME_LIBS=libavcodec.so libgbm.so
%:
dh $@
execute_before_dh_auto_configure:
mkdir -p .cargo
cp debian/cargo-config.toml .cargo/config.toml
mv Cargo.lock Cargo.lock.ignored
execute_after_dh_auto_clean:
rm -f waypipe.1
rm -rf target
if [ -f Cargo.lock.ignored ]; then \
mv Cargo.lock.ignored Cargo.lock; \
fi
rm -rf .cargo
override_dh_auto_configure:
override_dh_auto_build:
cargo build $(CARGO_BASE_ARGS)
scdoc < waypipe.scd > waypipe.1
override_dh_auto_install:
install -D target/$(DEB_HOST_RUST_TYPE)/release/waypipe debian/tmp/usr/bin/waypipe
override_dh_auto_test:
cargo test $(CARGO_BASE_ARGS)
execute_before_dh_gencontrol:
CARGO_REGISTRY=/usr/share/cargo/registry debian/dh-cargo-built-using waypipe
DEB_HOST_MULTIARCH=$(DEB_HOST_MULTIARCH) debian/runtime-recommends.sh $(RUNTIME_LIBS)
|