[go: up one dir, main page]

File: rules

package info (click to toggle)
cctools 9.9-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 44,624 kB
  • sloc: ansic: 192,539; python: 20,827; cpp: 20,199; sh: 11,719; perl: 4,106; xml: 3,688; makefile: 1,224
file content (80 lines) | stat: -rwxr-xr-x 3,431 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#!/usr/bin/make -f

non_default_python3_versions = $(shell python3 -c "print (\"`py3versions -v -s`\".replace(\"`py3versions -v -d`\", '').strip())")

export DH_VERBOSE=1

# one ring to rule them all ...
%:
	dh $@  --no-parallel

PY3:=$(shell py3versions -d)
CF:=$(shell dpkg-buildflags --get CFLAGS) 

ARCH_NOGOLANG:= hurd-i386 kfreebsd-amd64 kfreebsd-i386 sh4 ia64 alpha hppa m68k powerpc ppc64 x32
GOLANG:= $(if $(filter $(DEB_TARGET_ARCH), $(ARCH_NOGOLANG)),,--with-golang-path /usr)

override_dh_auto_configure:
	# disable warning about unused results (necessary because warning is error
	# is ON)
	CFLAGS="$(CF) -I /usr/include/$(PY3) -DNDEBUG -Wno-unused-result" bash ./configure --with-globus-path /usr \
		--prefix /usr \
		$(GOLANG) \
		--with-krb5-path /usr --with-readline-path /usr \
		--with-mpi-path /usr --with-fuse-path /usr --with-zlib-path /usr \
		--with-python3-path /usr/bin/python3 \
		--with-python2-path no \
		--without-system-parrot \
		--build-date "$(shell LC_ALL=C date --utc --date=@$${SOURCE_DATE_EPOCH})" 

override_dh_auto_test:
	# disable the tests for now on upstream's request. they will be reenabled
	# once the test suite can properly deal with the buildd environment

override_dh_auto_install:
	dh_auto_install -- CCTOOLS_INSTALL_DIR=$(CURDIR)/debian/tmp 
	# make extensions for other supported python versions
	if [ -n "$(non_default_python3_versions)" ]; then \
		for pyver in $(non_default_python3_versions); do \
			CFLAGS="$(CF) -I /usr/include/python$${pyver} -DNDEBUG -Wno-unused-result" \
			bash ./configure --with-globus-path /usr --with-krb5-path /usr --with-readline-path /usr \
				--with-mpi-path /usr --with-fuse-path /usr --with-zlib-path /usr \
				--with-python3-path /usr/bin/python$${pyver} --with-python2-path no ; \
			make -B -C work_queue/src/bindings/python3 clean install CCTOOLS_INSTALL_DIR=$(CURDIR)/debian/tmp ; \
			make -B -C resource_monitor/src clean install CCTOOLS_INSTALL_DIR=$(CURDIR)/debian/tmp  ; \
			make -B -C chirp/src clean install CCTOOLS_INSTALL_DIR=$(CURDIR)/debian/tmp  ; \
		done ; \
	fi
	# for now remove the 'apps' scripts till upstream confirms that the language
	# extension can be removed
	rm -f debian/tmp/bin/*.py
	find debian -name .gitignore -delete
	# fix permissions
	find debian/tmp/lib -name '*.py' -exec chmod 644 {} \;
	# remove undesired pieces
	-rm debian/tmp/doc/COPYING
	# upstream says it should not go into the page
	-rm debian/tmp/bin/watchdog
	# HDFS helpers are useless without HDFS in Debian
	-rm debian/tmp/bin/*_hdfs
	# newer doxygen puts jquery copy
	#-rm debian/tmp/doc/api/html/jquery.js
	$(MAKE) doc

override_dh_auto_clean:
	[ -e Makefile.config ] && dh_auto_clean || true
	-rm -f Makefile.config configure.rerun
	-rm -rf api hdfs-setup.template python/python-workqueue/setup.cfg
	# remove testrun left-overs
	-rm dttools/src/microbench dttools/src/work_queue_example
	-find $(CURDIR) -name '*.test.log' -delete
	-find $(CURDIR) -name '*_test' -delete
	-rm -rf sand/test/filter_verification/random.cand.filter.tmp/
	-rm -rf sand/test/test_20.cand.filter.tmp/
	-rm -f sand/test/test_20.cand sand/test/test_20.cfa sand/test/*.log
	-rm -rf makeflow/test/input/ makeflow/test/worker.pid
	-rm -rf makeflow/test/dirs/testcase.subdir.01.makeflow.makeflowlog
	-rm -rf makeflow/test/dirs/testcase.subdir.01.makeflow.wqlog
	-rm -rf makeflow/test/src/
	-rm dttools/src/multirun sand/test/banded.log
	-rm .configure.tmp.o