| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
include /usr/share/dpkg/pkg-info.mk |
| 6 |
include /usr/share/dpkg/architecture.mk |
| 7 |
include /usr/share/dpkg/buildflags.mk |
| 8 |
include /usr/share/rustc/architecture.mk |
| 9 |
|
| 10 |
export DEB_BUILD_MAINT_OPTIONS = hardening=+all |
| 11 |
|
| 12 |
export PYBUILD_NAME = jellyfish |
| 13 |
export PYBUILD_TEST_PYTEST = 1 |
| 14 |
|
| 15 |
export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS |
| 16 |
export DEB_HOST_RUST_TYPE DEB_HOST_GNU_TYPE |
| 17 |
|
| 18 |
export CARGO=/usr/share/cargo/bin/cargo |
| 19 |
export CARGO_HOME=$(CURDIR)/debian/cargo_home |
| 20 |
export DEB_CARGO_CRATE=$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM) |
| 21 |
|
| 22 |
|
| 23 |
%: |
| 24 |
dh $@ --buildsystem=pybuild |
| 25 |
|
| 26 |
execute_before_dh_auto_configure: |
| 27 |
mv Cargo.lock Cargo.lock.saved |
| 28 |
cp debian/cargo_home/config.toml debian/cargo_home_config.toml.saved |
| 29 |
$(CARGO) prepare-debian debian/cargo_registry --link-from-system |
| 30 |
rm -f Cargo.lock |
| 31 |
|
| 32 |
ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES))) |
| 33 |
execute_after_dh_auto_build-indep: |
| 34 |
mkdocs build |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
perl -i -ne '/<img .*src="http/ || print' site/index.html |
| 39 |
|
| 40 |
override_dh_installdocs-indep: |
| 41 |
dh_installdocs -ppython-jellyfish-doc --doc-main-package=python3-jellyfish |
| 42 |
dh_installdocs --remaining-packages |
| 43 |
mv debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/site debian/python-jellyfish-doc/usr/share/doc/python3-jellyfish/html |
| 44 |
endif |
| 45 |
|
| 46 |
override_dh_installchangelogs: |
| 47 |
dh_installchangelogs docs/changelog.md |
| 48 |
|
| 49 |
ifeq (,$(findstring nocheck,$(DEB_BUILD_PROFILES))) |
| 50 |
execute_after_dh_auto_test: |
| 51 |
cargo test |
| 52 |
endif |
| 53 |
|
| 54 |
execute_after_dh_auto_clean: |
| 55 |
if test -f Cargo.lock.saved; then mv Cargo.lock.saved Cargo.lock; fi |
| 56 |
if test -f debian/cargo_home_config.toml.saved; then \ |
| 57 |
mv debian/cargo_home_config.toml.saved debian/cargo_home/config.toml; \ |
| 58 |
fi |