File: rules

package info (click to toggle)
lmod 8.7.60-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 63,008 kB
  • sloc: sh: 6,266; makefile: 2,837; ansic: 1,513; tcl: 1,382; python: 1,050; csh: 112
file content (59 lines) | stat: -rwxr-xr-x 1,811 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# -*- makefile -*-

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

export DEB_BUILD_MAINT_OPTIONS = hardening=+all

include /usr/share/dpkg/pkg-info.mk

%: PATH	:= $(PATH):$(CURDIR)/hermes/bin
%:
	dh $@

override_dh_auto_configure-arch:
	dh_auto_configure -- \
		--prefix=/usr/share \
		--with-ModulePathInit=/etc/lmod/modulespath \
		PS=/bin/ps \
		READLINK=/bin/readlink \
		PATH_TO_LS=/bin/ls \
		PATH_TO_PAGER=/bin/more \

override_dh_auto_configure-indep:

execute_before_dh_auto_build-indep:
	[ -s docs/source/400_code_conventions.rst ] || $(RM) docs/source/400_code_conventions.rst

execute_after_dh_auto_build-indep:
	$(MAKE) -C docs

override_dh_auto_test:
	id -u
	dh_auto_test || echo $$? > debian/tests-failed.stamp
	@if test -f debian/tests-failed.stamp ; then \
		for dir in rt/*/ ; do \
			echo ">>>> $${dir}err.txt" ; \
			diff -u $${dir}t1/*/_err.left $${dir}t1/*/_err.right || echo ; \
			echo ">>>> $${dir}out.txt" ; \
			diff -u $${dir}out.txt $${dir}t1/*/out.txt || echo ; \
		done ; \
	fi
	test ! -f debian/tests-failed.stamp || exit $$(cat debian/tests-failed.stamp)

execute_after_dh_auto_install-arch:
	find debian/tmp -type d -empty -print -delete
	mkdir -p debian/tmp/etc/profile.d
	cp debian/tmp/usr/share/lmod/lmod/init/profile debian/tmp/etc/profile.d/lmod.sh
	# move the shared library from /usr/share to /usr/lib
	mkdir -p debian/tmp/usr/lib/lmod/$(DEB_VERSION_UPSTREAM)
	mv debian/tmp/usr/share/lmod/$(DEB_VERSION_UPSTREAM)/lib debian/tmp/usr/lib/lmod/$(DEB_VERSION_UPSTREAM)/
	ln -s /usr/lib/lmod/$(DEB_VERSION_UPSTREAM)/lib debian/tmp/usr/share/lmod/$(DEB_VERSION_UPSTREAM)/lib

execute_after_dh_auto_clean:
	$(RM) -r docs/build
	test ! -d testreports || testcleanup

override_dh_clean:
	dh_clean -XTAGS -XTACC/TACC.orig -XTACC/cluster.orig