File: rules

package info (click to toggle)
connectome-workbench 1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 28,968 kB
  • ctags: 23,747
  • sloc: cpp: 260,127; ansic: 3,670; sh: 308; makefile: 146
file content (62 lines) | stat: -rwxr-xr-x 2,032 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
#!/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 )

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

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

# Default mega-rule
%:
	dh $@ --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 -- \
		-DCMAKE_SKIP_RPATH:BOOL=OFF
#-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