File: rules

package info (click to toggle)
connectome-workbench 2.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 83,244 kB
  • sloc: cpp: 668,724; ansic: 57,331; sh: 1,257; makefile: 154; csh: 12; xml: 9
file content (71 lines) | stat: -rwxr-xr-x 2,506 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
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/make -f
# -*- makefile -*-

srcpkg = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Source:' | cut -d ' ' -f 2,2)
debver = $(shell LC_ALL=C dpkg-parsechangelog | grep '^Version:' | cut -d ' ' -f 2,2 )
uver = $(shell echo $(debver) | cut -d '-' -f 1,1 )

DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
do_parallel=$(shell echo $(DEB_HOST_ARCH) | grep -q mips && echo '' || echo '--parallel')
do_help=$(shell echo $(DEB_HOST_ARCH) | grep -q -E '(mipsel|m68k|sh4)' && echo 'OFF' || echo 'ON')

export  http_proxy=http://127.0.0.1:9/
export  https_proxy=http://127.0.0.1:9/

# export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
    export CFLAGS += -O0
else
    export CFLAGS += -O2
endif

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
export DEB_CFLAGS_MAINT_APPEND = -DNDEBUG
export DEB_CXXFLAGS_MAINT_APPEND = -DNDEBUG

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

# Default mega-rule
%:
	dh $@ $(do_parallel) --sourcedirectory=src

override_dh_clean:
	cat src/debian/copyright debian/copyright.debian >| debian/copyright
	# Bring shipped version back
	[ -e src/FtglFont.aside ] && mv src/FtglFont.aside src/FtglFont || :
	dh_clean

override_dh_auto_configure:
	# Just to make sure we are not using shipped version
	[ -e src/FtglFont ] && mv src/FtglFont src/FtglFont.aside || [ -e src/FtglFont.aside ]
	OSMESA_DIR=/usr \
     dh_auto_configure -- \
		-DWORKBENCH_MESA_DIR=/usr \
		-DCMAKE_SKIP_RPATH:BOOL=OFF \
		-DWORKBENCH_USE_QT5_QOPENGL_WIDGET:BOOL=ON \
		-DWORKBENCH_INCLUDE_HELP_HTML_RESOURCES:BOOL=$(do_help)
#-DBUILD_SHARED_LIBS:BOOL=ON

override_dh_auto_install:
	dh_auto_install

	: # Sloppy man pages for now. Improve with templates
	mkdir -p debian/tmp/usr/share/man/man1
	help2man --no-info --help-option=-help --version-string=$(uver) \
		-n "visualization and discovery tool used to map neuroimaging data" \
		debian/tmp/usr/bin/wb_view \
		>| debian/tmp/usr/share/man/man1/wb_view.1

	help2man --no-info --help-option=-all-commands-help --version-string=$(uver) \
		-n "command-line program for performing a variety of algorithmic tasks using volume, surface, and grayordinate data" \
		debian/tmp/usr/bin/wb_command \
		>| debian/tmp/usr/share/man/man1/wb_command.1

override_dh_install:
	dh_install
	install -D -m 0644 icons/linux/workbench_128x128x32.png debian/connectome-workbench/usr/share/pixmaps/connectome-workbench.png

override_dh_strip:
	dh_strip --dbg-package=connectome-workbench-dbg