Support vendored builds / distribution packaging
This will fix the build for those building on platforms like Debian / Ubuntu.
Working debian/rules file, with this change:
#!/usr/bin/make -f
%:
dh $@ --buildsystem=meson
override_dh_auto_clean:
dh_auto_clean
ifeq (,$(wildcard vendor.tar.xz))
mkdir -p .cargo
cargo vendor | head -n -1 > .cargo/config
echo 'directory = "vendor"' >> .cargo/config
tar pcfJ vendor.tar.xz vendor
rm -rf vendor
endif
override_dh_auto_build:
tar pxf vendor.tar.xz
rm vendor.tar.xz
dh_auto_build
Part of #109 (closed)
Edited by Jordan Petridis