File: rules

package info (click to toggle)
macsyfinder 1.0.5-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 54,800 kB
  • sloc: python: 6,060; xml: 780; makefile: 156; sh: 12
file content (46 lines) | stat: -rwxr-xr-x 2,068 bytes parent folder | download
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
40
41
42
43
44
45
46
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

%:
	dh $@ --with python2 --buildsystem=pybuild

override_dh_auto_install:
	cd doc && make html
	cd doc && make latexpdf
	ln -sf $(shell pybuild --print build_dir --interpreter python) build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)-$(shell pyversions -vs)
	python setup.py install --prefix=debian/macsyfinder/usr/ --install-conf=debian/macsyfinder/etc/ --no-viewer
	# The better solution would be to use
	#	dh_auto_install -- --prefix=/usr --install-conf=/etc --no-viewer
	# and fiy setup.py to use --root as install location (which is ignored unfortunately)
	# Since I have no idea how to fix setup.py here the broken config files are hacked afterwards
	for conffile in \
		etc/macsyfinder/macsyfinder.conf.new \
		usr/lib/python2.7/site-packages/macsypy/config.py \
		usr/lib/python2.7/site-packages/macsypy/registries.py \
		; do \
	    sed -i 's:debian/macsyfinder::g' debian/macsyfinder/$${conffile} ; \
	done
	mv debian/macsyfinder/etc/macsyfinder/macsyfinder.conf.new debian/macsyfinder/etc/macsyfinder/macsyfinder.conf
	rm debian/macsyfinder/usr/share/doc/macsyfinder/html/_static/jquery.js
	rm debian/macsyfinder/usr/share/doc/macsyfinder/html/_static/underscore.js
	rm -Rf debian/macsyfinder/usr/share/macsyfinder/macsyview

override_dh_clean:
	rm -Rf doc/_build
	rm -f uninstall.cfg
	rm -f uninstall_files
	dh_clean

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	# This test was skipped from test suite in debian/patches/skip_tests.patch since
	# the binary program call somehow resolved to "None".  Do it manually here.
	MACSY_HOME=$(CURDIR) $(CURDIR)/bin/macsyfinder --def=tests/data/data_set_1/def --profile-dir=tests/data/data_set_1/profiles --out-dir=/tmp/macsyfinder_test_basic_run --sequence-db=tests/data/base/test_aesu.fa --db-type=gembase T9SS T3SS T4SS_typeI
	dh_auto_test
endif

override_dh_fixperms:
	dh_fixperms
	find debian -name "test_*.fa" -executable -exec chmod -x \{\} \;