File: rules

package info (click to toggle)
dico 2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 17,876 kB
  • ctags: 11,307
  • sloc: ansic: 78,537; sh: 46,494; python: 5,487; lex: 2,617; yacc: 1,436; tcl: 1,434; makefile: 1,267; perl: 655; lisp: 463; awk: 300; php: 59; cpp: 44; fortran: 25; asm: 19; sed: 16; xml: 8
file content (65 lines) | stat: -rwxr-xr-x 1,996 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
#!/usr/bin/make -f

export DEB_BUILD_MAINT_OPTIONS = hardening=+all
TEST_HOME=$(CURDIR)/tmp-home

# Append -Wl,-E to LDFLAGS for mips,mipsel,s390x archs, see:
# https://lists.debian.org/debian-mips/2014/09/msg00041.html
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
ifneq (,$(filter mips mipsel mips64 mips64el s390x,$(DEB_HOST_ARCH)))
	LDFLAGS += "-Wl,-E"
endif

%:
	dh $@ --with python2,autotools_dev

override_dh_auto_configure:
	
	# Workaround to fool automake
	# Should be remove once we have a fix for the failing guile test
	touch modules/guile/tests/Makefile.in

	dh_auto_configure -- --without-included-ltdl LDFLAGS="$(LDFLAGS) -Wl,--as-needed"

override_dh_auto_build:
	dh_auto_build

	# Build python-wit:
	dh_auto_build --sourcedirectory app/python/wit

	# Build dicoclient python modules:
	dh_auto_build --sourcedirectory dicoweb/dicoclient

	# Make those files executable before installing them:
	chmod +x debian/dicodconfig debian/dicodconfig.alias

override_dh_auto_install:
	dh_auto_install

	# Install python-wit:
	dh_auto_install --sourcedirectory app/python/wit -- --root=$(CURDIR)/debian/python-wit

	# Install dicoclient python modules:
	dh_auto_install --sourcedirectory dicoweb/dicoclient -- --root=$(CURDIR)/debian/python-dicoclient

override_dh_install:
	dh_install
	# Install dicoweb:
	dh_install -pdicoweb dicoweb usr/share -Xdicoclient -XINSTALL -Xtemplates -Xsettings-sample.py -Xstatic
	dh_install -pdicoweb dicoweb/templates etc/dicoweb
	dh_install -pdicoweb dicoweb/static etc/dicoweb
	dh_install -pdicoweb debian/apache2.conf etc/dicoweb
	[ ! -d debian/dicoweb/etc/dicoweb/ ] || install -m 0644 dicoweb/settings-sample.py $(CURDIR)/debian/dicoweb/etc/dicoweb/settings.py

override_dh_auto_clean:
	dh_auto_clean

	# Clean python-wit:
	dh_auto_clean --sourcedirectory app/python/wit

	# Clean dicoclient python modules:
	dh_auto_clean --sourcedirectory dicoweb/dicoclient

override_dh_auto_test:
	mkdir -p $(TEST_HOME)
	HOME=$(TEST_HOME) dh_auto_test