| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
#export DH_VERBOSE := 1 |
| 4 |
export PYBUILD_NAME=iva |
| 5 |
|
| 6 |
mandir := $(CURDIR)/debian/man |
| 7 |
debfolder := $(CURDIR)/debian |
| 8 |
read_trim_dir := $(CURDIR)/iva/read_trim |
| 9 |
gage_dir := $(CURDIR)/iva/gage |
| 10 |
ratt_dir := $(CURDIR)/iva/ratt |
| 11 |
|
| 12 |
%: |
| 13 |
dh $@ --buildsystem=pybuild |
| 14 |
|
| 15 |
override_dh_auto_build: |
| 16 |
chmod a-x $(read_trim_dir)/adapters.fasta |
| 17 |
chmod a+x $(gage_dir)/getCorrectnessStats.sh |
| 18 |
chmod a+x $(ratt_dir)/main.ratt.pl |
| 19 |
chmod a+x scripts/* |
| 20 |
javac -verbose $(gage_dir)/*.java |
| 21 |
dh_auto_build -- |
| 22 |
|
| 23 |
override_dh_auto_install: |
| 24 |
dh_auto_install --destdir=debian/iva |
| 25 |
mkdir -p $(CURDIR)/debian/iva-examples/usr/share/doc/iva/examples |
| 26 |
mv $(CURDIR)/debian/iva/usr/lib/python3*/dist-packages/iva/test_run_data/* $(CURDIR)/debian/iva-examples/usr/share/doc/iva/examples |
| 27 |
rmdir $(CURDIR)/debian/iva/usr/lib/python3*/dist-packages/iva/test_run_data |
| 28 |
|
| 29 |
override_dh_installman: |
| 30 |
mkdir -p $(mandir) |
| 31 |
PYTHONPATH=. help2man -N -o $(mandir)/iva.1 \ |
| 32 |
-n 'iterative virus assembler' \ |
| 33 |
--no-discard-stderr ./scripts/iva |
| 34 |
PYTHONPATH=. help2man -N -o $(mandir)/iva_qc.1 \ |
| 35 |
-n 'compare an assembly to a reference' \ |
| 36 |
--no-discard-stderr ./scripts/iva_qc |
| 37 |
PYTHONPATH=. help2man -N -o $(mandir)/iva_qc_make_db.1 \ |
| 38 |
-n 'make a database as input for iva_qc' \ |
| 39 |
--no-discard-stderr ./scripts/iva_qc_make_db |
| 40 |
dh_installman -- |
| 41 |
|
| 42 |
override_dh_auto_clean: |
| 43 |
rm -rf .pybuild *.egg-info .pytest_cache build |
| 44 |
rm -f iva/gage/*.class |
| 45 |
rm -rf $(mandir) |
| 46 |
find . -name __pycache__ | xargs rm -rf |
| 47 |
|
| 48 |
override_dh_auto_test: |
| 49 |
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) |
| 50 |
python3 -m pytest --verbose |
| 51 |
endif |