File: rules

package info (click to toggle)
fslview 4.0.1-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,812 kB
  • ctags: 4,932
  • sloc: cpp: 28,276; ansic: 5,103; sh: 250; makefile: 125; python: 72; tcl: 43
file content (59 lines) | stat: -rwxr-xr-x 1,670 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
#!/usr/bin/make -f

# attempt to fix/workaround #502083
AS_NEEDED_BROKEN = zarmelz zarmebz
ifneq (,$(findstring z$(DEB_HOST_ARCH)z,$(AS_NEEDED_BROKEN)))
LDFLAGS =
else
LDFLAGS = -Wl,--as-needed -Wl,--no-undefined
endif

# The CMake flags for Debian:
# - Choose Qt3 explicitely (necessary as building fails with Qt4 present).
# - Search for VTK instead of a fixed path to be compatible with post-etch
#   versions and Ubuntu.

# add Debian-specific include paths
CXXFLAGS += -I$(CURDIR)/fsl/libprob \
            -I/usr/include/newmat \
            -I/usr/include/qwt-qt4 \
            -I/usr/include/nifti
CFLAGS += $(CXXFLAGS)
export CXXFLAGS
export CFLAGS


# one ring to rule them all ...
%:
	dh $@ --buildsystem=cmake


override_dh_auto_configure:
	dh_auto_configure -- \
      -DCMAKE_EXE_LINKER_FLAGS:STRING="$(LDFLAGS)" \
      -DCMAKE_MODULE_LINKER_FLAGS:STRING="$(LDFLAGS)" \
      -DCMAKE_SHARED_LINKER_FLAGS:STRING="$(LDFLAGS)" \
      -DVTK_DIR:PATH=$$(dirname $$(find /usr/lib -name VTKConfig.cmake|head -n1)) \
      -DDESIRED_QT_VERSION=4 \
      -DQT_MOC_EXECUTABLE=/usr/bin/moc-qt4 \
      -DQT_UIC_EXECUTABLE=/usr/bin/uic-qt4 \
      -DQWT_DIR=/usr \
      -DFSL_DIR=$(CURDIR)/fsl \
      -DFSL_BUILD:BOOL=ON


override_dh_auto_install::
	dh_auto_install
	# make fsl icon
	convert doc/fslview/fsl-logo.png -resize x32 -crop 32x32+5+0 \
		debian/tmp/fslview.xpm


override_dh_auto_test::
	# disabled because tests rely on FSL environment which is provided by a
	# non-free package

# do not compress the html docs as they are used as online help sources
# for FSLView via the Qt-Assistant
override_dh_compress:
	dh_compress -X.html -X.png -X.adp -X.jpg