File: rules

package info (click to toggle)
modules 4.2.2-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 12,224 kB
  • sloc: exp: 15,975; ansic: 10,168; sh: 2,795; makefile: 939; python: 285; tcl: 242; perl: 106; csh: 99; ruby: 32
file content (49 lines) | stat: -rwxr-xr-x 1,827 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
#!/usr/bin/make -f

export DH_VERBOSE=1

TDIR=debian/environment-modules
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)

DEB_BUILD_MAINT_OPTIONS:=hardening=+all
DEB_CFLAGS_MAINT_APPEND:= -Wall -pedantic
DEB_LDFLAGS_MAINT_APPEND:= -Wl,--as-needed
export  DEB_BUILD_MAINT_OPTIONS DEB_CFLAGS_MAINT_APPEND DEB_LDFLAGS_MAINT_APPEND

# The magic debhelper  rule
%:
	dh $@ 

override_dh_auto_clean:
	$(MAKE) clean || echo "Make clean skipped"
	rm -f stamp-h

override_dh_auto_configure:
	dh_auto_configure -- \
                --prefix=/usr/share/modules \
		--libexecdir=$(LIBDIR) \
		--mandir=/usr/share/man \
		--etcdir=/etc/environment-modules \
		--initdir=/usr/share/modules/init \
		--with-version-path=/usr/share/modules/versions \
		--with-module-path=/usr/share/modules/modulefiles \
		--with-tcl-ver=8.6 \
		--enable-logging \
		--bindir=/usr/bin #LDFLAGS='$(LDFLAGS) -Wl,--as-needed' CFLAGS='$(CFLAGS) '

override_dh_auto_test:
	-dh_auto_test || echo "Ignoring known test failures in autoinit regexps"

override_dh_auto_install:
	dh_auto_install
	mv $(TDIR)/usr/share/modules/share/doc/* $(TDIR)/usr/share/doc/environment-modules
	rm -rf $(TDIR)/usr/share/modules/share
	rm $(TDIR)/usr/share/doc/environment-modules/COPYING.GPLv2* $(TDIR)/usr/share/doc/environment-modules/INSTALL.txt*
	rm $(TDIR)/usr/share/doc/environment-modules/ChangeLog
	cp debian/profile.sh $(TDIR)/etc/profile.d/modules.sh
	cp debian/modulespath site.exp $(TDIR)/etc/environment-modules
	dh_link /etc/environment-modules/modulespath /usr/share/modules/init/.modulespath 
	dh_link $(LIBDIR)/modulecmd.tcl /usr/lib/modulecmd.tcl
	dh_link /usr/share/modules/init/csh		/etc/csh/login.d/modules
	dh_link /usr/share/modules/init/bash_completion /usr/share/bash-completion/completions/modules