#!/usr/bin/make -f include /usr/share/dpkg/pkg-info.mk CRATE_VER = mdbook-$(DEB_VERSION_UPSTREAM:+ds=) REGISTRY_DIR = /usr/share/cargo/registry/$(CRATE_VER) %: dh $@ convert_open_sans: mkdir _fonts for i in /usr/share/fonts/truetype/open-sans/*.ttf; do \ fonttools ttLib.woff2 compress $$i -o "_fonts/$$(basename $$i | sed s/ttf/woff2/)"; \ done override_dh_auto_configure: mkdir .cargo cp debian/cargo-config.toml .cargo/config.toml dh_auto_configure override_dh_auto_build: convert_open_sans cargo build --release override_dh_auto_install: mkdir -p debian/librust-mdbook-dev$(REGISTRY_DIR)/debian/patches cp -r src tests Cargo.toml debian/librust-mdbook-dev$(REGISTRY_DIR) cp -r debian/patches debian/librust-mdbook-dev$(REGISTRY_DIR)/debian/ dh_auto_install override_dh_fixperms: chmod -x src/theme/**/*.* dh_fixperms